[PATCH] mci: imx-esdhc: retire esdhc_platform_data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We have no board in-tree that doesn't probe the imx-esdhc from DT.
The platform data is thus unused as the PBL usage happens without it,
therefore remove that struct definition and the dead code handling it.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 arch/arm/boards/ls1028ardb/lowlevel.c |  1 -
 arch/arm/boards/ls1046ardb/lowlevel.c |  1 -
 arch/arm/boards/tqmls1046a/lowlevel.c |  1 -
 drivers/mci/imx-esdhc.c               | 34 +------------------
 include/platform_data/mmc-esdhc-imx.h | 48 ---------------------------
 5 files changed, 1 insertion(+), 84 deletions(-)
 delete mode 100644 include/platform_data/mmc-esdhc-imx.h

diff --git a/arch/arm/boards/ls1028ardb/lowlevel.c b/arch/arm/boards/ls1028ardb/lowlevel.c
index 00db0b1cf869..e903d9d30196 100644
--- a/arch/arm/boards/ls1028ardb/lowlevel.c
+++ b/arch/arm/boards/ls1028ardb/lowlevel.c
@@ -4,7 +4,6 @@
 #include <debug_ll.h>
 #include <ddr_spd.h>
 #include <image-metadata.h>
-#include <platform_data/mmc-esdhc-imx.h>
 #include <soc/fsl/fsl_ddr_sdram.h>
 #include <soc/fsl/immap_lsch2.h>
 #include <asm/barebox-arm-head.h>
diff --git a/arch/arm/boards/ls1046ardb/lowlevel.c b/arch/arm/boards/ls1046ardb/lowlevel.c
index 408e6017f6cc..56b8320eddb4 100644
--- a/arch/arm/boards/ls1046ardb/lowlevel.c
+++ b/arch/arm/boards/ls1046ardb/lowlevel.c
@@ -4,7 +4,6 @@
 #include <debug_ll.h>
 #include <ddr_spd.h>
 #include <image-metadata.h>
-#include <platform_data/mmc-esdhc-imx.h>
 #include <pbl/i2c.h>
 #include <soc/fsl/fsl_ddr_sdram.h>
 #include <soc/fsl/immap_lsch2.h>
diff --git a/arch/arm/boards/tqmls1046a/lowlevel.c b/arch/arm/boards/tqmls1046a/lowlevel.c
index 4a1496078a61..9fcb52ea3902 100644
--- a/arch/arm/boards/tqmls1046a/lowlevel.c
+++ b/arch/arm/boards/tqmls1046a/lowlevel.c
@@ -1,7 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0+
 #include <common.h>
 #include <debug_ll.h>
-#include <platform_data/mmc-esdhc-imx.h>
 #include <soc/fsl/fsl_ddr_sdram.h>
 #include <soc/fsl/immap_lsch2.h>
 #include <asm/barebox-arm-head.h>
diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c
index b05934a20113..54309aec2f74 100644
--- a/drivers/mci/imx-esdhc.c
+++ b/drivers/mci/imx-esdhc.c
@@ -18,7 +18,6 @@
 #include <io.h>
 #include <linux/clk.h>
 #include <linux/err.h>
-#include <platform_data/mmc-esdhc-imx.h>
 #include <gpio.h>
 #include <of_device.h>
 #include <mach/imx/generic.h>
@@ -195,27 +194,7 @@ static void esdhc_set_ios(struct mci_host *mci, struct mci_ios *ios)
 
 static int esdhc_card_present(struct mci_host *mci)
 {
-	struct fsl_esdhc_host *host = to_fsl_esdhc(mci);
-	struct esdhc_platform_data *pdata = host->dev->platform_data;
-	int ret;
-
-	if (!pdata)
-		return 1;
-
-	switch (pdata->cd_type) {
-	case ESDHC_CD_NONE:
-	case ESDHC_CD_PERMANENT:
-		return 1;
-	case ESDHC_CD_CONTROLLER:
-		return !(sdhci_read32(&host->sdhci, SDHCI_PRESENT_STATE) & SDHCI_WRITE_PROTECT);
-	case ESDHC_CD_GPIO:
-		ret = gpio_direction_input(pdata->cd_gpio);
-		if (ret)
-			return ret;
-		return gpio_get_value(pdata->cd_gpio) ? 0 : 1;
-	}
-
-	return 0;
+	return 1;
 }
 
 static int esdhc_reset(struct fsl_esdhc_host *host)
@@ -302,7 +281,6 @@ static int fsl_esdhc_probe(struct device *dev)
 	struct mci_host *mci;
 	int ret;
 	unsigned long rate;
-	struct esdhc_platform_data *pdata = dev->platform_data;
 	const struct esdhc_soc_data *socdata;
 
 	ret = dev_get_drvdata(dev, (const void **)&socdata);
@@ -338,12 +316,6 @@ static int fsl_esdhc_probe(struct device *dev)
 
 	esdhc_populate_sdhci(host);
 
-	if (pdata) {
-		mci->host_caps = pdata->caps;
-		if (pdata->devname)
-			mci->devname = pdata->devname;
-	}
-
 	host->mci.ops = fsl_esdhc_ops;
 	host->mci.hw_dev = dev;
 	host->sdhci.mci = &host->mci;
@@ -360,10 +332,6 @@ static int fsl_esdhc_probe(struct device *dev)
 	if (host->mci.f_min < 200000)
 		host->mci.f_min = 200000;
 	host->mci.f_max = rate;
-	if (pdata) {
-		host->mci.use_dsr = pdata->use_dsr;
-		host->mci.dsr_val = pdata->dsr_val;
-	}
 
 	mci_of_parse(&host->mci);
 
diff --git a/include/platform_data/mmc-esdhc-imx.h b/include/platform_data/mmc-esdhc-imx.h
deleted file mode 100644
index fb7380a18201..000000000000
--- a/include/platform_data/mmc-esdhc-imx.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2010 Wolfram Sang <w.sang@xxxxxxxxxxxxxx>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; version 2
- * of the License.
- */
-
-#ifndef __ASM_ARCH_IMX_ESDHC_H
-#define __ASM_ARCH_IMX_ESDHC_H
-
-enum wp_types {
-	ESDHC_WP_NONE,		/* no WP, neither controller nor gpio */
-	ESDHC_WP_CONTROLLER,	/* mmc controller internal WP */
-	ESDHC_WP_GPIO,		/* external gpio pin for WP */
-};
-
-enum cd_types {
-	ESDHC_CD_NONE,		/* no CD, neither controller nor gpio */
-	ESDHC_CD_CONTROLLER,	/* mmc controller internal CD */
-	ESDHC_CD_GPIO,		/* external gpio pin for CD */
-	ESDHC_CD_PERMANENT,	/* no CD, card permanently wired to host */
-};
-
-/**
- * struct esdhc_platform_data - platform data for esdhc on i.MX
- *
- * ESDHC_WP(CD)_CONTROLLER type is not available on i.MX25/35.
- *
- * @wp_gpio:	gpio for write_protect
- * @cd_gpio:	gpio for card_detect interrupt
- * @wp_type:	type of write_protect method (see wp_types enum above)
- * @cd_type:	type of card_detect method (see cd_types enum above)
- * @caps:	supported bus width capabilities (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)
- */
-
-struct esdhc_platform_data {
-	unsigned int wp_gpio;
-	unsigned int cd_gpio;
-	enum wp_types wp_type;
-	enum cd_types cd_type;
-	unsigned caps;
-	char *devname;
-	unsigned dsr_val;
-	int use_dsr;
-};
-#endif /* __ASM_ARCH_IMX_ESDHC_H */
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux