1. 09 3月, 2012 1 次提交
    • R
      sh-sci / PM: Avoid deadlocking runtime PM · 048be431
      Rafael J. Wysocki 提交于
      The runtime PM of sh-sci devices is enabled when sci_probe() returns,
      so the pm_runtime_put_sync() executed by driver_probe_device()
      attempts to suspend the device.  Then, in some situations, a
      diagnostic message is printed to the console by one of the runtime
      suspend routines handling the sh-sci device, which causes synchronous
      runtime resume to be started from the device's own runtime suspend
      callback.  This causes rpm_resume() to be run eventually, which sees
      the RPM_SUSPENDING status set by rpm_suspend() and waits for it to
      change.  However, the device's runtime PM status cannot change at
      that point, because the routine that has set it waits for the
      rpm_suspend() to return.  A deadlock occurs as a result.
      
      To avoid that make sci_init_single() increment the device's
      runtime PM usage counter, so that it cannot be suspended by
      driver_probe_device().  That counter has to be decremented
      eventually, so make sci_startup() do that before starting to
      actually use the device and make sci_shutdown() increment it
      again before returning to balance the incrementation carried out by
      sci_startup().
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Tested-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      048be431
  2. 02 12月, 2011 3 次提交
    • P
      serial: sh-sci: Handle GPIO function requests. · 50f0959a
      Paul Mundt 提交于
      This adds initial support for requesting the various GPIO functions
      necessary for certain ports. This just plugs in dumb request/free logic,
      but serves as a building block for migrating off of the ->init_pins mess
      to a wholly gpiolib backed solution (primarily parts with external
      RTS/CTS pins, but will also allow us to clean up RXD pin testing).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      50f0959a
    • P
      serial: sh-sci: Avoid FIFO clear for MCE toggle. · 73c3d53f
      Paul Mundt 提交于
      When toggling the MCE support we don't want to concern ourselves with the
      FIFO state, so ensure that the clearing bits are masked out when updating
      the MCE state.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      73c3d53f
    • P
      serial: sh-sci: per-port modem control. · faf02f8f
      Paul Mundt 提交于
      The bulk of the ports do not support any sort of modem control, so
      blindly twiddling the MCE bit doesn't accomplish much. We now require
      ports to manually specify which line supports modem control signals.
      
      While at it, tidy up the RTS/CTSIO handling in SCSPTR parts so it's a bit
      more obvious what's going on (and without clobbering other configurations
      in the process).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      faf02f8f
  3. 24 11月, 2011 5 次提交
  4. 04 11月, 2011 1 次提交
  5. 31 10月, 2011 1 次提交
  6. 23 9月, 2011 1 次提交
  7. 19 9月, 2011 1 次提交
  8. 29 8月, 2011 1 次提交
    • Y
      serial: sh-sci: report CTS as active for get_mctrl · 4480a688
      Yoshii Takashi 提交于
      sh-sci.c sets hardware up and then let the HW do all flow controls.
      There is no software code, nor needs to get/set real CTS signal.
      
      But, when turning CRTSCTS on through termios, uart_set_termios() in
      serial_core.c checks CTS, and stops TX if it is inactive at the moment.
      
      Because sci_get_mctrl() returns a fixed value DTR|RTS|DSR but CTS,
      the sequence
        open -> set CRTSCTS -> write
      hit the case and stop working, no more outputs.
      
      This patch makes sci_get_mctrl() report CTS in addition.
      Signed-off-by: NTakashi YOSHII <takashi.yoshii.zj@renesas.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      4480a688
  9. 25 8月, 2011 1 次提交
  10. 08 8月, 2011 1 次提交
  11. 03 8月, 2011 3 次提交
  12. 28 6月, 2011 4 次提交
  13. 14 6月, 2011 3 次提交
    • P
      serial: sh-sci: Support generic SCLSR overrun detection. · 4b8c59a3
      Paul Mundt 提交于
      For all ports with a valid SCLSR register we can use the generic FIFO
      overrun detection logic. Test the validity of the SCLSR register rather
      than depending explicitly on port type, which can be ambiguous for the
      SCIFA/B types.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      4b8c59a3
    • P
      serial: sh-sci: FIFO sizing helper consolidation. · 72b294cf
      Paul Mundt 提交于
      This consolidates all of the TX/RX fill/room nonsense in to a single set
      of fairly heavyweight definitions. The implementation goes in descending
      order of complexity, testing the register map for capabilities until we
      run out of options and do it the legacy SCI way. Masks are derived
      directly from the per-port FIFO size, meaning that platforms with FIFO
      sizes not matching the standard port types will still need to manually
      fix them up.
      
      This also fixes up a number of issues such as tx_empty being completely
      bogus for SCI and IrDA ports, some ports using masks smaller or greater
      than their FIFO size, and so forth.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      72b294cf
    • P
      serial: sh-sci: Abstract register maps. · 61a6976b
      Paul Mundt 提交于
      This takes a bit of a sledgehammer to the horribly CPU subtype
      ifdef-ridden header and abstracts all of the different register layouts
      in to distinct types which in turn can be overriden on a per-port basis,
      or permitted to default to the map matching the port type at probe time.
      
      In the process this ultimately fixes up inumerable bugs with mismatches
      on various CPU types (particularly the legacy ones that were obviously
      broken years ago and no one noticed) and provides a more tightly coupled
      and consolidated platform for extending and implementing generic
      features.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      61a6976b
  14. 08 6月, 2011 2 次提交
    • P
      serial: sh-sci: Consolidate RXD pin handling. · 514820eb
      Paul Mundt 提交于
      Non-SCI parts do not have the special port reg necessary for cases where
      the RX and SCI pins are muxed and need to be manually polled, so these
      like always fall back on the normal FIFO processing paths. SH7760 is in a
      class in and of itself with regards to mapping its SIM card interface via
      the SCI port class despite not having any of the RXD lines wired up and
      so implicitly behaving more like a SCIF in this regard. Out of the other
      CPUs, some support the port check via the same block while others do it
      through an external SuperI/O, so it's not even possible to perform the
      check relative to the ioremapped cookie offset, so the separate read
      semantics are preserved here, too.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      514820eb
    • P
      serial: sh-sci: Generalize overrun handling. · debf9507
      Paul Mundt 提交于
      This consolidates all of the broken out overrun handling and ensures that
      we have sensible defaults per-port type, in addition to making sure that
      overruns are flagged appropriately in the error mask for parts that
      haven't explicitly disabled support for it.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      debf9507
  15. 06 6月, 2011 1 次提交
  16. 23 5月, 2011 2 次提交
  17. 20 4月, 2011 1 次提交
  18. 31 3月, 2011 3 次提交
  19. 04 3月, 2011 1 次提交
    • A
      serial: sh-sci: fix deadlock when resuming from S3 sleep · 36003386
      Alexandre Courbot 提交于
      S3 sleep invokes the shutdown callback of the sh-sci driver, which
      suspends the clocks until they are reactivated by a call to startup.
      However, before the latter is invoked, sci_set_termios may be called on
      the port by uart_resume_port. In such cases it will endlessly wait for
      the TEND bit to raise, which will never happen since the clocks are
      disabled.
      
      This patch ensures that clocks are enabled when ports registers are
      manipulated within sci_set_termios.
      Signed-off-by: NAlexandre Courbot <gnurou@gmail.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      36003386
  20. 14 1月, 2011 1 次提交
    • G
      tty: move drivers/serial/ to drivers/tty/serial/ · ab4382d2
      Greg Kroah-Hartman 提交于
      The serial drivers are really just tty drivers, so move them to
      drivers/tty/ to make things a bit neater overall.
      
      This is part of the tty/serial driver movement proceedure as proposed by
      Arnd Bergmann and approved by everyone involved a number of months ago.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Rogier Wolff <R.E.Wolff@bitwizard.nl>
      Cc: Michael H. Warfield <mhw@wittsend.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ab4382d2
  21. 13 1月, 2011 1 次提交
  22. 24 5月, 2010 1 次提交
  23. 22 5月, 2010 1 次提交