MLK-12462-1 mmc: core: add MMC_PM_IGNORE_PM_NOTIFY feature
With igore pm notify feature, MMC core will not re-detect card
after system suspend/resume. This is needed for some special cards
like Broadcom WiFi which can't work propertly on card re-detect
after system resume.
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
(cherry picked from commit 3a4a074d2e
)
pull/10/head
parent
c9db921d88
commit
f4e6824280
|
@ -75,6 +75,9 @@ Optional SDIO properties:
|
|||
- keep-power-in-suspend: Preserves card power during a suspend/resume cycle
|
||||
- wakeup-source: Enables wake up of host system on SDIO IRQ assertion
|
||||
(Legacy property supported: "enable-sdio-wakeup")
|
||||
- pm-ignore-notify: Ignore mmc PM notify. This will prevent MMC core automatically
|
||||
to re-detect cards after sysem resume back.
|
||||
|
||||
|
||||
MMC power
|
||||
---------
|
||||
|
|
|
@ -305,6 +305,8 @@ int mmc_of_parse(struct mmc_host *host)
|
|||
host->pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
|
||||
if (device_property_read_bool(dev, "mmc-ddr-3_3v"))
|
||||
host->caps |= MMC_CAP_3_3V_DDR;
|
||||
if (device_property_read_bool(dev, "pm-ignore-notify"))
|
||||
host->pm_caps |= MMC_PM_IGNORE_PM_NOTIFY;
|
||||
if (device_property_read_bool(dev, "mmc-ddr-1_8v"))
|
||||
host->caps |= MMC_CAP_1_8V_DDR;
|
||||
if (device_property_read_bool(dev, "mmc-ddr-1_2v"))
|
||||
|
@ -429,7 +431,8 @@ int mmc_add_host(struct mmc_host *host)
|
|||
#endif
|
||||
|
||||
mmc_start_host(host);
|
||||
mmc_register_pm_notifier(host);
|
||||
if (!(host->pm_caps& MMC_PM_IGNORE_PM_NOTIFY))
|
||||
mmc_register_pm_notifier(host);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -446,7 +449,8 @@ EXPORT_SYMBOL(mmc_add_host);
|
|||
*/
|
||||
void mmc_remove_host(struct mmc_host *host)
|
||||
{
|
||||
mmc_unregister_pm_notifier(host);
|
||||
if (!(host->pm_caps& MMC_PM_IGNORE_PM_NOTIFY))
|
||||
mmc_unregister_pm_notifier(host);
|
||||
mmc_stop_host(host);
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
|
|
|
@ -26,5 +26,6 @@ typedef unsigned int mmc_pm_flag_t;
|
|||
|
||||
#define MMC_PM_KEEP_POWER (1 << 0) /* preserve card power during suspend */
|
||||
#define MMC_PM_WAKE_SDIO_IRQ (1 << 1) /* wake up host system on SDIO IRQ assertion */
|
||||
#define MMC_PM_IGNORE_PM_NOTIFY (1 << 2) /* ignore mmc pm notify */
|
||||
|
||||
#endif /* LINUX_MMC_PM_H */
|
||||
|
|
Loading…
Reference in New Issue