diff options
author | Qiang Liu <qiang.liu@freescale.com> | 2011-11-08 08:43:08 -0500 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-01-11 23:58:40 -0500 |
commit | fffe5d5aa05b4e69f79bc75a51c5ee0fc6203fa5 (patch) | |
tree | 14dc8ca78f108faf20057a8853df216701621ad6 | |
parent | 8d362b0dea1a35bea8d7d281317eb7ccb713edcb (diff) |
mmc: sd: Macro name cleanup for high speed dtr
Add new macros for the high speed 50MHz case, rather than having
a confusing reuse of the value for UHS SDR50, which is 100MHz.
Reported-by: Aaron Lu <aaron.lu@amd.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r-- | drivers/mmc/core/sd.c | 4 | ||||
-rw-r--r-- | include/linux/mmc/card.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index f2a05ea40f2a..f54392c4638a 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c | |||
@@ -307,8 +307,8 @@ static int mmc_read_switch(struct mmc_card *card) | |||
307 | goto out; | 307 | goto out; |
308 | } | 308 | } |
309 | 309 | ||
310 | if (status[13] & UHS_SDR50_BUS_SPEED) | 310 | if (status[13] & SD_MODE_HIGH_SPEED) |
311 | card->sw_caps.hs_max_dtr = 50000000; | 311 | card->sw_caps.hs_max_dtr = HIGH_SPEED_MAX_DTR; |
312 | 312 | ||
313 | if (card->scr.sda_spec3) { | 313 | if (card->scr.sda_spec3) { |
314 | card->sw_caps.sd3_bus_mode = status[13]; | 314 | card->sw_caps.sd3_bus_mode = status[13]; |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index c8ef9bc54d50..2c9be29684cf 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -110,6 +110,7 @@ struct sd_ssr { | |||
110 | struct sd_switch_caps { | 110 | struct sd_switch_caps { |
111 | unsigned int hs_max_dtr; | 111 | unsigned int hs_max_dtr; |
112 | unsigned int uhs_max_dtr; | 112 | unsigned int uhs_max_dtr; |
113 | #define HIGH_SPEED_MAX_DTR 50000000 | ||
113 | #define UHS_SDR104_MAX_DTR 208000000 | 114 | #define UHS_SDR104_MAX_DTR 208000000 |
114 | #define UHS_SDR50_MAX_DTR 100000000 | 115 | #define UHS_SDR50_MAX_DTR 100000000 |
115 | #define UHS_DDR50_MAX_DTR 50000000 | 116 | #define UHS_DDR50_MAX_DTR 50000000 |
@@ -117,11 +118,13 @@ struct sd_switch_caps { | |||
117 | #define UHS_SDR12_MAX_DTR 25000000 | 118 | #define UHS_SDR12_MAX_DTR 25000000 |
118 | unsigned int sd3_bus_mode; | 119 | unsigned int sd3_bus_mode; |
119 | #define UHS_SDR12_BUS_SPEED 0 | 120 | #define UHS_SDR12_BUS_SPEED 0 |
121 | #define HIGH_SPEED_BUS_SPEED 1 | ||
120 | #define UHS_SDR25_BUS_SPEED 1 | 122 | #define UHS_SDR25_BUS_SPEED 1 |
121 | #define UHS_SDR50_BUS_SPEED 2 | 123 | #define UHS_SDR50_BUS_SPEED 2 |
122 | #define UHS_SDR104_BUS_SPEED 3 | 124 | #define UHS_SDR104_BUS_SPEED 3 |
123 | #define UHS_DDR50_BUS_SPEED 4 | 125 | #define UHS_DDR50_BUS_SPEED 4 |
124 | 126 | ||
127 | #define SD_MODE_HIGH_SPEED (1 << HIGH_SPEED_BUS_SPEED) | ||
125 | #define SD_MODE_UHS_SDR12 (1 << UHS_SDR12_BUS_SPEED) | 128 | #define SD_MODE_UHS_SDR12 (1 << UHS_SDR12_BUS_SPEED) |
126 | #define SD_MODE_UHS_SDR25 (1 << UHS_SDR25_BUS_SPEED) | 129 | #define SD_MODE_UHS_SDR25 (1 << UHS_SDR25_BUS_SPEED) |
127 | #define SD_MODE_UHS_SDR50 (1 << UHS_SDR50_BUS_SPEED) | 130 | #define SD_MODE_UHS_SDR50 (1 << UHS_SDR50_BUS_SPEED) |