1. 25 4月, 2014 1 次提交
  2. 17 4月, 2014 2 次提交
    • T
      serial: omap: Fix missing pm_runtime_resume handling by simplifying code · d758c9c1
      Tony Lindgren 提交于
      The lack of pm_runtime_resume handling for the device state leads into
      device wake-up interrupts not working after a while for runtime PM.
      
      Also, serial-omap is confused about the use of device_may_wakeup.
      The checks for device_may_wakeup should only be done for suspend and
      resume, not for pm_runtime_suspend and pm_runtime_resume. The wake-up
      events for PM runtime should always be enabled.
      
      The lack of pm_runtime_resume handling leads into device wake-up
      interrupts not working after a while for runtime PM.
      
      Rather than try to patch over the issue of adding complex tests to
      the pm_runtime_resume, let's fix the issues properly:
      
      1. Make serial_omap_enable_wakeup deal with all internal PM state
         handling so we don't need to test for up->wakeups_enabled elsewhere.
      
         Later on once omap3 boots in device tree only mode we can also
         remove the up->wakeups_enabled flag and rely on the wake-up
         interrupt enable/disable state alone.
      
      2. Do the device_may_wakeup checks in suspend and resume only,
         for runtime PM the wake-up events need to be always enabled.
      
      3. Finally just call serial_omap_enable_wakeup and make sure we
         call it also in pm_runtime_resume.
      
      4. Note that we also have to use disable_irq_nosync as serial_omap_irq
         calls pm_runtime_get_sync.
      
      Fixes: 2a0b965c (serial: omap: Add support for optional wake-up)
      Cc: stable@vger.kernel.org # v3.13+
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d758c9c1
    • S
  3. 18 3月, 2014 2 次提交
  4. 14 2月, 2014 3 次提交
  5. 01 11月, 2013 1 次提交
  6. 30 10月, 2013 3 次提交
  7. 17 10月, 2013 1 次提交
  8. 27 9月, 2013 2 次提交
  9. 28 8月, 2013 2 次提交
  10. 16 8月, 2013 1 次提交
  11. 15 8月, 2013 1 次提交
    • M
      OMAP: add RS485 support · 4a0ac0f5
      Mark Jackson 提交于
      This patch adds RS485 support to the OMAP serial driver, as
      defined in:-
      
      Documentation/devicetree/bindings/serial/rs485.txt
      
      When a UART transmitter is connected to (eg) a RS485 driver, it is
      necessary to turn the driver on/off as quickly as possible.  This is
      best achieved in the serial driver itself (rather than in userspace
      where the latency can be quite large).
      
      This patch allows a GPIO pin to be defined (via DT) that controls
      the enabling of the driver at the start of a message, and disables
      the driver when the message has been completed.
      
      When RS485 is disabled, the RTS pin is set to on.
      Signed-off-by: NMark Jackson <mpfj@newflow.co.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4a0ac0f5
  12. 01 8月, 2013 1 次提交
  13. 27 7月, 2013 6 次提交
  14. 25 7月, 2013 1 次提交
  15. 18 6月, 2013 1 次提交
    • T
      serial: omap: Fix device tree based PM runtime · a630fbfb
      Tony Lindgren 提交于
      In the runtime_suspend function pdata is not being used, and
      also blocks the function in device tree based booting. Fix it
      by removing the unused pdata from the runtime_suspend function.
      
      Further, context loss count is not being passed in pdata, so
      let's just reinitialize the port every time for those case.
      This can be further optimized later on for the device tree
      case by adding detection for the hardware state and possibly
      by adding a driver specific autosuspend timeout.
      
      And doing this, we can then make the related dev_err into a
      dev_dbg message instead of an error.
      
      In order for the wake-up events to work, we also need to set
      autosuspend_timeout to -1 if 0, and also device_init_wakeup()
      as that's not being done by the platform init code for the
      device tree case.
      
      Note that this does not affect legacy booting, and in fact
      might make it work for the cases where the context loss info
      is not being passed in pdata.
      
      Thanks to Kevin Hilman <khilman@linaro.org> for debugging
      and suggesting fixes for the autosuspend_timeout and
      device_init_wakeup() related initializiation.
      Reviewed-by: NKevin Hilman <khilman@linaro.org>
      Tested-by: NKevin Hilman <khilman@linaro.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a630fbfb
  16. 07 6月, 2013 1 次提交
  17. 04 6月, 2013 1 次提交
  18. 21 5月, 2013 1 次提交
  19. 20 5月, 2013 1 次提交
  20. 04 4月, 2013 1 次提交
  21. 06 2月, 2013 1 次提交
    • A
      OMAP/serial: Fix incorrect Rx FIFO threshold setting, LSR validation on Tx,... · 1776fd05
      Alexey Pelykh 提交于
      OMAP/serial: Fix incorrect Rx FIFO threshold setting, LSR validation on Tx, and Tx FIFO IRQ generation
      
      Original configuration of Rx FIFO threshold contained an error
      that resulted Rx threshold to be effectively set to 1 character
      instead of 16 characters, as noted in comments.
      Checking LSR to contain UART_LSR_THRE bit set caused issue when
      not all UART_IER_THRI interrupts have been properly handled.
      This caused gap in Tx data, visible on high baud rates using
      oscilloscope.
      Setting OMAP_UART_SCR_TX_EMPTY bit in SCR caused UART_IER_THRI
      interrupt to be raised only when Tx FIFO and Tx shift registers
      are empty.
      Signed-off-by: NAlexey Pelykh <alexey.pelykh@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1776fd05
  22. 18 1月, 2013 1 次提交
    • A
      OMAP/serial: Support 1Mbaud and similar baudrates that require Mode16 instead of Mode13 · 5fe21236
      Alexey Pelykh 提交于
      Original table in OMAP TRM named "UART Mode Baud Rates, Divisor
      Values, and Error Rates" determines modes not for all common baud
      rates. E.g. for 1000000 baud rate mode should be 16x, but according to
      that table it's determined as 13x. According to current implementation
      of mode divisor selection, after requesting 1000000 baudrate from
      driver, later one will configure chip to use MODE13 divisor. Assuming
      48Mhz as common UART clock speed, MODE13 divisor will effectively give
      1230769 baudrate, what is quite far from desired 1000000 baudrate.
      While with MODE16 divisor, chip will produce exact 1000000 baudrate.
      In old driver that served UART devices (8250.c and serial_core.c) this
      divisor could have been configured by user-space program, but in
      omap_serial.c driver implementation this ability was not implemented
      (afaik, by design) thus disallowing proper usage of MODE16-compatible
      baudrates.
      Signed-off-by: NAlexey Pelykh <alexey.pelykh@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5fe21236
  23. 16 1月, 2013 2 次提交
  24. 15 12月, 2012 1 次提交
  25. 22 11月, 2012 2 次提交