diff options
author | Girish K S <girish.shivananjappa@linaro.org> | 2011-09-23 11:11:47 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-10-26 16:32:13 -0400 |
commit | b87d8dbf6c410b5f2d9b6893c85baa06aa131c7c (patch) | |
tree | f478e5378f259bb75158d5cb08cc459c93f30905 /include/linux/mmc | |
parent | 199e3f4b419d045e64d5205a6354c5db04d98553 (diff) |
mmc: core: eMMC 4.5 Power Class Selection Feature
This patch adds the power class selection feature available for mmc
versions 4.0 and above. During the enumeration stage before switching
to the lower data bus, check if the power class is supported for the
current bus width. If the power class is available then switch to the
power class and use the higher data bus. If power class is not supported
then switch to the lower data bus in a worst case.
Signed-off-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/mmc.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index ed8fca890ee2..50af22730c74 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -279,10 +279,15 @@ struct _mmc_csd { | |||
279 | #define EXT_CSD_ERASED_MEM_CONT 181 /* RO */ | 279 | #define EXT_CSD_ERASED_MEM_CONT 181 /* RO */ |
280 | #define EXT_CSD_BUS_WIDTH 183 /* R/W */ | 280 | #define EXT_CSD_BUS_WIDTH 183 /* R/W */ |
281 | #define EXT_CSD_HS_TIMING 185 /* R/W */ | 281 | #define EXT_CSD_HS_TIMING 185 /* R/W */ |
282 | #define EXT_CSD_POWER_CLASS 187 /* R/W */ | ||
282 | #define EXT_CSD_REV 192 /* RO */ | 283 | #define EXT_CSD_REV 192 /* RO */ |
283 | #define EXT_CSD_STRUCTURE 194 /* RO */ | 284 | #define EXT_CSD_STRUCTURE 194 /* RO */ |
284 | #define EXT_CSD_CARD_TYPE 196 /* RO */ | 285 | #define EXT_CSD_CARD_TYPE 196 /* RO */ |
285 | #define EXT_CSD_PART_SWITCH_TIME 199 /* RO */ | 286 | #define EXT_CSD_PART_SWITCH_TIME 199 /* RO */ |
287 | #define EXT_CSD_PWR_CL_52_195 200 /* RO */ | ||
288 | #define EXT_CSD_PWR_CL_26_195 201 /* RO */ | ||
289 | #define EXT_CSD_PWR_CL_52_360 202 /* RO */ | ||
290 | #define EXT_CSD_PWR_CL_26_360 203 /* RO */ | ||
286 | #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ | 291 | #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ |
287 | #define EXT_CSD_S_A_TIMEOUT 217 /* RO */ | 292 | #define EXT_CSD_S_A_TIMEOUT 217 /* RO */ |
288 | #define EXT_CSD_REL_WR_SEC_C 222 /* RO */ | 293 | #define EXT_CSD_REL_WR_SEC_C 222 /* RO */ |
@@ -294,6 +299,11 @@ struct _mmc_csd { | |||
294 | #define EXT_CSD_SEC_ERASE_MULT 230 /* RO */ | 299 | #define EXT_CSD_SEC_ERASE_MULT 230 /* RO */ |
295 | #define EXT_CSD_SEC_FEATURE_SUPPORT 231 /* RO */ | 300 | #define EXT_CSD_SEC_FEATURE_SUPPORT 231 /* RO */ |
296 | #define EXT_CSD_TRIM_MULT 232 /* RO */ | 301 | #define EXT_CSD_TRIM_MULT 232 /* RO */ |
302 | #define EXT_CSD_PWR_CL_200_195 236 /* RO */ | ||
303 | #define EXT_CSD_PWR_CL_200_360 237 /* RO */ | ||
304 | #define EXT_CSD_PWR_CL_DDR_52_195 238 /* RO */ | ||
305 | #define EXT_CSD_PWR_CL_DDR_52_360 239 /* RO */ | ||
306 | #define EXT_CSD_POWER_OFF_LONG_TIME 247 /* RO */ | ||
297 | 307 | ||
298 | /* | 308 | /* |
299 | * EXT_CSD field definitions | 309 | * EXT_CSD field definitions |
@@ -332,6 +342,10 @@ struct _mmc_csd { | |||
332 | #define EXT_CSD_RST_N_EN_MASK 0x3 | 342 | #define EXT_CSD_RST_N_EN_MASK 0x3 |
333 | #define EXT_CSD_RST_N_ENABLED 1 /* RST_n is enabled on card */ | 343 | #define EXT_CSD_RST_N_ENABLED 1 /* RST_n is enabled on card */ |
334 | 344 | ||
345 | #define EXT_CSD_PWR_CL_8BIT_MASK 0xF0 /* 8 bit PWR CLS */ | ||
346 | #define EXT_CSD_PWR_CL_4BIT_MASK 0x0F /* 8 bit PWR CLS */ | ||
347 | #define EXT_CSD_PWR_CL_8BIT_SHIFT 4 | ||
348 | #define EXT_CSD_PWR_CL_4BIT_SHIFT 0 | ||
335 | /* | 349 | /* |
336 | * MMC_SWITCH access modes | 350 | * MMC_SWITCH access modes |
337 | */ | 351 | */ |