1. 12 Dec, 2012 6 commits
    • Mark Salter's avatar
      MN10300: fix debug polling in ttySM driver · 0369c360
      Mark Salter authored
      The debug polling interface for the SoC serial ports did not work in the case
      where the serial ports were not also used as a console. In that case, the
      uart driver startup function will not be called so tx and rx would not be
      enabled in the hardware control register. Also, vdma interrupts would not be
      enabled which the poll_get_char function relied on. This patch makes sure that
      the rx and tx enables are set as a consequence of the uart set_termios call
      which is the only initialization done for the debug polling interface. Also,
      the poll_get_char now handles the case where vdma interrupts are not enabled.
      Signed-off-by: default avatarMark Salter <msalter@redhat.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      0369c360
    • Mark Salter's avatar
      MN10300: ttySM: clean up unnecessary casting · 97a70b14
      Mark Salter authored
      The ttySM uart data register pointers are declared as void* pointers. Change
      them to u8* pointers so we don't need to use casts in the code.
      Signed-off-by: default avatarMark Salter <msalter@redhat.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      97a70b14
    • Mark Salter's avatar
      MN10300: fix SMP synchronization between txdma and serial driver · 8f0bcbca
      Mark Salter authored
      The SoC serial port driver uses a high priority interrupt to handle tx of
      characters in the tx ring buffer. The driver needs to disable/enable this IRQ
      from outside of irq context. The original code to do this is not foolproof on
      SMP machines because the IRQ running on one core could still access the serial
      port for a short time after the driver running on another core disables the
      interrupt. This patch adds a flag to tell the IRQ handler that the driver
      wants to disable the interrupt. After seeing the flag, the IRQ handler will
      immediately disable the interrupt and exit. After setting the flag, the driver
      will wait for interrupt to be disabled by the IRQ handler.
      Signed-off-by: default avatarMark Salter <msalter@redhat.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      8f0bcbca
    • Mark Salter's avatar
      MN10300: fix serial port vdma irq setup for SMP · 8d160027
      Mark Salter authored
      The builtin SoC serial ports have no FIFOs and use a virtual DMA mechanism
      based on high priority IRQs to avoid overruns. These high priority interrupts
      are pinned to cpu#0 on SMP systems. This patch fixes a problem with SMP where
      the set_intr_level() interface is used to set the priority for these IRQs. The
      set_intr_level() function sets priority on the local cpu but on SMP systems,
      this code may be run on some other cpu than the one handling the interrupts.
      Instead of setting interrupt level explicitly, this patch uses a special
      irq_chip for these interrupts so that the mask/unmask methods can set the
      interrupt level implicitly.
      Signed-off-by: default avatarMark Salter <msalter@redhat.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      8d160027
    • Mark Salter's avatar
      MN10300: cleanup IRQ affinity setting · 7d361cb7
      Mark Salter authored
      The irq_set_affinity handler for the mn10300 cpu pic had some hard-coded IRQs
      which were not to be migrated from one cpu to another. This patch cleans those
      up by using a combination of IRQF_NOBALANCING and specialized irq chips with
      no irq_set_affinity handler. This maintains the previous behavior by using
      generic IRQ interfaces rather than hard coding IRQ numbers in the default
      irq_set_affinity handler.
      Signed-off-by: default avatarMark Salter <msalter@redhat.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      7d361cb7
    • David Howells's avatar
      MN10300: ttySM: Use memory barriers correctly in circular buffer logic · c98c406e
      David Howells authored
      Use memory barriers correctly in the circular buffer logic used in the driver,
      as documented in Documentation/circular-buffers.txt.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarMark Salter <msalter@redhat.com>
      c98c406e
  2. 29 Nov, 2012 34 commits