Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 243427
b: refs/heads/master
c: d9b0342
h: refs/heads/master
i:
  243425: 7c5c1c0
  243423: 92bc7c3
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Chris Ball committed Mar 25, 2011
1 parent d9f6dd7 commit 1e99869
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d80e9221742235ebfcbe85e3899603ab2b716749
refs/heads/master: d9b03421775d5cf8b4d5518a3e80b28cf3f999ce
23 changes: 2 additions & 21 deletions trunk/drivers/mmc/host/tmio_mmc_pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,51 +208,32 @@ static void tmio_mmc_set_clock(struct tmio_mmc_host *host, int new_clock)

static void tmio_mmc_clk_stop(struct tmio_mmc_host *host)
{
struct tmio_mmc_data *pdata = host->pdata;
struct resource *res = platform_get_resource(host->pdev, IORESOURCE_MEM, 0);

/*
* Testing on sh-mobile showed that SDIO IRQs are unmasked when
* CTL_CLK_AND_WAIT_CTL gets written, so we have to disable the
* device IRQ here and restore the SDIO IRQ mask before
* re-enabling the device IRQ.
*/
if (pdata->flags & TMIO_MMC_SDIO_IRQ)
disable_irq(host->irq);
/* implicit BUG_ON(!res) */
if (resource_size(res) > 0x100) {
sd_ctrl_write16(host, CTL_CLK_AND_WAIT_CTL, 0x0000);
msleep(10);
}
if (pdata->flags & TMIO_MMC_SDIO_IRQ) {
tmio_mmc_enable_sdio_irq(host->mmc, host->sdio_irq_enabled);
enable_irq(host->irq);
}

sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, ~0x0100 &
sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL));
msleep(10);
}

static void tmio_mmc_clk_start(struct tmio_mmc_host *host)
{
struct tmio_mmc_data *pdata = host->pdata;
struct resource *res = platform_get_resource(host->pdev, IORESOURCE_MEM, 0);

sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, 0x0100 |
sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL));
msleep(10);
/* see comment in tmio_mmc_clk_stop above */
if (pdata->flags & TMIO_MMC_SDIO_IRQ)
disable_irq(host->irq);

/* implicit BUG_ON(!res) */
if (resource_size(res) > 0x100) {
sd_ctrl_write16(host, CTL_CLK_AND_WAIT_CTL, 0x0100);
msleep(10);
}
if (pdata->flags & TMIO_MMC_SDIO_IRQ) {
tmio_mmc_enable_sdio_irq(host->mmc, host->sdio_irq_enabled);
enable_irq(host->irq);
}
}

static void tmio_mmc_reset(struct tmio_mmc_host *host)
Expand Down

0 comments on commit 1e99869

Please sign in to comment.