mmc: tmio: remove work-around for unmasked SDIO interrupts

SDIO IRQs got unmasked on sh-mobile while writing to the
CTL_CLK_AND_WAIT_CTL register, because that register at address 0x138
is not implemented on those SoCs and writes to it overwrite the
register at address 0x38: CTL_SDIO_IRQ_MASK. Previous patches
eliminated access to register above 0xff on sh-mobile, so that this
work-around isn't needed anymore.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Chris Ball <cjb@laptop.org>

authored by Guennadi Liakhovetski and committed by Chris Ball d9b03421 d80e9221

+2 -21
+2 -21
drivers/mmc/host/tmio_mmc_pio.c
··· 208 208 209 209 static void tmio_mmc_clk_stop(struct tmio_mmc_host *host) 210 210 { 211 - struct tmio_mmc_data *pdata = host->pdata; 212 211 struct resource *res = platform_get_resource(host->pdev, IORESOURCE_MEM, 0); 213 212 214 - /* 215 - * Testing on sh-mobile showed that SDIO IRQs are unmasked when 216 - * CTL_CLK_AND_WAIT_CTL gets written, so we have to disable the 217 - * device IRQ here and restore the SDIO IRQ mask before 218 - * re-enabling the device IRQ. 219 - */ 220 - if (pdata->flags & TMIO_MMC_SDIO_IRQ) 221 - disable_irq(host->irq); 222 213 /* implicit BUG_ON(!res) */ 223 214 if (resource_size(res) > 0x100) { 224 215 sd_ctrl_write16(host, CTL_CLK_AND_WAIT_CTL, 0x0000); 225 216 msleep(10); 226 217 } 227 - if (pdata->flags & TMIO_MMC_SDIO_IRQ) { 228 - tmio_mmc_enable_sdio_irq(host->mmc, host->sdio_irq_enabled); 229 - enable_irq(host->irq); 230 - } 218 + 231 219 sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, ~0x0100 & 232 220 sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL)); 233 221 msleep(10); ··· 223 235 224 236 static void tmio_mmc_clk_start(struct tmio_mmc_host *host) 225 237 { 226 - struct tmio_mmc_data *pdata = host->pdata; 227 238 struct resource *res = platform_get_resource(host->pdev, IORESOURCE_MEM, 0); 228 239 229 240 sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, 0x0100 | 230 241 sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL)); 231 242 msleep(10); 232 - /* see comment in tmio_mmc_clk_stop above */ 233 - if (pdata->flags & TMIO_MMC_SDIO_IRQ) 234 - disable_irq(host->irq); 243 + 235 244 /* implicit BUG_ON(!res) */ 236 245 if (resource_size(res) > 0x100) { 237 246 sd_ctrl_write16(host, CTL_CLK_AND_WAIT_CTL, 0x0100); 238 247 msleep(10); 239 - } 240 - if (pdata->flags & TMIO_MMC_SDIO_IRQ) { 241 - tmio_mmc_enable_sdio_irq(host->mmc, host->sdio_irq_enabled); 242 - enable_irq(host->irq); 243 248 } 244 249 } 245 250