mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
mmc: rework selection of bus speed mode
Current implementation for bus speed mode selection is too complicated. This patch is to simplify the codes and remove some duplicate parts. The following changes are including: * Adds functions for each mode selection(HS, HS-DDR, HS200 and etc) * Rearranged the mode selection sequence with supported device type * Adds maximum speed for HS200 mode(hs200_max_dtr) * Adds field definition for HS_TIMING of EXT_CSD Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> Tested-by: Jaehoon Chung <jh80.chung@samsung.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <chris@printf.net>
This commit is contained in:
parent
2385049dd5
commit
577fb13199
4 changed files with 238 additions and 200 deletions
|
@ -63,6 +63,7 @@ struct mmc_ext_csd {
|
|||
unsigned int power_off_longtime; /* Units: ms */
|
||||
u8 power_off_notification; /* state */
|
||||
unsigned int hs_max_dtr;
|
||||
unsigned int hs200_max_dtr;
|
||||
#define MMC_HIGH_26_MAX_DTR 26000000
|
||||
#define MMC_HIGH_52_MAX_DTR 52000000
|
||||
#define MMC_HIGH_DDR_MAX_DTR 52000000
|
||||
|
|
|
@ -377,6 +377,10 @@ struct _mmc_csd {
|
|||
#define EXT_CSD_DDR_BUS_WIDTH_4 5 /* Card is in 4 bit DDR mode */
|
||||
#define EXT_CSD_DDR_BUS_WIDTH_8 6 /* Card is in 8 bit DDR mode */
|
||||
|
||||
#define EXT_CSD_TIMING_BC 0 /* Backwards compatility */
|
||||
#define EXT_CSD_TIMING_HS 1 /* High speed */
|
||||
#define EXT_CSD_TIMING_HS200 2 /* HS200 */
|
||||
|
||||
#define EXT_CSD_SEC_ER_EN BIT(0)
|
||||
#define EXT_CSD_SEC_BD_BLK_EN BIT(2)
|
||||
#define EXT_CSD_SEC_GB_CL_EN BIT(4)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue