1. 07 9月, 2012 6 次提交
  2. 06 9月, 2012 2 次提交
  3. 17 8月, 2012 1 次提交
  4. 19 4月, 2012 1 次提交
  5. 10 4月, 2012 1 次提交
    • S
      omap-serial: Fix the error handling in the omap_serial probe · 388bc262
      Shubhrajyoti D 提交于
      The patch does the following
      
      - The pm_runtime_disable is called in the remove not in the error
        case of probe.The patch calls the pm_runtime_disable in the error
        case.
      - Calls pm_runtime_put in the error case.
      - The  up is not freed in the error path. Fix the memory leak by using
        devm_* so that the memory need not be freed in the driver.
      - Also the iounmap is not called fix the same by calling using devm_ioremap.
      - Make the name of the error tags more meaningful.
      
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: Govindraj.R <govindraj.raja@ti.com>
      Signed-off-by: NShubhrajyoti D <shubhrajyoti@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      388bc262
  6. 09 3月, 2012 1 次提交
  7. 10 2月, 2012 3 次提交
    • P
      tty: serial: omap-serial: wakeup latency constraint is in microseconds, not milliseconds · 19723452
      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>
      19723452
    • P
      tty: serial: OMAP: block idle while the UART is transferring data in PIO mode · be4b0281
      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>
      be4b0281
    • P
      tty: serial: OMAP: use a 1-byte RX FIFO threshold in PIO mode · 0ba5f668
      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>
      0ba5f668
  8. 03 2月, 2012 3 次提交
    • 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
  9. 27 1月, 2012 2 次提交
  10. 25 1月, 2012 4 次提交
    • P
      tty: serial: OMAP: transmit FIFO threshold interrupts don't wake the chip · 43cf7c0b
      Paul Walmsley 提交于
      It seems that when the transmit FIFO threshold is reached on OMAP
      UARTs, it does not result in a PRCM wakeup.  This appears to be a
      silicon bug.  This means that if the MPU powerdomain is in a low-power
      state, the MPU will not be awakened to refill the FIFO until the next
      interrupt from another device.
      
      The best solution, at least for the short term, would be for the OMAP
      serial driver to call a OMAP subarchitecture function to prevent the
      MPU powerdomain from entering a low power state while the FIFO has
      data to transmit.  However, we no longer have a clean way to do this,
      since patches that add platform_data function pointers have been
      deprecated by the OMAP maintainer.  So we attempt to work around this
      as well.  The workarounds depend on the setting of CONFIG_CPU_IDLE.
      
      When CONFIG_CPU_IDLE=n, the driver will now only transmit one byte at
      a time.  This causes the transmit FIFO threshold interrupt to stay
      active until there is no more data to be sent.  Thus, the MPU
      powerdomain stays on during transmits.  Aside from that energy
      consumption penalty, each transmitted byte results in a huge number of
      UART interrupts -- about five per byte.  This wastes CPU time and is
      quite inefficient, but is probably the most expedient workaround in
      this case.
      
      When CONFIG_CPU_IDLE=y, there is a slightly more direct workaround:
      the PM QoS constraint can be abused to keep the MPU powerdomain on.
      This results in a normal number of interrupts, but, similar to the
      above workaround, wastes power by preventing the MPU from entering
      WFI.
      
      Future patches are planned for the 3.4 merge window to implement more
      efficient, but also more disruptive, workarounds to these problems.
      
      DMA operation is unaffected by this patch.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Govindraj Raja <govindraj.r@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      43cf7c0b
    • P
      tty: serial: OMAP: ensure FIFO levels are set correctly in non-DMA mode · 0a697b22
      Paul Walmsley 提交于
      Ensure FIFO levels are set correctly in non-DMA mode (the default).
      This patch will cause a receive FIFO threshold interrupt to be raised when
      there is at least one byte in the RX FIFO.  It will also cause a transmit
      FIFO threshold interrupt when there is only one byte remaining in the TX
      FIFO.
      
      These changes fix the receive interrupt problem and part of the
      transmit interrupt problem.  A separate set of issues must be worked
      around for the transmit path to have a basic level of functionality; a
      subsequent patch will address these.
      
      DMA operation is unaffected by this patch.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Govindraj Raja <govindraj.r@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0a697b22
    • S
      omap-serial: make serial_omap_restore_context depend on CONFIG_PM_RUNTIME · b5148856
      Shubhrajyoti D 提交于
      The function serial_omap_restore_context is called only from
      serial_omap_runtime_resume which depends on CONFIG_PM_RUNTIME. Make
      serial_omap_restore_context also compile conditionally.
      
      if CONFIG_PM_RUNTIME is not defined below warn may be seen.
      
        LD      net/xfrm/built-in.o
      drivers/tty/serial/omap-serial.c:1524: warning: 'serial_omap_restore_context' defined but not used
        CC      drivers/tty/vt/selection.o
      Acked-by: NGovindraj.R <govindraj.raja@ti.com>
      Signed-off-by: NShubhrajyoti D <shubhrajyoti@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b5148856
    • S
      omap-serial :Make the suspend/resume functions depend on CONFIG_PM_SLEEP. · 3bc4f0d8
      Shubhrajyoti D 提交于
          The macro SET_SYSTEM_SLEEP_PM_OPS  depends CONFIG_PM_SLEEP. The patch
          defines the suspend and resume functions for CONFIG_PM_SLEEP instead of
          CONFIG_SUSPEND.
      Signed-off-by: NShubhrajyoti D <shubhrajyoti@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3bc4f0d8
  11. 17 12月, 2011 3 次提交
  12. 15 12月, 2011 13 次提交
    • 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
    • J
      ARM: OMAP2+: UART: Make the RX_TIMEOUT for DMA configurable for each UART · a9e210e0
      Jon Hunter 提交于
      When using DMA there are two timeouts defined. The first timeout,
      rx_timeout, is really a polling rate in which software polls the
      DMA status to see if the DMA has finished. This is necessary for
      the RX side because we do not know how much data we will receive.
      The secound timeout, RX_TIMEOUT, is a timeout after which the
      DMA will be stopped if no more data is received. To make this
      clearer, rename rx_timeout as rx_poll_rate and rename the
      function serial_omap_rx_timeout() to serial_omap_rxdma_poll().
      
      The OMAP-Serial driver defines an RX_TIMEOUT of 3 seconds that is
      used to indicate when the DMA for UART can be stopped if no more
      data is received. The value is a global definition that is applied
      to all instances of the UART.
      
      Each UART may be used for a different purpose and so the timeout
      required may differ. Make this value configurable for each UART so
      that this value can be optimised for power savings.
      Signed-off-by: NJon Hunter <jon-hunter@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>
      a9e210e0
    • D
      ARM: OMAP2+: UART: Allow UART parameters to be configured from board file. · c86845db
      Deepak K 提交于
      The following UART parameters are defined within the UART driver:
      
      1). Whether the UART uses DMA (dma_enabled), by default set to 0
      2). The size of dma buffer (set to 4096 bytes)
      3). The time after which the dma should stop if no more data is received.
      4). The auto suspend delay that will be passed for pm_runtime_autosuspend
          where uart will be disabled after timeout
      
      Different UARTs may be used for different purpose such as the console,
      for interfacing bluetooth chip, for interfacing to a modem chip, etc.
      Therefore, it is necessary to be able to customize the above settings
      for a given board on a per UART basis.
      
      This change allows these parameters to be configured from the board file
      and allows the parameters to be configured for each UART independently.
      
      If a board does not define its own custom parameters for the UARTs, then
      use the default parameters in the structure "omap_serial_default_info".
      The default parameters are defined to be the same as the current settings
      in the UART driver to avoid breaking the UART for any cuurnelty supported
      boards. By default, make all boards use the default UART parameters.
      Signed-off-by: NDeepak K <deepak.k@ti.com>
      Signed-off-by: NJon Hunter <jon-hunter@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>
      c86845db
    • G
      ARM: OMAP2+: UART: Add wakeup mechanism for omap-uarts · 62f3ec5f
      Govindraj.R 提交于
      From the runtime callbacks enable hwmod wakeups for uart which will
      internally enable io-pad wakeups for uarts if they have rx-pad pins
      set as wakeup capabale.
      
      Use the io-ring wakeup mechanism after uart clock gating and leave
      the PM_WKST set for uart to default reset values cleanup the
      code in serial.c which was handling PM_WKST reg.
      Irq_chaing(PRM_DRIVER) is used to wakeup uart after uart clocks are gated
      using pad wakeup mechanism.
      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>
      62f3ec5f
    • G
      ARM: OMAP2+: UART: Move errata handling from serial.c to omap-serial · 94734749
      Govindraj.R 提交于
      Move the errata handling mechanism from serial.c to omap-serial file
      and utilise the same func in driver file.
      
      Errata i202, i291 are moved to be handled with omap-serial
      Moving the errata macro from serial.c file to driver header file
      as from on errata will be handled in driver file itself.
      Corrected errata id from chapter reference 2.15 to errata id i291.
      
      Removed errata and dma_enabled fields from omap_uart_state struct
      as they are no more needed with errata handling done within omap-serial.
      Signed-off-by: NGovindraj.R <govindraj.raja@ti.com>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      94734749
    • G
      ARM: OMAP2+: UART: Get context loss count to context restore · ec3bebc6
      Govindraj.R 提交于
      Avoid unconditional context restore every time we gate uart
      clocks. Check whether context loss happened based on which
      we can context restore uart regs from uart_port structure.
      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>
      ec3bebc6
    • G
      ARM: OMAP2+: UART: Remove uart reset function. · 32212897
      Govindraj.R 提交于
      Remove the uart reset function which is configuring the
      TX empty irq which can now be handled within omap-serial driver.
      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>
      32212897
    • G
      ARM: OMAP2+: UART: Ensure all reg values configured are available from port structure · c538d20c
      Govindraj.R 提交于
      Add missing uart regs to uart_port structure which can be used in
      context restore. Store dll, dlh, mdr1, scr, efr, lcr, mcr reg values
      into uart_port structure while configuring individual port in termios
      function.
      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>
      c538d20c
    • G
      ARM: OMAP2+: UART: Remove context_save and move context restore to driver · 9f9ac1e8
      Govindraj.R 提交于
      Remove context save function from serial.c and move context restore
      function to omap-serial. Remove all regs stored in omap_uart_state
      for contex_save/restore, reg read write funcs used in context_save/restore,
      io_addresses populated for read/write funcs.
      
      Clock gating mechanism was done in serial.c and had no info on uart state
      thus we needed context save and restore in serial.c
      With runtime conversion and clock gating done within uart driver
      context restore can be done from regs value available from uart_omap_port
      structure.
      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>
      9f9ac1e8
    • G
      ARM: OMAP2+: UART: Add runtime pm support for omap-serial driver · fcdca757
      Govindraj.R 提交于
      Adapts omap-serial driver to use pm_runtime API's.
      Use runtime runtime API's to handle uart clocks and obtain
      device_usage statics. Set runtime API's usage to irq_safe so that
      we can use get_sync from irq context. Auto-suspend for port specific
      activities and put for reg access. Moving suspend/resume hooks
      to dev_pm_ops structure and bind with config_suspend to avoid any
      compilation warning if config_suspend is disabled.
      
      By default uart autosuspend delay is set to -1 to avoid character loss
      if uart's are autoidled and woken up on rx pin.
      
      After boot up UART's can be autoidled by setting autosuspend delay from sysfs.
      
      echo 3000 > /sys/devices/platform/omap/omap_uart.X/power/autosuspend_delay_ms
      X=0,1,2,3 for UART1/2/3/4. Number of uarts available may vary across omap_soc.
      
      Also if uart is not wakeup capable we can prevent runtime autosuspend by
      forbiding runtime.
      Signed-off-by: NGovindraj.R <govindraj.raja@ti.com>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      fcdca757
    • G
      ARM: OMAP2+: UART: Remove mapbase/membase fields from pdata. · edd70ad7
      Govindraj.R 提交于
      The mapbase (start_address), membase(io_remap cookie) part of
      pdata struct omap_uart_port_info are removed as this should be
      derived within driver.
      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>
      edd70ad7
    • G
      ARM: OMAP2+: UART: Cleanup part of clock gating mechanism for uart · 273558b3
      Govindraj.R 提交于
      Currently we use a shared irq handler to identify uart activity and then
      trigger a timer. By default the timeout value is zero and can be set or
      modified from sysfs. If there was no uart activity for the period set
      through sysfs, the timer will expire and call timer handler this will
      set a flag can_sleep using which decision to gate uart clocks can be taken.
      
      Since the clock gating mechanism is outside the uart driver, we currently
      use this mechanism. In preparation to runtime implementation for omap-serial
      driver we can cleanup this mechanism and use runtime API's to gate uart clocks.
      
      Removes the following:
      * timer related info from local uart_state struct
      * the code used to set timeout value from sysfs.
      * irqflags used to set shared irq handler.
      * un-used function omap_uart_check_wakeup.
      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>
      273558b3