android_kernel_oneplus_msm8998/include/linux/mmc
Vijay Viswanath 4753be8c45 mmc: core: hibernation support for mmc cards
eMMC is the storage device for hibernation image. As such it needs
to be working when hibernation image is created and written. Also for
loading hibernation image after reboot, eMMC driver needs to be
probed and running.

During reboot,  kernel comes up and does its own eMMC probe and sets
speed for eMMC. A late system call then checks for hibernation image.
If there is a hibernation image, the current kernel will stay only
temporarily.
Once the hibernation image is found and loaded, the temporary kernel
suspends the eMMC device and then gives control to kernel in
hibernation image.
The hibernation image then restores the eMMC device based on the eMMC
driver state saved just before creating hibernation image.
This gives rise to a possible missmatch between the HW state of eMMC
(Specifically the bus speed) when temporary kernel suspends it and the
state driver restores after hibernation restore.
So a synchornization has been done by making the eMMC run in max speed
during:
	1. Just before hibernation image is created (So the driver state
	in hibernation image will be for max speed mode).
	2. After reboot, just before temporary kernel loads image and
	suspends (so the mmc driver in temporary kernel will put the
	eMMC in suspend while HW state is in highest speed mode.
This ensures that the HW state, mmc_resume post the hibernation
expects, will be same as the HW state actually present in the eMMC
at the point of hibernation restore.

This also ensures we save the hibernation image in max performance and
we restore the hibernation image also in max performance.

Change-Id: Ia9deceacade97ac89e4f25b40ce074d75bbb2bbc
Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org>
2018-06-22 10:55:19 -07:00
..
boot.h
card.h Merge branch 'android-4.4@c71ad0f' into branch 'msm-4.4' 2017-04-20 15:19:15 -07:00
core.h mmc: core: hibernation support for mmc cards 2018-06-22 10:55:19 -07:00
dw_mmc.h
host.h mmc: core: hibernation support for mmc cards 2018-06-22 10:55:19 -07:00
mmc.h Merge branch 'android-4.4@c71ad0f' into branch 'msm-4.4' 2017-04-20 15:19:15 -07:00
pm.h
ring_buffer.h
sd.h
sdhci-pci-data.h
sdio.h
sdio_func.h This is the 4.4.91 stable release 2017-10-08 10:41:52 +02:00
sdio_ids.h
sh_mmcif.h
sh_mobile_sdhi.h
slot-gpio.h
tmio.h