diff options
| author | Bryan Buckley <bryan.buckley@ti.com> | 2011-09-30 14:05:55 -0400 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2011-09-30 14:05:55 -0400 |
| commit | 3696d303d6a39f916f9ace37d79e3db7937c68a7 (patch) | |
| tree | cb771a880cb0120e634c148450598bbcb5584a14 | |
| parent | a102a9ece5489e1718cd7543aa079082450ac3a2 (diff) | |
ARM: OMAP4: MMC: fix power and audio issue, decouple USBC1 from MMC1
Remove OMAP4_USBC1_ICUSB_PWRDNZ_MASK during enable/disable PWRDNZ mode for
MMC1_PBIAS and associated extended-drain MMC1 I/O cell. This is in accordance
with the control module programming guide. This fixes a bug where if trying to
use gpio_98 or gpio_99 and MMC1 at the same time the GPIO signal will be
affected by a changing SDMMC1_VDDS.
Software must keep MMC1_PBIAS cell and MMC1_IO cell PWRDNZ signals low whenever
SDMMC1_VDDS ramps up/down or changes for cell protection purposes.
MMC1 is based on SDMMC1_VDDS whereas USBC1 is based on SIM_VDDS therefore
they can operate independently.
Signed-off-by: Bryan Buckley <bryan.buckley@ti.com>
Acked-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Tested-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
| -rw-r--r-- | arch/arm/mach-omap2/hsmmc.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index a9b45c76e1d3..097a42d81e59 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
| @@ -137,8 +137,7 @@ static void omap4_hsmmc1_before_set_reg(struct device *dev, int slot, | |||
| 137 | */ | 137 | */ |
| 138 | reg = omap4_ctrl_pad_readl(control_pbias_offset); | 138 | reg = omap4_ctrl_pad_readl(control_pbias_offset); |
| 139 | reg &= ~(OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | | 139 | reg &= ~(OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | |
| 140 | OMAP4_MMC1_PWRDNZ_MASK | | 140 | OMAP4_MMC1_PWRDNZ_MASK); |
| 141 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); | ||
| 142 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | 141 | omap4_ctrl_pad_writel(reg, control_pbias_offset); |
| 143 | } | 142 | } |
| 144 | 143 | ||
| @@ -156,8 +155,7 @@ static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot, | |||
| 156 | else | 155 | else |
| 157 | reg |= OMAP4_MMC1_PBIASLITE_VMODE_MASK; | 156 | reg |= OMAP4_MMC1_PBIASLITE_VMODE_MASK; |
| 158 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | | 157 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | |
| 159 | OMAP4_MMC1_PWRDNZ_MASK | | 158 | OMAP4_MMC1_PWRDNZ_MASK); |
| 160 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); | ||
| 161 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | 159 | omap4_ctrl_pad_writel(reg, control_pbias_offset); |
| 162 | 160 | ||
| 163 | timeout = jiffies + msecs_to_jiffies(5); | 161 | timeout = jiffies + msecs_to_jiffies(5); |
| @@ -171,16 +169,14 @@ static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot, | |||
| 171 | if (reg & OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK) { | 169 | if (reg & OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK) { |
| 172 | pr_err("Pbias Voltage is not same as LDO\n"); | 170 | pr_err("Pbias Voltage is not same as LDO\n"); |
| 173 | /* Caution : On VMODE_ERROR Power Down MMC IO */ | 171 | /* Caution : On VMODE_ERROR Power Down MMC IO */ |
| 174 | reg &= ~(OMAP4_MMC1_PWRDNZ_MASK | | 172 | reg &= ~(OMAP4_MMC1_PWRDNZ_MASK); |
| 175 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); | ||
| 176 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | 173 | omap4_ctrl_pad_writel(reg, control_pbias_offset); |
| 177 | } | 174 | } |
| 178 | } else { | 175 | } else { |
| 179 | reg = omap4_ctrl_pad_readl(control_pbias_offset); | 176 | reg = omap4_ctrl_pad_readl(control_pbias_offset); |
| 180 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | | 177 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | |
| 181 | OMAP4_MMC1_PWRDNZ_MASK | | 178 | OMAP4_MMC1_PWRDNZ_MASK | |
| 182 | OMAP4_MMC1_PBIASLITE_VMODE_MASK | | 179 | OMAP4_MMC1_PBIASLITE_VMODE_MASK); |
| 183 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); | ||
| 184 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | 180 | omap4_ctrl_pad_writel(reg, control_pbias_offset); |
| 185 | } | 181 | } |
| 186 | } | 182 | } |
