diff options
Diffstat (limited to 'arch/arm/mach-u300/mmc.c')
-rw-r--r-- | arch/arm/mach-u300/mmc.c | 64 |
1 files changed, 4 insertions, 60 deletions
diff --git a/arch/arm/mach-u300/mmc.c b/arch/arm/mach-u300/mmc.c index 7b6b016786bb..109f5a6e71c7 100644 --- a/arch/arm/mach-u300/mmc.c +++ b/arch/arm/mach-u300/mmc.c | |||
@@ -40,64 +40,6 @@ static unsigned int mmc_status(struct device *dev) | |||
40 | return mmci_card->mmc_inserted; | 40 | return mmci_card->mmc_inserted; |
41 | } | 41 | } |
42 | 42 | ||
43 | /* | ||
44 | * Here follows a large chunk of code which will only be enabled if you | ||
45 | * have both the AB3100 chip mounted and the MMC subsystem activated. | ||
46 | */ | ||
47 | |||
48 | static u32 mmc_translate_vdd(struct device *dev, unsigned int voltage) | ||
49 | { | ||
50 | int v; | ||
51 | |||
52 | /* | ||
53 | * MMC Spec: | ||
54 | * bit 7: 1.70 - 1.95V | ||
55 | * bit 8 - 14: 2.0 - 2.6V | ||
56 | * bit 15 - 23: 2.7 - 3.6V | ||
57 | * | ||
58 | * ab3100 voltages: | ||
59 | * 000 - 2.85V | ||
60 | * 001 - 2.75V | ||
61 | * 010 - 1.8V | ||
62 | * 011 - 1.5V | ||
63 | */ | ||
64 | switch (voltage) { | ||
65 | case 8: | ||
66 | v = 3; | ||
67 | break; | ||
68 | case 9: | ||
69 | case 10: | ||
70 | case 11: | ||
71 | case 12: | ||
72 | case 13: | ||
73 | case 14: | ||
74 | case 15: | ||
75 | v = 1; | ||
76 | break; | ||
77 | case 16: | ||
78 | v = 1; | ||
79 | break; | ||
80 | case 17: | ||
81 | case 18: | ||
82 | case 19: | ||
83 | case 20: | ||
84 | case 21: | ||
85 | case 22: | ||
86 | case 23: | ||
87 | case 24: | ||
88 | v = 0; | ||
89 | break; | ||
90 | default: | ||
91 | v = 0; | ||
92 | break; | ||
93 | } | ||
94 | |||
95 | /* PL180 voltage register bits */ | ||
96 | return v << 2; | ||
97 | } | ||
98 | |||
99 | |||
100 | |||
101 | static int mmci_callback(void *data) | 43 | static int mmci_callback(void *data) |
102 | { | 44 | { |
103 | struct mmci_card_event *mmci_card = data; | 45 | struct mmci_card_event *mmci_card = data; |
@@ -154,9 +96,11 @@ int __devinit mmc_init(struct amba_device *adev) | |||
154 | if (!mmci_card) | 96 | if (!mmci_card) |
155 | return -ENOMEM; | 97 | return -ENOMEM; |
156 | 98 | ||
99 | /* | ||
100 | * Do not set ocr_mask or voltage translation function, | ||
101 | * we have a regulator we can control instead. | ||
102 | */ | ||
157 | /* Nominally 2.85V on our platform */ | 103 | /* Nominally 2.85V on our platform */ |
158 | mmci_card->mmc0_plat_data.ocr_mask = MMC_VDD_28_29; | ||
159 | mmci_card->mmc0_plat_data.translate_vdd = mmc_translate_vdd; | ||
160 | mmci_card->mmc0_plat_data.status = mmc_status; | 104 | mmci_card->mmc0_plat_data.status = mmc_status; |
161 | mmci_card->mmc0_plat_data.gpio_wp = -1; | 105 | mmci_card->mmc0_plat_data.gpio_wp = -1; |
162 | mmci_card->mmc0_plat_data.gpio_cd = -1; | 106 | mmci_card->mmc0_plat_data.gpio_cd = -1; |