1. 03 2月, 2012 5 次提交
    • J
      TTY: use tty_standard_install · 81f5835e
      Jiri Slaby 提交于
      Use the helper in the rest of the tty drivers. This is a simple
      replacement.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      81f5835e
    • J
      TTY: provide tty_standard_install helper · 66d450e8
      Jiri Slaby 提交于
      There are currently many cut&paste copies of what
      tty_driver_install_tty does when custom ->install method is not
      provided. Let's get rid of the copies and create a helper with this
      setup code.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Havard Skinnemoen <hskinnemoen@google.com>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      66d450e8
    • P
      tty: serial: omap-serial: wakeup latency constraint is in microseconds, not milliseconds · 6bbcbf22
      Paul Walmsley 提交于
      The receive FIFO wakeup latency estimate in the omap-serial driver is
      three orders of magnitude too small.  This effectively prevents the
      MPU from going to a low-power state when CONFIG_CPU_IDLE=y.  This is a
      major power management regression and masks some other FIFO-related
      bugs in the driver.
      
      Fix by correcting the most egregious problem in the RX wakeup latency
      estimate.  There are several other flaws in the estimator; these will
      be fixed by a separate patch series intended for 3.4.
      
      The difference in low-power states with this patch can be observed via
      debugfs in pm_debug/count.
      
      This estimate does not have any effect when CONFIG_CPU_IDLE=n.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Alan Cox <alan@linux.intel.com>
      Acked-by: NGovindraj.R <govindraj.raja@ti.com>
      Reviewed-by: NKevin Hilman <khilman@ti.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6bbcbf22
    • P
      tty: serial: OMAP: block idle while the UART is transferring data in PIO mode · edbe5dbe
      Paul Walmsley 提交于
      Prevent OMAP UARTs from going idle while they are still transferring
      data in PIO mode.  This works around an oversight in the OMAP UART
      hardware present in OMAP34xx and earlier: an idle UART won't send a
      wakeup when the TX FIFO threshold is reached.  This causes long delays
      during data transmission when the MPU powerdomain enters a low-power
      mode.  The MPU interrupt controller is not able to respond to
      interrupts when it's in a low-power state, so the TX buffer is not
      refilled until another wakeup event occurs.
      
      This fix changes the erratum i291 DMA idle workaround.  Rather than
      toggling between force-idle and no-idle, it will toggle between
      smart-idle and no-idle.  The important part of the workaround is the
      no-idle part, so this shouldn't result in any change in behavior.
      
      This fix should work on all OMAP UARTs.  Future patches intended for
      the 3.4 merge window will make this workaround conditional on a
      "feature" flag, and will use the OMAP36xx+ TX event wakeup support.
      
      Thanks to Kevin Hilman <khilman@ti.com> for mentioning the erratum i291
      workaround, which led to the development of this approach.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Acked-by: NGovindraj.R <govindraj.raja@ti.com>
      Reviewed-by: NKevin Hilman <khilman@ti.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      edbe5dbe
    • P
      tty: serial: OMAP: use a 1-byte RX FIFO threshold in PIO mode · 5816269e
      Paul Walmsley 提交于
      In the (default) PIO mode, use a one-byte RX FIFO threshold.  The OMAP
      UART IP blocks do not appear to be capable of waking the system under
      an RX timeout condition.  Since the previous RX FIFO threshold was 16
      bytes, this meant that omap-serial.c did not become aware of any
      received data until all those bytes arrived or until another UART
      interrupt occurred.  This made the serial console and presumably other
      serial applications (GPS, serial Bluetooth) unusable or extremely
      slow.  A 1-byte RX FIFO threshold also allows the MPU to enter a
      low-power consumption state while waiting for the FIFO to fill.
      
      This can be verified using the serial console by comparing the
      behavior when "0123456789abcde" is pasted in from another window, with
      the behavior when "0123456789abcdef" is pasted in.  Since the former
      string is less than sixteen bytes long, the string is not echoed for
      some time, while the latter string is echoed immediately.
      
      DMA operation is unaffected by this patch.
      
      Thanks to Russell King - ARM Linux <linux@arm.linux.org.uk> for some
      additional information on the standard behavior of the RX timeout
      event, which was used to improve this commit description.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Govindraj Raja <govindraj.r@ti.com>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Reviewed-by: NKevin Hilman <khilman@ti.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5816269e
  2. 27 1月, 2012 2 次提交
  3. 25 1月, 2012 2 次提交
  4. 13 1月, 2012 1 次提交
  5. 05 1月, 2012 10 次提交
  6. 04 1月, 2012 3 次提交
  7. 28 12月, 2011 2 次提交
    • S
      serial: mxs-auart: convert to clk_prepare/clk_unprepare · a4813770
      Shawn Guo 提交于
      The patch converts mxs-auart driver to clk_prepare/clk_unprepare by
      using helper functions clk_prepare_enable/clk_disable_unprepare.
      Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Alan Cox <alan@linux.intel.com>
      a4813770
    • S
      apbuart: fix section mismatch warning · ab17da5c
      Sam Ravnborg 提交于
      Fix following warnings:
      
      WARNING: drivers/tty/serial/built-in.o(.text+0x7370): Section mismatch in reference from the function grlib_apbuart_configure() to the variable .init.data:apbuart_match
      The function grlib_apbuart_configure() references
      the variable __initdata apbuart_match.
      This is often because grlib_apbuart_configure lacks a __initdata
      annotation or the annotation of apbuart_match is wrong.
      
      + 3 more warnings like this.
      
      There is no guarantee that grlib_apbuart_of_driver.of_match_table
      is only used at __init time - so drop the __initdata annotation.
      
      grlib_apbuart_configure() is only used during __init so add __init
      to this method too.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Daniel Hellstrom <daniel@gaisler.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab17da5c
  8. 23 12月, 2011 9 次提交
  9. 17 12月, 2011 3 次提交
  10. 16 12月, 2011 1 次提交
    • B
      tty/serial/pmac_zilog: Fix suspend & resume · a79dd5ae
      Benjamin Herrenschmidt 提交于
      This patch reworks & simplifies pmac_zilog handling of suspend/resume,
      essentially removing all the specific code in there and using the
      generic uart helpers.
      
      This required properly registering the tty as a child of the macio (or platform)
      device, so I had to delay the registration a bit (we used to register the ports
      very very early). We still register the kernel console early though.
      
      I removed a couple of unused or useless flags as well, relying on the
      core to not call us when asleep. I also removed the essentially useless
      interrupt mutex, simplifying the locking a bit.
      
      I removed some code for handling unexpected interrupt which should never
      be hit and could potentially be harmful (causing us to access a register
      on a powered off SCC). We diable port interrupts on close always so there
      should be no need to drain data on a closed port.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a79dd5ae
  11. 15 12月, 2011 2 次提交
    • G
      ARM: OMAP2+: UART: Fix compilation/sparse warnings · da274686
      Govindraj.R 提交于
      Fixes below compilation warning.
      
      drivers/tty/serial/omap-serial.c: In function 'serial_omap_irq':
      drivers/tty/serial/omap-serial.c:228:29: warning: 'ch' may be used uninitialized in this function [-Wuninitialized]
      
      Fix below sparse warning.
      
      drivers/tty/serial/omap-serial.c:392:52: warning: incorrect type in argument 2 (different signedness)
      drivers/tty/serial/omap-serial.c:392:52:    expected int *status
      drivers/tty/serial/omap-serial.c:392:52:    got unsigned int *<noident>
      Reported-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NGovindraj.R <govindraj.raja@ti.com>
      Acked-by: Greg Kroah-Hartman <gregkh@suse.de> (for drivers/tty changes)
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      da274686
    • G
      ARM: OMAP2+: UART: Remove omap_uart_can_sleep and add pm_qos · 2fd14964
      Govindraj.R 提交于
      Omap_uart_can_sleep function blocks system wide low power state until
      uart is active remove this func and add qos requests to prevent
      MPU from transitioning.
      
      Keep qos request to default value which will allow MPU to transition
      and while uart baud rate is available calculate the latency value
      from the baudrate and use the same to hold constraint while uart clocks
      are enabled, and if uart is auto-idled the constraint is updated with
      default constraint value allowing MPU to transition.
      
      Qos requests are blocking notifier calls so put these requests to
      work queue, also the driver uses irq_safe version of runtime API's
      and callbacks can be called in interrupt disabled context.
      So to avoid warn on slow path warning while using qos update
      API's from runtime callbacks use the qos_work_queue.
      
      During bootup the runtime_resume call backs might not be called and runtime
      callback gets called only after uart is idled by setting the autosuspend
      timeout. So qos_request from runtime resume callback might not activated during
      boot if uart baudrate is calculated during bootup for console uart, so schedule
      the qos_work queue once we calc_latency while configuring the uart port.
      
      Flush and complete any pending qos jobs in work queue while suspending.
      Signed-off-by: NGovindraj.R <govindraj.raja@ti.com>
      Acked-by: Greg Kroah-Hartman <gregkh@suse.de> (for drivers/tty changes)
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      2fd14964