mmc: core: Fix select power class after resume
authorFredrik Soderstedt <fredrik.soderstedt@stericsson.com>
Tue, 23 Apr 2013 14:27:07 +0000 (16:27 +0200)
committerlintao <lintao@rock-chips.com>
Fri, 7 Mar 2014 04:48:57 +0000 (12:48 +0800)
commit65cdca44726f197895845bd19c4fe17d2ba95b25
tree1b1329380c0cd21382bdcd80414256da22c31156
parentd7b8a89726f3b830243baa248c5d08a879c36a8e
mmc: core: Fix select power class after resume

Use the saved values in card->ext_csd when selecting power class.
By doing this the power class will be selected even if mmc_init_card
is called with oldcard != NULL, which is the case after a suspend/resume.

Today ext_csd is NULL if mmc_init_card is called with oldcard != NULL
and power class will not be selected.

According to the eMMC specification the POWER_CLASS value is reset after
power failure, H/W reset assertion and any CMD0 reset.

Signed-off-by: Fredrik Soderstedt <fredrik.soderstedt@stericsson.com>
Reviewed-by: Johan Rudholm <jrudholm@gmail.com>
Acked By: Girish K S <girish.shivananjappa@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/mmc.c
include/linux/mmc/card.h