aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-06-20 12:42:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-06-20 12:42:09 -0400
commita4d7a122385e27bdd91101635c704327d7c0d87f (patch)
treec7d2d601a0ff53194b4235e8f35e09234f98937b /drivers/mmc
parent61fcbc8dfe40d6fb5e59ab31dfcef67d6019f1a5 (diff)
parent10aa5a35e34fb00a2dd814447199f08756eb307b (diff)
Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King: "This includes three MMCI changes - one to fix up the wrong version of the DT support patch which was merged, and two to make deferred probing work. It also includes a fix to the OMAP SPI driver which is causing a boot time warning. The remainder are very minor ARM fixes." * 'fixes' of git://git.linaro.org/people/rmk/linux-arm: SPI: fix over-eager devm_xxx() conversion ARM: 7427/1: mmc: mmci: Defer probe() in case of yet uninitialized GPIOs ARM: 7426/1: mmc: mmci: Remove wrong error handling of gpio 0 ARM: 7425/1: extable: ensure fixup entries are 4-byte aligned ARM: 7421/1: bpf_jit: BPF_S_ANC_ALU_XOR_X support ARM: 7423/1: kprobes: run t32_simulate_ldr_literal() without insn slot ARM: 7422/1: mmc: mmci: Allocate platform memory during Device Tree boot
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mmci.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index f0fcce40cd8d..50ff19a62368 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1216,12 +1216,7 @@ static void mmci_dt_populate_generic_pdata(struct device_node *np,
1216 int bus_width = 0; 1216 int bus_width = 0;
1217 1217
1218 pdata->gpio_wp = of_get_named_gpio(np, "wp-gpios", 0); 1218 pdata->gpio_wp = of_get_named_gpio(np, "wp-gpios", 0);
1219 if (!pdata->gpio_wp)
1220 pdata->gpio_wp = -1;
1221
1222 pdata->gpio_cd = of_get_named_gpio(np, "cd-gpios", 0); 1219 pdata->gpio_cd = of_get_named_gpio(np, "cd-gpios", 0);
1223 if (!pdata->gpio_cd)
1224 pdata->gpio_cd = -1;
1225 1220
1226 if (of_get_property(np, "cd-inverted", NULL)) 1221 if (of_get_property(np, "cd-inverted", NULL))
1227 pdata->cd_invert = true; 1222 pdata->cd_invert = true;
@@ -1276,6 +1271,12 @@ static int __devinit mmci_probe(struct amba_device *dev,
1276 return -EINVAL; 1271 return -EINVAL;
1277 } 1272 }
1278 1273
1274 if (!plat) {
1275 plat = devm_kzalloc(&dev->dev, sizeof(*plat), GFP_KERNEL);
1276 if (!plat)
1277 return -ENOMEM;
1278 }
1279
1279 if (np) 1280 if (np)
1280 mmci_dt_populate_generic_pdata(np, plat); 1281 mmci_dt_populate_generic_pdata(np, plat);
1281 1282
@@ -1424,6 +1425,10 @@ static int __devinit mmci_probe(struct amba_device *dev,
1424 writel(0, host->base + MMCIMASK1); 1425 writel(0, host->base + MMCIMASK1);
1425 writel(0xfff, host->base + MMCICLEAR); 1426 writel(0xfff, host->base + MMCICLEAR);
1426 1427
1428 if (plat->gpio_cd == -EPROBE_DEFER) {
1429 ret = -EPROBE_DEFER;
1430 goto err_gpio_cd;
1431 }
1427 if (gpio_is_valid(plat->gpio_cd)) { 1432 if (gpio_is_valid(plat->gpio_cd)) {
1428 ret = gpio_request(plat->gpio_cd, DRIVER_NAME " (cd)"); 1433 ret = gpio_request(plat->gpio_cd, DRIVER_NAME " (cd)");
1429 if (ret == 0) 1434 if (ret == 0)
@@ -1447,6 +1452,10 @@ static int __devinit mmci_probe(struct amba_device *dev,
1447 if (ret >= 0) 1452 if (ret >= 0)
1448 host->gpio_cd_irq = gpio_to_irq(plat->gpio_cd); 1453 host->gpio_cd_irq = gpio_to_irq(plat->gpio_cd);
1449 } 1454 }
1455 if (plat->gpio_wp == -EPROBE_DEFER) {
1456 ret = -EPROBE_DEFER;
1457 goto err_gpio_wp;
1458 }
1450 if (gpio_is_valid(plat->gpio_wp)) { 1459 if (gpio_is_valid(plat->gpio_wp)) {
1451 ret = gpio_request(plat->gpio_wp, DRIVER_NAME " (wp)"); 1460 ret = gpio_request(plat->gpio_wp, DRIVER_NAME " (wp)");
1452 if (ret == 0) 1461 if (ret == 0)