diff options
author | Dave Gerlach <d-gerlach@ti.com> | 2017-03-30 21:58:18 +0200 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2017-04-04 17:49:56 +0200 |
commit | 04abaf07f6d5cdf22b7a478a86e706dfeeeef960 (patch) | |
tree | e8b65f037bd72c88dbeb5e2c3887eb6a463dedf4 /Documentation/hwspinlock.txt | |
parent | ARM: omap2+: Revert omap-smp.c changes resetting CPU1 during boot (diff) | |
download | linux-04abaf07f6d5cdf22b7a478a86e706dfeeeef960.tar.xz linux-04abaf07f6d5cdf22b7a478a86e706dfeeeef960.zip |
ARM: OMAP2+: omap_device: Sync omap_device and pm_runtime after probe defer
Starting from commit 5de85b9d57ab ("PM / runtime: Re-init runtime PM
states at probe error and driver unbind") pm_runtime core now changes
device runtime_status back to after RPM_SUSPENDED after a probe defer.
Certain OMAP devices make use of "ti,no-idle-on-init" flag which causes
omap_device_enable to be called during the BUS_NOTIFY_ADD_DEVICE event
during probe, along with pm_runtime_set_active.
This call to pm_runtime_set_active typically will prevent a call to
pm_runtime_get in a driver probe function from re-enabling the
omap_device. However, in the case of a probe defer that happens before
the driver probe function is able to run, such as a missing pinctrl
states defer, pm_runtime_reinit will set the device as RPM_SUSPENDED and
then once driver probe is actually able to run, pm_runtime_get will see
the device as suspended and call through to the omap_device layer,
attempting to enable the already enabled omap_device and causing errors
like this:
omap-gpmc 50000000.gpmc: omap_device: omap_device_enable() called from
invalid state 1
omap-gpmc 50000000.gpmc: use pm_runtime_put_sync_suspend() in driver?
We can avoid this error by making sure the pm_runtime status of a device
matches the omap_device state before a probe attempt. By extending the
omap_device bus notifier to act on the BUS_NOTIFY_BIND_DRIVER event we
can check if a device is enabled in omap_device but with a pm_runtime
status of RPM_SUSPENDED and once again mark the device as RPM_ACTIVE to
avoid a second incorrect call to omap_device_enable.
Fixes: 5de85b9d57ab ("PM / runtime: Re-init runtime PM states at probe
error and driver unbind")
Tested-by: Franklin S Cooper Jr. <fcooper@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'Documentation/hwspinlock.txt')
0 files changed, 0 insertions, 0 deletions