1. 01 5月, 2016 7 次提交
  2. 07 2月, 2016 1 次提交
    • M
      serial: imx: Fix suspend / resume. · 29add68d
      Martin Fuzzey 提交于
      When a non console i.MX UART is enabled in the device tree,
      system suspend fails due to an unprepared clock:
      
      [  638.794563] PM: Syncing filesystems ... done.
      [  638.878902] Freezing user space processes ... (elapsed 0.002 seconds) done.
      [  638.888454] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
      [  638.996697] PM: suspend of devices complete after 97.200 msecs
      [  639.002611] PM: suspend devices took 0.100 seconds
      [  639.013020] PM: late suspend of devices complete after 2.288 msecs
      [  639.021486] ------------[ cut here ]------------
      [  639.026147] WARNING: CPU: 0 PID: 488 at drivers/clk/clk.c:732 clk_core_enable+0xc0/0x12c()
      [  639.034413] Modules linked in:
      [  639.037490] CPU: 0 PID: 488 Comm: system_server Tainted: G        W       4.4.0-rc5-pknbsp-svn2214-atag-v4.4-rc5-121-gebfd9cb #1304
      [  639.049312] Hardware name: Freescale i.MX53 (Device Tree Support)
      [  639.055444] [<c0016d54>] (unwind_backtrace) from [<c00140f8>] (show_stack+0x20/0x24)
      [  639.063199] [<c00140f8>] (show_stack) from [<c02c99a0>] (dump_stack+0x20/0x28)
      [  639.070442] [<c02c99a0>] (dump_stack) from [<c0024ca8>] (warn_slowpath_common+0x88/0xc0)
      [  639.078541] [<c0024ca8>] (warn_slowpath_common) from [<c0024d0c>] (warn_slowpath_null+0x2c/0x34)
      [  639.087332] [<c0024d0c>] (warn_slowpath_null) from [<c05171e8>] (clk_core_enable+0xc0/0x12c)
      [  639.095777] [<c05171e8>] (clk_core_enable) from [<c05172f8>] (clk_enable+0x2c/0x40)
      [  639.103441] [<c05172f8>] (clk_enable) from [<c0349880>] (imx_serial_port_suspend_noirq+0x20/0xe0)
      [  639.112336] [<c0349880>] (imx_serial_port_suspend_noirq) from [<c03a26a0>] (dpm_run_callback+0x68/0x16c)
      [  639.121825] [<c03a26a0>] (dpm_run_callback) from [<c03a2898>] (__device_suspend_noirq+0xf4/0x22c)
      [  639.130705] [<c03a2898>] (__device_suspend_noirq) from [<c03a4b0c>] (dpm_suspend_noirq+0x148/0x30c)
      [  639.139764] [<c03a4b0c>] (dpm_suspend_noirq) from [<c00511d4>] (suspend_devices_and_enter+0x2e8/0x6a4)
      [  639.149078] [<c00511d4>] (suspend_devices_and_enter) from [<c00518a0>] (pm_suspend+0x310/0x4b8)
      [  639.157782] [<c00518a0>] (pm_suspend) from [<c00500ec>] (state_store+0x7c/0xcc)
      [  639.165099] [<c00500ec>] (state_store) from [<c02cb6dc>] (kobj_attr_store+0x1c/0x28)
      [  639.172858] [<c02cb6dc>] (kobj_attr_store) from [<c01633d4>] (sysfs_kf_write+0x54/0x58)
      [  639.180871] [<c01633d4>] (sysfs_kf_write) from [<c01629b4>] (kernfs_fop_write+0x100/0x1c8)
      [  639.189152] [<c01629b4>] (kernfs_fop_write) from [<c00fb8b8>] (__vfs_write+0x3c/0xe8)
      [  639.196991] [<c00fb8b8>] (__vfs_write) from [<c00fc810>] (vfs_write+0xa4/0x160)
      [  639.204307] [<c00fc810>] (vfs_write) from [<c00fcac4>] (SyS_write+0x4c/0x98)
      [  639.211363] [<c00fcac4>] (SyS_write) from [<c0010760>] (ret_fast_syscall+0x0/0x3c)
      
      This does not happen for the common case of a single UART used as a console
      (since imx_console_setup() already does a prepare)
      Signed-off-by: NMartin Fuzzey <mfuzzey@parkeon.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      29add68d
  3. 14 12月, 2015 4 次提交
  4. 05 10月, 2015 9 次提交
  5. 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
  6. 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
  7. 28 7月, 2015 1 次提交
  8. 24 7月, 2015 5 次提交
  9. 25 5月, 2015 1 次提交
  10. 11 5月, 2015 1 次提交
  11. 07 5月, 2015 2 次提交
  12. 11 3月, 2015 1 次提交
  13. 07 3月, 2015 3 次提交