Commit 676a838
mmc: host: sdhci-esdhc-imx: refactor the system PM logic
Current suspend/resume logic has one issue. In suspend, will config
register when call sdhci_suspend_host(), but at this time, can't
guarantee host in runtime resume state. If not, the per clock is gate
off, access register will hang.
In sdhci_esdhc_suspend/sdhci_esdhc_resume, remove sdhci_suspend_host()
and sdhci_resume_host(), all are handled in runtime PM callbacks except
the wakeup irq setting. For wakeup irq setting, use pm_runtime_get_sync()
in sdhci_esdhc_suspend() to make sure clock gate on.
Remove pinctrl_pm_select_default_state() in sdhci_esdhc_resume, because
pm_runtime_force_resume() already config the pinctrl state according to
ios timing, and here config the default pinctrl state again is wrong for
SDIO3.0 device if it keep power in suspend.
Signed-off-by: Haibo Chen <[email protected]>
Signed-off-by: Luke Wang <[email protected]>
Acked-by: Adrian Hunter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ulf Hansson <[email protected]>1 parent b8b0f46 commit 676a838
1 file changed
+30
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2009 | 2009 | | |
2010 | 2010 | | |
2011 | 2011 | | |
2012 | | - | |
2013 | | - | |
2014 | | - | |
2015 | | - | |
2016 | | - | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
2017 | 2020 | | |
2018 | 2021 | | |
2019 | 2022 | | |
2020 | 2023 | | |
2021 | 2024 | | |
2022 | 2025 | | |
2023 | 2026 | | |
2024 | | - | |
2025 | | - | |
2026 | | - | |
2027 | 2027 | | |
2028 | 2028 | | |
2029 | 2029 | | |
| |||
2033 | 2033 | | |
2034 | 2034 | | |
2035 | 2035 | | |
2036 | | - | |
2037 | | - | |
2038 | | - | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
2039 | 2043 | | |
2040 | 2044 | | |
2041 | 2045 | | |
2042 | 2046 | | |
2043 | 2047 | | |
2044 | 2048 | | |
2045 | 2049 | | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
2046 | 2056 | | |
2047 | 2057 | | |
2048 | 2058 | | |
| |||
2053 | 2063 | | |
2054 | 2064 | | |
2055 | 2065 | | |
2056 | | - | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
2057 | 2069 | | |
2058 | 2070 | | |
2059 | 2071 | | |
2060 | 2072 | | |
2061 | 2073 | | |
2062 | 2074 | | |
2063 | | - | |
2064 | | - | |
2065 | | - | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
2066 | 2079 | | |
2067 | 2080 | | |
2068 | 2081 | | |
| |||
2072 | 2085 | | |
2073 | 2086 | | |
2074 | 2087 | | |
2075 | | - | |
2076 | | - | |
2077 | | - | |
2078 | | - | |
2079 | | - | |
| 2088 | + | |
| 2089 | + | |
2080 | 2090 | | |
2081 | 2091 | | |
2082 | 2092 | | |
| |||
0 commit comments