diff options
Diffstat (limited to 'arch/arm/mach-omap2/hsmmc.c')
-rw-r--r-- | arch/arm/mach-omap2/hsmmc.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 66868c5d5a2..097a42d81e5 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/gpio.h> | ||
16 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
17 | #include <plat/mmc.h> | 18 | #include <plat/mmc.h> |
18 | #include <plat/omap-pm.h> | 19 | #include <plat/omap-pm.h> |
@@ -136,8 +137,7 @@ static void omap4_hsmmc1_before_set_reg(struct device *dev, int slot, | |||
136 | */ | 137 | */ |
137 | reg = omap4_ctrl_pad_readl(control_pbias_offset); | 138 | reg = omap4_ctrl_pad_readl(control_pbias_offset); |
138 | reg &= ~(OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | | 139 | reg &= ~(OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | |
139 | OMAP4_MMC1_PWRDNZ_MASK | | 140 | OMAP4_MMC1_PWRDNZ_MASK); |
140 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); | ||
141 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | 141 | omap4_ctrl_pad_writel(reg, control_pbias_offset); |
142 | } | 142 | } |
143 | 143 | ||
@@ -155,8 +155,7 @@ static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot, | |||
155 | else | 155 | else |
156 | reg |= OMAP4_MMC1_PBIASLITE_VMODE_MASK; | 156 | reg |= OMAP4_MMC1_PBIASLITE_VMODE_MASK; |
157 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | | 157 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | |
158 | OMAP4_MMC1_PWRDNZ_MASK | | 158 | OMAP4_MMC1_PWRDNZ_MASK); |
159 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); | ||
160 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | 159 | omap4_ctrl_pad_writel(reg, control_pbias_offset); |
161 | 160 | ||
162 | timeout = jiffies + msecs_to_jiffies(5); | 161 | timeout = jiffies + msecs_to_jiffies(5); |
@@ -170,16 +169,14 @@ static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot, | |||
170 | if (reg & OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK) { | 169 | if (reg & OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK) { |
171 | pr_err("Pbias Voltage is not same as LDO\n"); | 170 | pr_err("Pbias Voltage is not same as LDO\n"); |
172 | /* Caution : On VMODE_ERROR Power Down MMC IO */ | 171 | /* Caution : On VMODE_ERROR Power Down MMC IO */ |
173 | reg &= ~(OMAP4_MMC1_PWRDNZ_MASK | | 172 | reg &= ~(OMAP4_MMC1_PWRDNZ_MASK); |
174 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); | ||
175 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | 173 | omap4_ctrl_pad_writel(reg, control_pbias_offset); |
176 | } | 174 | } |
177 | } else { | 175 | } else { |
178 | reg = omap4_ctrl_pad_readl(control_pbias_offset); | 176 | reg = omap4_ctrl_pad_readl(control_pbias_offset); |
179 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | | 177 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | |
180 | OMAP4_MMC1_PWRDNZ_MASK | | 178 | OMAP4_MMC1_PWRDNZ_MASK | |
181 | OMAP4_MMC1_PBIASLITE_VMODE_MASK | | 179 | OMAP4_MMC1_PBIASLITE_VMODE_MASK); |
182 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); | ||
183 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | 180 | omap4_ctrl_pad_writel(reg, control_pbias_offset); |
184 | } | 181 | } |
185 | } | 182 | } |
@@ -213,12 +210,10 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on, | |||
213 | static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller, | 210 | static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller, |
214 | int controller_nr) | 211 | int controller_nr) |
215 | { | 212 | { |
216 | if ((mmc_controller->slots[0].switch_pin > 0) && \ | 213 | if (gpio_is_valid(mmc_controller->slots[0].switch_pin)) |
217 | (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES)) | ||
218 | omap_mux_init_gpio(mmc_controller->slots[0].switch_pin, | 214 | omap_mux_init_gpio(mmc_controller->slots[0].switch_pin, |
219 | OMAP_PIN_INPUT_PULLUP); | 215 | OMAP_PIN_INPUT_PULLUP); |
220 | if ((mmc_controller->slots[0].gpio_wp > 0) && \ | 216 | if (gpio_is_valid(mmc_controller->slots[0].gpio_wp)) |
221 | (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES)) | ||
222 | omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, | 217 | omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, |
223 | OMAP_PIN_INPUT_PULLUP); | 218 | OMAP_PIN_INPUT_PULLUP); |
224 | if (cpu_is_omap34xx()) { | 219 | if (cpu_is_omap34xx()) { |