summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2018-09-23 03:03:21 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2018-10-08 05:40:43 -0400
commit43b7358df63adff21aa81b349d9080954bf1c372 (patch)
treef72445533e142478c270abdeccb3b8e6d04ef73c
parentb007c4cec8ca169ce091600212b69e077ac0bd5d (diff)
mmc: sdhci: pxav3: Delete GPIO handling
The platform data for the PXAv3 driver allows passing a card detect GPIO, but this code is not used in the kernel. In order to not encourage the use of the old global GPIO numberspace we need to remove this. Card detect (and write protect) GPIO can easily be added into the driver using machine descriptor tables instead, and the descriptor-based (gpiod) variants of the slot GPIO APIs. Cc: Jisheng Zhang <jszhang@marvell.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/sdhci-pxav3.c14
-rw-r--r--include/linux/platform_data/pxa_sdhci.h4
2 files changed, 0 insertions, 18 deletions
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
index b8e96f392428..1783e29eae04 100644
--- a/drivers/mmc/host/sdhci-pxav3.c
+++ b/drivers/mmc/host/sdhci-pxav3.c
@@ -21,17 +21,14 @@
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/gpio.h>
25#include <linux/mmc/card.h> 24#include <linux/mmc/card.h>
26#include <linux/mmc/host.h> 25#include <linux/mmc/host.h>
27#include <linux/mmc/slot-gpio.h>
28#include <linux/platform_data/pxa_sdhci.h> 26#include <linux/platform_data/pxa_sdhci.h>
29#include <linux/slab.h> 27#include <linux/slab.h>
30#include <linux/delay.h> 28#include <linux/delay.h>
31#include <linux/module.h> 29#include <linux/module.h>
32#include <linux/of.h> 30#include <linux/of.h>
33#include <linux/of_device.h> 31#include <linux/of_device.h>
34#include <linux/of_gpio.h>
35#include <linux/pm.h> 32#include <linux/pm.h>
36#include <linux/pm_runtime.h> 33#include <linux/pm_runtime.h>
37#include <linux/mbus.h> 34#include <linux/mbus.h>
@@ -452,16 +449,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
452 host->mmc->caps2 |= pdata->host_caps2; 449 host->mmc->caps2 |= pdata->host_caps2;
453 if (pdata->pm_caps) 450 if (pdata->pm_caps)
454 host->mmc->pm_caps |= pdata->pm_caps; 451 host->mmc->pm_caps |= pdata->pm_caps;
455
456 if (gpio_is_valid(pdata->ext_cd_gpio)) {
457 ret = mmc_gpio_request_cd(host->mmc, pdata->ext_cd_gpio,
458 0);
459 if (ret) {
460 dev_err(mmc_dev(host->mmc),
461 "failed to allocate card detect gpio\n");
462 goto err_cd_req;
463 }
464 }
465 } 452 }
466 453
467 pm_runtime_get_noresume(&pdev->dev); 454 pm_runtime_get_noresume(&pdev->dev);
@@ -486,7 +473,6 @@ err_add_host:
486 pm_runtime_disable(&pdev->dev); 473 pm_runtime_disable(&pdev->dev);
487 pm_runtime_put_noidle(&pdev->dev); 474 pm_runtime_put_noidle(&pdev->dev);
488err_of_parse: 475err_of_parse:
489err_cd_req:
490err_mbus_win: 476err_mbus_win:
491 clk_disable_unprepare(pxa->clk_io); 477 clk_disable_unprepare(pxa->clk_io);
492 clk_disable_unprepare(pxa->clk_core); 478 clk_disable_unprepare(pxa->clk_core);
diff --git a/include/linux/platform_data/pxa_sdhci.h b/include/linux/platform_data/pxa_sdhci.h
index 9e20c2fb4ffd..4977c06d8a86 100644
--- a/include/linux/platform_data/pxa_sdhci.h
+++ b/include/linux/platform_data/pxa_sdhci.h
@@ -33,8 +33,6 @@
33 * 1: choose feedback clk + delay value 33 * 1: choose feedback clk + delay value
34 * 2: choose internal clk 34 * 2: choose internal clk
35 * @clk_delay_enable: enable clk_delay or not, used on pxa910 35 * @clk_delay_enable: enable clk_delay or not, used on pxa910
36 * @ext_cd_gpio: gpio pin used for external CD line
37 * @ext_cd_gpio_invert: invert values for external CD gpio line
38 * @max_speed: the maximum speed supported 36 * @max_speed: the maximum speed supported
39 * @host_caps: Standard MMC host capabilities bit field. 37 * @host_caps: Standard MMC host capabilities bit field.
40 * @quirks: quirks of platfrom 38 * @quirks: quirks of platfrom
@@ -46,8 +44,6 @@ struct sdhci_pxa_platdata {
46 unsigned int clk_delay_cycles; 44 unsigned int clk_delay_cycles;
47 unsigned int clk_delay_sel; 45 unsigned int clk_delay_sel;
48 bool clk_delay_enable; 46 bool clk_delay_enable;
49 unsigned int ext_cd_gpio;
50 bool ext_cd_gpio_invert;
51 unsigned int max_speed; 47 unsigned int max_speed;
52 u32 host_caps; 48 u32 host_caps;
53 u32 host_caps2; 49 u32 host_caps2;