diff options
author | Philip Langdale <philipl@overt.org> | 2007-03-11 20:15:15 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-05-01 07:42:28 -0400 |
commit | 4be34c99a2f3aa90fa42e62c0918f07afb8a645b (patch) | |
tree | 7d05a02a7fe997d7ca5e47b27a6cb499bd5d60cf | |
parent | 7ea239d9e6d6993469a6a8ca83ff23834dfc3fce (diff) |
MMC: Consolidate voltage definitions
Consolidate the list of available voltages.
Up until now, a separate set of defines has been
used for host->vdd than that used for the OCR
voltage mask values. Having two sets of defines
allows them to get out of sync and the current
sets are already inconsistent with one claiming
to describe ranges and the other specific voltages.
Only the SDHCI driver uses the host->vdd defines and
it is easily fixed to use the OCR defines.
Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
-rw-r--r-- | drivers/mmc/host/sdhci.c | 17 | ||||
-rw-r--r-- | include/linux/mmc/host.h | 25 |
2 files changed, 8 insertions, 34 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 579142a7904b..a57f6a3d48d3 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -658,20 +658,17 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned short power) | |||
658 | 658 | ||
659 | pwr = SDHCI_POWER_ON; | 659 | pwr = SDHCI_POWER_ON; |
660 | 660 | ||
661 | switch (power) { | 661 | switch (1 << power) { |
662 | case MMC_VDD_170: | 662 | case MMC_VDD_17_18: |
663 | case MMC_VDD_180: | 663 | case MMC_VDD_18_19: |
664 | case MMC_VDD_190: | ||
665 | pwr |= SDHCI_POWER_180; | 664 | pwr |= SDHCI_POWER_180; |
666 | break; | 665 | break; |
667 | case MMC_VDD_290: | 666 | case MMC_VDD_29_30: |
668 | case MMC_VDD_300: | 667 | case MMC_VDD_30_31: |
669 | case MMC_VDD_310: | ||
670 | pwr |= SDHCI_POWER_300; | 668 | pwr |= SDHCI_POWER_300; |
671 | break; | 669 | break; |
672 | case MMC_VDD_320: | 670 | case MMC_VDD_32_33: |
673 | case MMC_VDD_330: | 671 | case MMC_VDD_33_34: |
674 | case MMC_VDD_340: | ||
675 | pwr |= SDHCI_POWER_330; | 672 | pwr |= SDHCI_POWER_330; |
676 | break; | 673 | break; |
677 | default: | 674 | default: |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index efae87b5c4e7..5a66d8a2bf17 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -16,30 +16,7 @@ struct mmc_ios { | |||
16 | unsigned int clock; /* clock rate */ | 16 | unsigned int clock; /* clock rate */ |
17 | unsigned short vdd; | 17 | unsigned short vdd; |
18 | 18 | ||
19 | #define MMC_VDD_150 0 | 19 | /* vdd stores the bit number of the selected voltage range from below. */ |
20 | #define MMC_VDD_155 1 | ||
21 | #define MMC_VDD_160 2 | ||
22 | #define MMC_VDD_165 3 | ||
23 | #define MMC_VDD_170 4 | ||
24 | #define MMC_VDD_180 5 | ||
25 | #define MMC_VDD_190 6 | ||
26 | #define MMC_VDD_200 7 | ||
27 | #define MMC_VDD_210 8 | ||
28 | #define MMC_VDD_220 9 | ||
29 | #define MMC_VDD_230 10 | ||
30 | #define MMC_VDD_240 11 | ||
31 | #define MMC_VDD_250 12 | ||
32 | #define MMC_VDD_260 13 | ||
33 | #define MMC_VDD_270 14 | ||
34 | #define MMC_VDD_280 15 | ||
35 | #define MMC_VDD_290 16 | ||
36 | #define MMC_VDD_300 17 | ||
37 | #define MMC_VDD_310 18 | ||
38 | #define MMC_VDD_320 19 | ||
39 | #define MMC_VDD_330 20 | ||
40 | #define MMC_VDD_340 21 | ||
41 | #define MMC_VDD_350 22 | ||
42 | #define MMC_VDD_360 23 | ||
43 | 20 | ||
44 | unsigned char bus_mode; /* command output mode */ | 21 | unsigned char bus_mode; /* command output mode */ |
45 | 22 | ||