diff options
author | Fredrik Soderstedt <fredrik.soderstedt@stericsson.com> | 2013-04-23 10:27:07 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-05-26 14:23:18 -0400 |
commit | 60443712195bbcbbff9af189bdd9d2c1ef0a5cae (patch) | |
tree | 8556da51a7cc4f852f49cca47dff38bec7bee1a6 /include/linux/mmc | |
parent | 07a682160866e302d696f5c76d74024d575fb79d (diff) |
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>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r-- | include/linux/mmc/card.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index f31725ba49f3..6a98f32670b8 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -94,7 +94,11 @@ struct mmc_ext_csd { | |||
94 | u8 raw_ext_csd_structure; /* 194 */ | 94 | u8 raw_ext_csd_structure; /* 194 */ |
95 | u8 raw_card_type; /* 196 */ | 95 | u8 raw_card_type; /* 196 */ |
96 | u8 out_of_int_time; /* 198 */ | 96 | u8 out_of_int_time; /* 198 */ |
97 | u8 raw_s_a_timeout; /* 217 */ | 97 | u8 raw_pwr_cl_52_195; /* 200 */ |
98 | u8 raw_pwr_cl_26_195; /* 201 */ | ||
99 | u8 raw_pwr_cl_52_360; /* 202 */ | ||
100 | u8 raw_pwr_cl_26_360; /* 203 */ | ||
101 | u8 raw_s_a_timeout; /* 217 */ | ||
98 | u8 raw_hc_erase_gap_size; /* 221 */ | 102 | u8 raw_hc_erase_gap_size; /* 221 */ |
99 | u8 raw_erase_timeout_mult; /* 223 */ | 103 | u8 raw_erase_timeout_mult; /* 223 */ |
100 | u8 raw_hc_erase_grp_size; /* 224 */ | 104 | u8 raw_hc_erase_grp_size; /* 224 */ |
@@ -102,6 +106,10 @@ struct mmc_ext_csd { | |||
102 | u8 raw_sec_erase_mult; /* 230 */ | 106 | u8 raw_sec_erase_mult; /* 230 */ |
103 | u8 raw_sec_feature_support;/* 231 */ | 107 | u8 raw_sec_feature_support;/* 231 */ |
104 | u8 raw_trim_mult; /* 232 */ | 108 | u8 raw_trim_mult; /* 232 */ |
109 | u8 raw_pwr_cl_200_195; /* 236 */ | ||
110 | u8 raw_pwr_cl_200_360; /* 237 */ | ||
111 | u8 raw_pwr_cl_ddr_52_195; /* 238 */ | ||
112 | u8 raw_pwr_cl_ddr_52_360; /* 239 */ | ||
105 | u8 raw_bkops_status; /* 246 */ | 113 | u8 raw_bkops_status; /* 246 */ |
106 | u8 raw_sectors[4]; /* 212 - 4 bytes */ | 114 | u8 raw_sectors[4]; /* 212 - 4 bytes */ |
107 | 115 | ||