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>
2 files changed