1. 05 10月, 2015 1 次提交
    • F
      Revert "serial: imx: remove unbalanced clk_prepare" · 0c727a42
      Fabio Estevam 提交于
      This reverts commit 9e7b399d.
      
      Commit ("9e7b399d") causes the following warning and sometimes
      also hangs the system:
      
      ------------[ cut here ]------------
       WARNING: CPU: 0 PID: 0 at kernel/locking/mutex.c:868 mutex_trylock+0x20c/0x22c()
       DEBUG_LOCKS_WARN_ON(in_interrupt())
       Modules linked in:
      CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.2.0-rc7-next-20150818-00001-g14418a6 #4
      Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
      Backtrace:
      [<80012f08>] (dump_backtrace) from [<800130a4>] (show_stack+0x18/0x1c)
      r6:00000364 r5:00000000 r4:00000000 r3:00000000
      [<8001308c>] (show_stack) from [<807902b8>] (dump_stack+0x88/0xa4)
      [<80790230>] (dump_stack) from [<8002a604>] (warn_slowpath_common+0x80/0xbc)
      r5:807945c4 r4:80ab3b50
      [<8002a584>] (warn_slowpath_common) from [<8002a6e4>] (warn_slowpath_fmt+0x38/0x40)
      r8:00000000 r7:8131100c r6:8054c3cc r5:8131300c r4:80b0a570
      [<8002a6b0>] (warn_slowpath_fmt) from [<807945c4>] (mutex_trylock+0x20c/0x22c)
      r3:8095d0d8 r2:8095ab28
      [<807943b8>] (mutex_trylock) from [<8054c3cc>] (clk_prepare_lock+0x14/0xf4)
      r7:8131100c r6:be3f0c80 r5:00000037 r4:be3f0c80
      [<8054c3b8>] (clk_prepare_lock) from [<8054dbfc>] (clk_prepare+0x18/0x30)
      r5:00000037 r4:be3f0c80
      [<8054dbe4>] (clk_prepare) from [<8036a600>] (imx_console_write+0x30/0x244)
      r4:812d0bc8 r3:8132b9a4
      
      To reproduce the problem we only need to let the board idle for something
      like 30 seconds.
      
      Tested on a imx6q-sabresd.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Reviewed-by: NEduardo Valentin <edubezval@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0c727a42
  2. 15 8月, 2015 4 次提交
    • E
      serial: imx: save and restore context in the suspend path · c868cbb7
      Eduardo Valentin 提交于
      This change teaches the imx serial driver to save its
      context and restore it across suspend and resume path.
      To do so, it introduces serial_imx_restore_context()
      and serial_imx_save_context() functions. They use
      a shadow set of registers to save key registers
      and restore them accordingly. These functions can
      be reused on other situations, when the device
      context is lost.
      
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Slaby <jslaby@suse.com>
      Cc: linux-serial@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c868cbb7
    • E
      serial: imx: allow waking up on RTSD · bc85734b
      Eduardo Valentin 提交于
      This patch sets RTSDEN bit when going into idle (Stop mode).
      We add the RTSDEN for the case RTS is sent from
      the remote connection. This way we allow the system
      to wakeup when RTS is received.
      
      Cc: Fabio Stevam <festevam@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Slaby <jslaby@suse.com>
      Cc: linux-serial@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bc85734b
    • E
      serial: imx: introduce serial_imx_enable_wakeup() · 189550b8
      Eduardo Valentin 提交于
      This change is a code reorganization. Here we introduce
      serial_imx_enable_wakeup() helper function to do
      the job of configuring and preparing wakeup sources
      on imx serial device. The idea is to allow other
      parts of the code to call this function whenever
      the device is known to go to idle.
      
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Slaby <jslaby@suse.com>
      Cc: linux-serial@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      189550b8
    • E
      serial: imx: remove unbalanced clk_prepare · 9e7b399d
      Eduardo Valentin 提交于
      The current code attempts to prepare clk_per and clk_ipg
      before using the device. However, the result is an extra
      prepare call on each clock. Here is the output of uart
      clocks (only uart enabled and used as console):
      
      $  grep uart /sys/kernel/debug/clk/clk_summary
       uart_serial           1            2    80000000          0 0
             uart           1            2    66000000          0 0
      
      This patch balances the calls of prepares. The result is:
      
      $  grep uart /sys/kernel/debug/clk/clk_summary
       uart_serial           1            1    80000000          0 0
             uart           1            1    66000000          0 0
      
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Slaby <jslaby@suse.com>
      Cc: linux-serial@vger.kernel.org
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9e7b399d
  3. 04 8月, 2015 1 次提交
    • S
      Serial: imx: add dev_pm_ops to support suspend to ram/disk · 90bb6bd3
      Shenwei Wang 提交于
      When system goes into low power states like SUSPEND_MEM and
      HIBERNATION, the hardware IP block may be powered off to reduce
      the power consumption. This power down may cause problems on
      some imx platforms, because the hardware settings are reset to
      its power on default values which may differ from the ones when
      it power off. This patch added the dev_pm_ops and implemented
      two callbacks: suspend_noirq and resume_noirq, which will save
      the necessory hardware parameters right before power down and
      recover them before system uses the hardware.
      
      Because added the dev_pm_ops, the old suspend/resume callbacks
      under platform_driver will not be called any more. Changed their
      prototypes and moved those two callbacks into dev_pm_ops too.
      Signed-off-by: NShenwei Wang <shenwei.wang@freescale.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      90bb6bd3
  4. 28 7月, 2015 1 次提交
  5. 24 7月, 2015 5 次提交
  6. 25 5月, 2015 1 次提交
  7. 11 5月, 2015 1 次提交
  8. 07 5月, 2015 2 次提交
  9. 11 3月, 2015 1 次提交
  10. 07 3月, 2015 9 次提交
  11. 03 2月, 2015 1 次提交
  12. 10 1月, 2015 13 次提交