mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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
This commit is contained in:
commit
a4d7a12238
7 changed files with 28 additions and 7 deletions
|
|
@ -1216,12 +1216,7 @@ static void mmci_dt_populate_generic_pdata(struct device_node *np,
|
|||
int bus_width = 0;
|
||||
|
||||
pdata->gpio_wp = of_get_named_gpio(np, "wp-gpios", 0);
|
||||
if (!pdata->gpio_wp)
|
||||
pdata->gpio_wp = -1;
|
||||
|
||||
pdata->gpio_cd = of_get_named_gpio(np, "cd-gpios", 0);
|
||||
if (!pdata->gpio_cd)
|
||||
pdata->gpio_cd = -1;
|
||||
|
||||
if (of_get_property(np, "cd-inverted", NULL))
|
||||
pdata->cd_invert = true;
|
||||
|
|
@ -1276,6 +1271,12 @@ static int __devinit mmci_probe(struct amba_device *dev,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!plat) {
|
||||
plat = devm_kzalloc(&dev->dev, sizeof(*plat), GFP_KERNEL);
|
||||
if (!plat)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (np)
|
||||
mmci_dt_populate_generic_pdata(np, plat);
|
||||
|
||||
|
|
@ -1424,6 +1425,10 @@ static int __devinit mmci_probe(struct amba_device *dev,
|
|||
writel(0, host->base + MMCIMASK1);
|
||||
writel(0xfff, host->base + MMCICLEAR);
|
||||
|
||||
if (plat->gpio_cd == -EPROBE_DEFER) {
|
||||
ret = -EPROBE_DEFER;
|
||||
goto err_gpio_cd;
|
||||
}
|
||||
if (gpio_is_valid(plat->gpio_cd)) {
|
||||
ret = gpio_request(plat->gpio_cd, DRIVER_NAME " (cd)");
|
||||
if (ret == 0)
|
||||
|
|
@ -1447,6 +1452,10 @@ static int __devinit mmci_probe(struct amba_device *dev,
|
|||
if (ret >= 0)
|
||||
host->gpio_cd_irq = gpio_to_irq(plat->gpio_cd);
|
||||
}
|
||||
if (plat->gpio_wp == -EPROBE_DEFER) {
|
||||
ret = -EPROBE_DEFER;
|
||||
goto err_gpio_wp;
|
||||
}
|
||||
if (gpio_is_valid(plat->gpio_wp)) {
|
||||
ret = gpio_request(plat->gpio_wp, DRIVER_NAME " (wp)");
|
||||
if (ret == 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue