27.11.2012 Views

[PATCH 1/2] davinci: MMC: Add a function to control reset ... - Linux

[PATCH 1/2] davinci: MMC: Add a function to control reset ... - Linux

[PATCH 1/2] davinci: MMC: Add a function to control reset ... - Linux

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

[<strong>PATCH</strong> 1/2] <strong>davinci</strong>: <strong>MMC</strong>: <strong>Add</strong> a <strong>function</strong> <strong>to</strong> <strong>control</strong> <strong>reset</strong> state of the <strong>control</strong>ler<br />

− temp &= ~(<strong>MMC</strong>CTL_CMDRST | <strong>MMC</strong>CTL_DATRST);<br />

− udelay(10);<br />

writel(temp, host−>base + DAVINCI_<strong>MMC</strong>CTL);<br />

+ udelay(10);<br />

+}<br />

+<br />

+static void<br />

+<strong>davinci</strong>_abort_data(struct mmc_<strong>davinci</strong>_host *host, struct mmc_data *data)<br />

+{<br />

+ mmc_<strong>davinci</strong>_<strong>reset</strong>_ctrl(host, 1);<br />

+ mmc_<strong>davinci</strong>_<strong>reset</strong>_ctrl(host, 0);<br />

}<br />

static irqreturn_t mmc_<strong>davinci</strong>_irq(int irq, void *dev_id)<br />

@@ −1125,15 +1132,8 @@ static inline void mmc_<strong>davinci</strong>_cpufreq_deregister(struct mmc_<strong>davinci</strong>_host<br />

*host)<br />

#endif<br />

static void __init init_mmcsd_host(struct mmc_<strong>davinci</strong>_host *host)<br />

{<br />

− /* DAT line portion is diabled and in <strong>reset</strong> state */<br />

− writel(readl(host−>base + DAVINCI_<strong>MMC</strong>CTL) | <strong>MMC</strong>CTL_DATRST,<br />

− host−>base + DAVINCI_<strong>MMC</strong>CTL);<br />

−<br />

− /* CMD line portion is diabled and in <strong>reset</strong> state */<br />

− writel(readl(host−>base + DAVINCI_<strong>MMC</strong>CTL) | <strong>MMC</strong>CTL_CMDRST,<br />

− host−>base + DAVINCI_<strong>MMC</strong>CTL);<br />

− udelay(10);<br />

+ mmc_<strong>davinci</strong>_<strong>reset</strong>_ctrl(host, 1);<br />

writel(0, host−>base + DAVINCI_<strong>MMC</strong>CLK);<br />

writel(<strong>MMC</strong>CLK_CLKEN, host−>base + DAVINCI_<strong>MMC</strong>CLK);<br />

@@ −1141,12 +1141,7 @@ static void __init init_mmcsd_host(struct mmc_<strong>davinci</strong>_host *host)<br />

writel(0x1FFF, host−>base + DAVINCI_<strong>MMC</strong>TOR);<br />

writel(0xFFFF, host−>base + DAVINCI_<strong>MMC</strong>TOD);<br />

− writel(readl(host−>base + DAVINCI_<strong>MMC</strong>CTL) & ~<strong>MMC</strong>CTL_DATRST,<br />

− host−>base + DAVINCI_<strong>MMC</strong>CTL);<br />

− writel(readl(host−>base + DAVINCI_<strong>MMC</strong>CTL) & ~<strong>MMC</strong>CTL_CMDRST,<br />

− host−>base + DAVINCI_<strong>MMC</strong>CTL);<br />

−<br />

− udelay(10);<br />

+ mmc_<strong>davinci</strong>_<strong>reset</strong>_ctrl(host, 0);<br />

}<br />

static int __init <strong>davinci</strong>_mmcsd_probe(struct platform_device *pdev)<br />

−−<br />

1.7.0.2<br />

−−<br />

To unsubscribe from this list: send the line "unsubscribe linux−kernel" in<br />

[<strong>PATCH</strong> 1/2] <strong>davinci</strong>: <strong>MMC</strong>: <strong>Add</strong> a <strong>function</strong> <strong>to</strong> <strong>control</strong> <strong>reset</strong> state of the <strong>control</strong>ler 2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!