diff options
author | Seungwon Jeon <tgih.jun@samsung.com> | 2012-04-25 03:17:37 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-05-09 10:03:21 -0400 |
commit | 96cf5f02aee8bbeff38824b18b9ec583d687f846 (patch) | |
tree | 68ed153cae55296eab933bb1b39562510006f14e /include/linux/mmc | |
parent | c0a120a4bc68f5dc5f5238e76013cc18bac0ffed (diff) |
mmc: core: fix the decision of HS200/DDR card-type
Current implementation decides the card type exclusively. Even though
eMMC device can support both HS200 and DDR mode, card type will be
set only for HS200. If the host doesn't support HS200 but has DDR
capability, then DDR mode can't be selected.
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r-- | include/linux/mmc/card.h | 4 | ||||
-rw-r--r-- | include/linux/mmc/mmc.h | 60 |
2 files changed, 4 insertions, 60 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 629b823f8836..d76513b5b263 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -58,6 +58,10 @@ struct mmc_ext_csd { | |||
58 | unsigned int generic_cmd6_time; /* Units: 10ms */ | 58 | unsigned int generic_cmd6_time; /* Units: 10ms */ |
59 | unsigned int power_off_longtime; /* Units: ms */ | 59 | unsigned int power_off_longtime; /* Units: ms */ |
60 | unsigned int hs_max_dtr; | 60 | unsigned int hs_max_dtr; |
61 | #define MMC_HIGH_26_MAX_DTR 26000000 | ||
62 | #define MMC_HIGH_52_MAX_DTR 52000000 | ||
63 | #define MMC_HIGH_DDR_MAX_DTR 52000000 | ||
64 | #define MMC_HS200_MAX_DTR 200000000 | ||
61 | unsigned int sectors; | 65 | unsigned int sectors; |
62 | unsigned int card_type; | 66 | unsigned int card_type; |
63 | unsigned int hc_erase_size; /* In sectors */ | 67 | unsigned int hc_erase_size; /* In sectors */ |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index b822a2cb6008..d425cab144d9 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -354,66 +354,6 @@ struct _mmc_csd { | |||
354 | #define EXT_CSD_CARD_TYPE_SDR_1_2V (1<<5) /* Card can run at 200MHz */ | 354 | #define EXT_CSD_CARD_TYPE_SDR_1_2V (1<<5) /* Card can run at 200MHz */ |
355 | /* SDR mode @1.2V I/O */ | 355 | /* SDR mode @1.2V I/O */ |
356 | 356 | ||
357 | #define EXT_CSD_CARD_TYPE_SDR_200 (EXT_CSD_CARD_TYPE_SDR_1_8V | \ | ||
358 | EXT_CSD_CARD_TYPE_SDR_1_2V) | ||
359 | |||
360 | #define EXT_CSD_CARD_TYPE_SDR_ALL (EXT_CSD_CARD_TYPE_SDR_200 | \ | ||
361 | EXT_CSD_CARD_TYPE_52 | \ | ||
362 | EXT_CSD_CARD_TYPE_26) | ||
363 | |||
364 | #define EXT_CSD_CARD_TYPE_SDR_1_2V_ALL (EXT_CSD_CARD_TYPE_SDR_1_2V | \ | ||
365 | EXT_CSD_CARD_TYPE_52 | \ | ||
366 | EXT_CSD_CARD_TYPE_26) | ||
367 | |||
368 | #define EXT_CSD_CARD_TYPE_SDR_1_8V_ALL (EXT_CSD_CARD_TYPE_SDR_1_8V | \ | ||
369 | EXT_CSD_CARD_TYPE_52 | \ | ||
370 | EXT_CSD_CARD_TYPE_26) | ||
371 | |||
372 | #define EXT_CSD_CARD_TYPE_SDR_1_2V_DDR_1_8V (EXT_CSD_CARD_TYPE_SDR_1_2V | \ | ||
373 | EXT_CSD_CARD_TYPE_DDR_1_8V | \ | ||
374 | EXT_CSD_CARD_TYPE_52 | \ | ||
375 | EXT_CSD_CARD_TYPE_26) | ||
376 | |||
377 | #define EXT_CSD_CARD_TYPE_SDR_1_8V_DDR_1_8V (EXT_CSD_CARD_TYPE_SDR_1_8V | \ | ||
378 | EXT_CSD_CARD_TYPE_DDR_1_8V | \ | ||
379 | EXT_CSD_CARD_TYPE_52 | \ | ||
380 | EXT_CSD_CARD_TYPE_26) | ||
381 | |||
382 | #define EXT_CSD_CARD_TYPE_SDR_1_2V_DDR_1_2V (EXT_CSD_CARD_TYPE_SDR_1_2V | \ | ||
383 | EXT_CSD_CARD_TYPE_DDR_1_2V | \ | ||
384 | EXT_CSD_CARD_TYPE_52 | \ | ||
385 | EXT_CSD_CARD_TYPE_26) | ||
386 | |||
387 | #define EXT_CSD_CARD_TYPE_SDR_1_8V_DDR_1_2V (EXT_CSD_CARD_TYPE_SDR_1_8V | \ | ||
388 | EXT_CSD_CARD_TYPE_DDR_1_2V | \ | ||
389 | EXT_CSD_CARD_TYPE_52 | \ | ||
390 | EXT_CSD_CARD_TYPE_26) | ||
391 | |||
392 | #define EXT_CSD_CARD_TYPE_SDR_1_2V_DDR_52 (EXT_CSD_CARD_TYPE_SDR_1_2V | \ | ||
393 | EXT_CSD_CARD_TYPE_DDR_52 | \ | ||
394 | EXT_CSD_CARD_TYPE_52 | \ | ||
395 | EXT_CSD_CARD_TYPE_26) | ||
396 | |||
397 | #define EXT_CSD_CARD_TYPE_SDR_1_8V_DDR_52 (EXT_CSD_CARD_TYPE_SDR_1_8V | \ | ||
398 | EXT_CSD_CARD_TYPE_DDR_52 | \ | ||
399 | EXT_CSD_CARD_TYPE_52 | \ | ||
400 | EXT_CSD_CARD_TYPE_26) | ||
401 | |||
402 | #define EXT_CSD_CARD_TYPE_SDR_ALL_DDR_1_8V (EXT_CSD_CARD_TYPE_SDR_200 | \ | ||
403 | EXT_CSD_CARD_TYPE_DDR_1_8V | \ | ||
404 | EXT_CSD_CARD_TYPE_52 | \ | ||
405 | EXT_CSD_CARD_TYPE_26) | ||
406 | |||
407 | #define EXT_CSD_CARD_TYPE_SDR_ALL_DDR_1_2V (EXT_CSD_CARD_TYPE_SDR_200 | \ | ||
408 | EXT_CSD_CARD_TYPE_DDR_1_2V | \ | ||
409 | EXT_CSD_CARD_TYPE_52 | \ | ||
410 | EXT_CSD_CARD_TYPE_26) | ||
411 | |||
412 | #define EXT_CSD_CARD_TYPE_SDR_ALL_DDR_52 (EXT_CSD_CARD_TYPE_SDR_200 | \ | ||
413 | EXT_CSD_CARD_TYPE_DDR_52 | \ | ||
414 | EXT_CSD_CARD_TYPE_52 | \ | ||
415 | EXT_CSD_CARD_TYPE_26) | ||
416 | |||
417 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ | 357 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ |
418 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ | 358 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ |
419 | #define EXT_CSD_BUS_WIDTH_8 2 /* Card is in 8 bit mode */ | 359 | #define EXT_CSD_BUS_WIDTH_8 2 /* Card is in 8 bit mode */ |