mmc: core: fix improper clock frequency being passed to set_ios
This bug was introduced in the 'MMC-4.5 Power OFF Notify Rework' fix. Prior to the aforementioned patch, during resume mmc_init_card was being invoked. The aforesaid patch invokes mmc_card_awake, prior to which mmc_power_up has already set the clock frequency to 400Khz. Since the card init is not done again, this frequency stays as is and results in data time-out errors. Two new functions * mmc_save_ios * mmc_restore_ios were added. The mmc_save_ios is invoked during mmc_suspend process and it saves the current ios values, while mmc_restore_ios is invoked during mmc_resume process and restores the previous ios values before sending the awake command. This ensures that the clock, timing, bus-width etc are set properly before any request is sent to the driver. Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
This commit is contained in:
committed by
Stephen Boyd
parent
06d8e2a3ad
commit
460cee698a
@@ -352,6 +352,7 @@ struct mmc_host {
|
||||
} perf;
|
||||
bool perf_enable;
|
||||
#endif
|
||||
struct mmc_ios saved_ios;
|
||||
unsigned long private[0] ____cacheline_aligned;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user