sunxi: driver refresh for 3.13
[openwrt.git] / target / linux / sunxi / patches-3.13 / 170-9-mmc-fixup-revert-sdio.patch
1 From 0483aa124d32bdcafc84623a31141a49e71cc72d Mon Sep 17 00:00:00 2001
2 From: Hans de Goede <hdegoede@redhat.com>
3 Date: Sun, 16 Feb 2014 08:54:20 +0100
4 Subject: [PATCH] sunxi-mmc: fixup: revert "add host initialization for when
5  the sdio irq is enabled"
6
7 This is not necessary since when the host is not initialized at this point
8 yet the irq line from the mmc controller is not enabled, so writing the
9 host controller interrupt mask cannot cause interrupts at this point.
10
11 More over doing this is wrong, as it leads to unbalanced calling of
12 clk_prepare_enable and regulator_power_on.
13
14 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
15 ---
16  drivers/mmc/host/sunxi-mmc.c | 9 ---------
17  1 file changed, 9 deletions(-)
18
19 diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
20 index 2dc446c..f33bc30 100644
21 --- a/drivers/mmc/host/sunxi-mmc.c
22 +++ b/drivers/mmc/host/sunxi-mmc.c
23 @@ -593,18 +593,9 @@ static void sunxi_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
24  {
25         struct sunxi_mmc_host *smc_host = mmc_priv(mmc);
26         unsigned long flags;
27 -       int ret;
28         u32 imask;
29  
30         spin_lock_irqsave(&smc_host->lock, flags);
31 -
32 -       /* Make sure the controller is in a sane state before enabling irqs */
33 -       ret = sunxi_mmc_init_host(host->mmc);
34 -       if (ret) {
35 -               spin_unlock_irqrestore(&smc_host->lock, flags);
36 -               return ret;
37 -       }
38 -
39         imask = mci_readl(smc_host, REG_IMASK);
40         if (enable) {
41                 smc_host->sdio_imask = SDXC_SDIO_INTERRUPT;
42 -- 
43 1.8.5.5
44