diff options
| author | Grygorii Strashko <[email protected]> | 2013-07-22 15:31:15 +0530 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2013-07-26 16:01:20 -0700 |
| commit | 3026d14a98d50c78e74d072cb05340a0f86b3938 (patch) | |
| tree | 041771561e628aa91a7366e4dbc19167151f9c95 /include/linux/timerqueue.h | |
| parent | 39c34b09f2fdb56c94891d5dd7ed4341d845cde5 (diff) | |
serial: omap: enable PM runtime only when its fully configured
If earlyprintk is enabled and current UART is console port the platform
code can mark it as RPM_ACTIVE to sync real IP state with PM Runtime and
avoid resuming of already active device, but now, driver initialization
will be performed in the wrong way:
pm_runtime_enable(&pdev->dev);
<-- PM runtime alowed (device state RPM_ACTIVE)
if (omap_up_info->autosuspend_timeout == 0)
omap_up_info->autosuspend_timeout = -1;
device_init_wakeup(up->dev, true);
pm_runtime_use_autosuspend(&pdev->dev);
<-- update_autosuspend() will be called and it will disable device
(device state RPM_SUSPENDED)
pm_runtime_set_autosuspend_delay(&pdev->dev,
omap_up_info->autosuspend_timeout);
<-- update_autosuspend() will be called which will re-enable device
(device state RPM_ACTIVE), because autosuspend_timeout < 0
pm_runtime_irq_safe(&pdev->dev);
pm_runtime_get_sync(&pdev->dev);
<-- will do nothing
Such behavior isn't expected by OMAP serial drivers and causes
unpredictable calls of serial_omap_runtime_suspend() and
serial_omap_runtime_resume().
Hence, fix it by allowing PM runtime only after all its parameters are
configured.
CC: Tony Lindgren <[email protected]>
CC: Rajendra Nayak <[email protected]>
CC: Felipe Balbi <[email protected]>
CC: Kevin Hilman <[email protected]>
Tested-by: Mark Jackson <[email protected]>
Signed-off-by: Grygorii Strashko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions