mmc: Keep track of current hard partition

eMMC may have several hard partitions such as BOOT and RPMB in addition
to the main USER partition. On resume(if card is reinitialized), the
current hard partition is always switched to the default USER partition.
But this switch to default partition is not propagated to the MMC block
driver, which may have set the hard partition to any partition(BOOT/RPMB
other than USER before suspend. After resume, the MMC block driver still
assumes it is accessing the previously set partition(BOOT/RPMB), and
instead overwrites the USER partition(the current selected partition on
the eMMC device). To prevent this, make MMC block driver aware of the
partition switches done as part of card reinitialization.

Change-Id: I941cda866ae54bac248dad33dbaba8c60eec3a1a
Signed-off-by: Oluwafemi Adeyemi <aadeyemi@codeaurora.org>
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Ram Prakash Gupta <rampraka@codeaurora.org>
2 files changed