Skip to contentSkip to conversation

cd/wp code clean up for i.MX USDHC

PATCH In review [email protected] 5 participants 11 messages May 6, 2023 – Jun 8, 2023

Subsystems (6)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

v2 cover cd/wp code clean up for i.MX USDHC

From: Haibo Chen <[email protected]>

Now i.MX USDHC driver convert to a DT-only platform driver, the legency code for non-DT is reduncant, like the cd_types and wp_types. So clean it up here.

V2:
-PATCH 3, fix the dt-binding-check error issue.
-no changes for other PATCH.

Haibo Chen (4):
mmc: sdhci-esdhc-imx: remove unused enum cd_types
mmc: sdhci-esdhc-imx: remove redundant write protect code
dt-bindings: mmc: fsl-imx-esdhc: remove property "fsl,wp-controller"
arm: dts: imx: remove "fsl,wp-controller" since it is dropped

 .../bindings/mmc/fsl-imx-esdhc.yaml           |  6 --
 arch/arm/boot/dts/imx53-sk-imx53.dts          |  1 -
 arch/arm/boot/dts/imx53-tx53.dtsi             |  2 -
 arch/arm/boot/dts/imx6dl-tx6s-8035.dts        |  1 -
 arch/arm/boot/dts/imx6dl-tx6u-8033.dts        |  1 -
 arch/arm/boot/dts/imx6q-bosch-acc.dts         |  2 -
 arch/arm/boot/dts/imx6q-tx6q-1020-comtft.dts  |  1 -
 arch/arm/boot/dts/imx6q-tx6q-1020.dts         |  1 -
 arch/arm/boot/dts/imx6q-tx6q-1036.dts         |  1 -
 arch/arm/boot/dts/imx6qdl-dhcom-som.dtsi      |  1 -
 arch/arm/boot/dts/imx6qdl-emcon.dtsi          |  2 -
 arch/arm/boot/dts/imx6qdl-ts4900.dtsi         |  1 -
 arch/arm/boot/dts/imx6qdl-ts7970.dtsi         |  1 -
 arch/arm/boot/dts/imx6qdl-tx6.dtsi            |  2 -
 arch/arm/boot/dts/imx6qp-tx6qp-8037.dts       |  1 -
 arch/arm/boot/dts/imx6qp-tx6qp-8137.dts       |  1 -
 arch/arm/boot/dts/imx6ul-tx6ul-0011.dts       |  1 -
 arch/arm/boot/dts/imx6ul-tx6ul.dtsi           |  1 -
 arch/arm/boot/dts/imxrt1050.dtsi              |  1 -
 drivers/mmc/host/sdhci-esdhc-imx.c            | 56 +------------------
 20 files changed, 1 insertion(+), 83 deletions(-)
Signature · 1 line
2.34.1
author maintainer
#1 lore raw

PATCH v2 1/4 mmc: sdhci-esdhc-imx: remove unused enum cd_types

From: Haibo Chen <[email protected]>

enum cd_types is no more used, so remove it here.

---
 drivers/mmc/host/sdhci-esdhc-imx.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/mmc/host/sdhci-esdhc-imx.c +0 -9
index eebf94604a7f..c7db742f729c 100644
@@ -207,25 +207,16 @@ enum wp_types {
 	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_type:	type of write_protect method (see wp_types enum above)
- * @cd_type:	type of card_detect method (see cd_types enum above)
  */
 
 struct esdhc_platform_data {
 	enum wp_types wp_type;
-	enum cd_types cd_type;
 	int max_bus_width;
 	unsigned int delay_line;
 	unsigned int tuning_step;       /* The delay cell steps in tuning procedure */
Signature · 1 line
2.34.1
maintainer Acked-by on v2 1/4
#2 lore raw

Re: [PATCH v2 1/4] mmc: sdhci-esdhc-imx: remove unused enum cd_types

Quoted 3 lines · On 6/05/23 10:40, [email protected] wrote:

From: Haibo Chen <[email protected]>

enum cd_types is no more used, so remove it here.

FWIW it doesn't look like max_bus_width is being used either?

Quoted 2 lines

Nevertheless:

Quoted 34 lines
---
 drivers/mmc/host/sdhci-esdhc-imx.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/mmc/host/sdhci-esdhc-imx.c +0 -9
index eebf94604a7f..c7db742f729c 100644
@@ -207,25 +207,16 @@ enum wp_types {
 	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_type:	type of write_protect method (see wp_types enum above)
- * @cd_type:	type of card_detect method (see cd_types enum above)
  */
 
 struct esdhc_platform_data {
 	enum wp_types wp_type;
-	enum cd_types cd_type;
 	int max_bus_width;
 	unsigned int delay_line;
 	unsigned int tuning_step;       /* The delay cell steps in tuning procedure */
author maintainer
#3 lore raw

PATCH v2 2/4 mmc: sdhci-esdhc-imx: remove redundant write protect code

In reply to [email protected]

From: Haibo Chen <[email protected]>

The logic of the esdhc_pltfm_get_ro() is just the same with common code sdhci_check_ro(). So remove this redundant code, depends on mmc_of_parse() and sdhci_check_ro() to cover the write protect logic.

---
 drivers/mmc/host/sdhci-esdhc-imx.c | 47 +-----------------------------
 1 file changed, 1 insertion(+), 46 deletions(-)
drivers/mmc/host/sdhci-esdhc-imx.c +1 -46
index c7db742f729c..54531aab70f0 100644
@@ -201,22 +201,8 @@
 /* ERR004536 is not applicable for the IP  */
 #define ESDHC_FLAG_SKIP_ERR004536	BIT(17)
 
-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 */
-};
-
-/*
- * struct esdhc_platform_data - platform data for esdhc on i.MX
- *
- * ESDHC_WP(CD)_CONTROLLER type is not available on i.MX25/35.
- *
- * @wp_type:	type of write_protect method (see wp_types enum above)
- */
-
+/* struct esdhc_platform_data - platform data for esdhc on i.MX */
 struct esdhc_platform_data {
-	enum wp_types wp_type;
 	int max_bus_width;
 	unsigned int delay_line;
 	unsigned int tuning_step;       /* The delay cell steps in tuning procedure */
@@ -994,25 +980,6 @@ static inline void esdhc_pltfm_set_clock(struct sdhci_host *host,
 
 }
 
-static unsigned int esdhc_pltfm_get_ro(struct sdhci_host *host)
-{
-	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
-	struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host);
-	struct esdhc_platform_data *boarddata = &imx_data->boarddata;
-
-	switch (boarddata->wp_type) {
-	case ESDHC_WP_GPIO:
-		return mmc_gpio_get_ro(host->mmc);
-	case ESDHC_WP_CONTROLLER:
-		return !(readl(host->ioaddr + SDHCI_PRESENT_STATE) &
-			       SDHCI_WRITE_PROTECT);
-	case ESDHC_WP_NONE:
-		break;
-	}
-
-	return -ENOSYS;
-}
-
 static void esdhc_pltfm_set_bus_width(struct sdhci_host *host, int width)
 {
 	u32 ctrl;
@@ -1380,7 +1347,6 @@ static struct sdhci_ops sdhci_esdhc_ops = {
 	.get_max_clock = esdhc_pltfm_get_max_clock,
 	.get_min_clock = esdhc_pltfm_get_min_clock,
 	.get_max_timeout_count = esdhc_get_max_timeout_count,
-	.get_ro = esdhc_pltfm_get_ro,
 	.set_timeout = esdhc_set_timeout,
 	.set_bus_width = esdhc_pltfm_set_bus_width,
 	.set_uhs_signaling = esdhc_set_uhs_signaling,
@@ -1588,17 +1554,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
 	struct esdhc_platform_data *boarddata = &imx_data->boarddata;
 	int ret;
 
-	if (of_property_read_bool(np, "fsl,wp-controller"))
-		boarddata->wp_type = ESDHC_WP_CONTROLLER;
-
-	/*
-	 * If we have this property, then activate WP check.
-	 * Retrieveing and requesting the actual WP GPIO will happen
-	 * in the call to mmc_of_parse().
-	 */
-	if (of_property_read_bool(np, "wp-gpios"))
-		boarddata->wp_type = ESDHC_WP_GPIO;
-
 	of_property_read_u32(np, "fsl,tuning-step", &boarddata->tuning_step);
 	of_property_read_u32(np, "fsl,tuning-start-tap",
 			     &boarddata->tuning_start_tap);
Signature · 1 line
2.34.1
maintainer
#4 lore raw

Re: [PATCH v2 2/4] mmc: sdhci-esdhc-imx: remove redundant write protect code

Quoted 75 lines · On 6/05/23 10:40, [email protected] wrote:

From: Haibo Chen <[email protected]>

The logic of the esdhc_pltfm_get_ro() is just the same with common code sdhci_check_ro(). So remove this redundant code, depends on mmc_of_parse() and sdhci_check_ro() to cover the write protect logic.

---
 drivers/mmc/host/sdhci-esdhc-imx.c | 47 +-----------------------------
 1 file changed, 1 insertion(+), 46 deletions(-)
drivers/mmc/host/sdhci-esdhc-imx.c +1 -35
index c7db742f729c..54531aab70f0 100644
@@ -201,22 +201,8 @@
 /* ERR004536 is not applicable for the IP  */
 #define ESDHC_FLAG_SKIP_ERR004536	BIT(17)
 
-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 */
-};
-
-/*
- * struct esdhc_platform_data - platform data for esdhc on i.MX
- *
- * ESDHC_WP(CD)_CONTROLLER type is not available on i.MX25/35.
- *
- * @wp_type:	type of write_protect method (see wp_types enum above)
- */
-
+/* struct esdhc_platform_data - platform data for esdhc on i.MX */
 struct esdhc_platform_data {
-	enum wp_types wp_type;
 	int max_bus_width;
 	unsigned int delay_line;
 	unsigned int tuning_step;       /* The delay cell steps in tuning procedure */
@@ -994,25 +980,6 @@ static inline void esdhc_pltfm_set_clock(struct sdhci_host *host,
 
 }
 
-static unsigned int esdhc_pltfm_get_ro(struct sdhci_host *host)
-{
-	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
-	struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host);
-	struct esdhc_platform_data *boarddata = &imx_data->boarddata;
-
-	switch (boarddata->wp_type) {
-	case ESDHC_WP_GPIO:
-		return mmc_gpio_get_ro(host->mmc);
-	case ESDHC_WP_CONTROLLER:
-		return !(readl(host->ioaddr + SDHCI_PRESENT_STATE) &
-			       SDHCI_WRITE_PROTECT);
-	case ESDHC_WP_NONE:
-		break;
-	}
-
-	return -ENOSYS;
-}
-
 static void esdhc_pltfm_set_bus_width(struct sdhci_host *host, int width)
 {
 	u32 ctrl;
@@ -1380,7 +1347,6 @@ static struct sdhci_ops sdhci_esdhc_ops = {
 	.get_max_clock = esdhc_pltfm_get_max_clock,
 	.get_min_clock = esdhc_pltfm_get_min_clock,
 	.get_max_timeout_count = esdhc_get_max_timeout_count,
-	.get_ro = esdhc_pltfm_get_ro,
 	.set_timeout = esdhc_set_timeout,
 	.set_bus_width = esdhc_pltfm_set_bus_width,
 	.set_uhs_signaling = esdhc_set_uhs_signaling,

drivers/mmc/host/sdhci-esdhc-imx.c sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, · line 1592

Quoted 5 lines
drivers/mmc/host/sdhci-esdhc-imx.c +0 -2
@@ -1588,17 +1554,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
 	struct esdhc_platform_data *boarddata = &imx_data->boarddata;
 	int ret;
 
-	if (of_property_read_bool(np, "fsl,wp-controller"))
-		boarddata->wp_type = ESDHC_WP_CONTROLLER;

esdhc_pltfm_get_ro() differs from sdhci_check_ro() by defaulting to -ENOSYS if there is neither "fsl,wp-controller" nor "wp-gpios", which would result in write-protect off (not supported, e.g. microsd). So more explanation is needed for why removing "fsl,wp-controller" will give the same result.

Quoted 12 lines
drivers/mmc/host/sdhci-esdhc-imx.c +0 -9
-
-	/*
-	 * If we have this property, then activate WP check.
-	 * Retrieveing and requesting the actual WP GPIO will happen
-	 * in the call to mmc_of_parse().
-	 */
-	if (of_property_read_bool(np, "wp-gpios"))
-		boarddata->wp_type = ESDHC_WP_GPIO;
-
 	of_property_read_u32(np, "fsl,tuning-step", &boarddata->tuning_step);
 	of_property_read_u32(np, "fsl,tuning-start-tap",
 			     &boarddata->tuning_start_tap);
author maintainer
#5 lore raw

RE: [PATCH v2 2/4] mmc: sdhci-esdhc-imx: remove redundant write protect code

Quoted 94 lines

-----Original Message-----
From: Adrian Hunter <[email protected]>
Sent: 2023年5月19日 18:37
To: Bough Chen <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: dl-linux-imx <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v2 2/4] mmc: sdhci-esdhc-imx: remove redundant write protect code

Quoted 31 lines · On 6/05/23 10:40, [email protected] wrote:

From: Haibo Chen <[email protected]>

The logic of the esdhc_pltfm_get_ro() is just the same with common code sdhci_check_ro(). So remove this redundant code, depends on mmc_of_parse() and sdhci_check_ro() to cover the write protect logic.

---
 drivers/mmc/host/sdhci-esdhc-imx.c | 47
+-----------------------------
 1 file changed, 1 insertion(+), 46 deletions(-)
drivers/mmc/host/sdhci-esdhc-imx.c +0 -10
index c7db742f729c..54531aab70f0 100644
@@ -201,22 +201,8 @@
 /* ERR004536 is not applicable for the IP  */
 #define ESDHC_FLAG_SKIP_ERR004536	BIT(17)
 
-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 */
-};
-
-/*
- * struct esdhc_platform_data - platform data for esdhc on i.MX
- *
- * ESDHC_WP(CD)_CONTROLLER type is not available on i.MX25/35.

drivers/mmc/host/sdhci-esdhc-imx.c line 208

Quoted 10 lines
drivers/mmc/host/sdhci-esdhc-imx.c +1 -5
- *
- * @wp_type:	type of write_protect method (see wp_types enum above)
- */
-
+/* struct esdhc_platform_data - platform data for esdhc on i.MX */
 struct esdhc_platform_data {
-	enum wp_types wp_type;
 	int max_bus_width;
 	unsigned int delay_line;
 	unsigned int tuning_step;       /* The delay cell steps in tuning

procedure */

Quoted 38 lines
drivers/mmc/host/sdhci-esdhc-imx.c +0 -19
@@ -994,25 +980,6 @@ static inline void esdhc_pltfm_set_clock(struct
 sdhci_host *host,
 
 }
 
-static unsigned int esdhc_pltfm_get_ro(struct sdhci_host *host) -{
-	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
-	struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host);
-	struct esdhc_platform_data *boarddata = &imx_data->boarddata;
-
-	switch (boarddata->wp_type) {
-	case ESDHC_WP_GPIO:
-		return mmc_gpio_get_ro(host->mmc);
-	case ESDHC_WP_CONTROLLER:
-		return !(readl(host->ioaddr + SDHCI_PRESENT_STATE) &
-			       SDHCI_WRITE_PROTECT);
-	case ESDHC_WP_NONE:
-		break;
-	}
-
-	return -ENOSYS;
-}
-
 static void esdhc_pltfm_set_bus_width(struct sdhci_host *host, int
 width)  {
 	u32 ctrl;
@@ -1380,7 +1347,6 @@ static struct sdhci_ops sdhci_esdhc_ops = {
 	.get_max_clock = esdhc_pltfm_get_max_clock,
 	.get_min_clock = esdhc_pltfm_get_min_clock,
 	.get_max_timeout_count = esdhc_get_max_timeout_count,
-	.get_ro = esdhc_pltfm_get_ro,
 	.set_timeout = esdhc_set_timeout,
 	.set_bus_width = esdhc_pltfm_set_bus_width,
 	.set_uhs_signaling = esdhc_set_uhs_signaling, @@ -1588,17 +1554,6 @@

sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,

drivers/mmc/host/sdhci-esdhc-imx.c +0 -0
 	struct esdhc_platform_data *boarddata = &imx_data->boarddata;
 	int ret;
Quoted 8 lines

drivers/mmc/host/sdhci-esdhc-imx.c sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, · line 1592

Quoted 2 lines
drivers/mmc/host/sdhci-esdhc-imx.c +0 -2
-	if (of_property_read_bool(np, "fsl,wp-controller"))
-		boarddata->wp_type = ESDHC_WP_CONTROLLER;

esdhc_pltfm_get_ro() differs from sdhci_check_ro() by defaulting to -ENOSYS if there is neither "fsl,wp-controller" nor "wp-gpios", which would result in write-protect off (not supported, e.g. microsd).
So more explanation is needed for why removing "fsl,wp-controller" will give the same result.

Okay, will add. Thanks.

Best Regards
Haibo Chen

Quoted 13 lines
Quoted 13 lines
drivers/mmc/host/sdhci-esdhc-imx.c +0 -9
-
-	/*
-	 * If we have this property, then activate WP check.
-	 * Retrieveing and requesting the actual WP GPIO will happen
-	 * in the call to mmc_of_parse().
-	 */
-	if (of_property_read_bool(np, "wp-gpios"))
-		boarddata->wp_type = ESDHC_WP_GPIO;
-
 	of_property_read_u32(np, "fsl,tuning-step", &boarddata->tuning_step);
 	of_property_read_u32(np, "fsl,tuning-start-tap",
 			     &boarddata->tuning_start_tap);
author maintainer
#6 lore raw

PATCH v2 3/4 dt-bindings: mmc: fsl-imx-esdhc: remove property "fsl,wp-controller"

In reply to [email protected]

From: Haibo Chen <[email protected]>

Driver do not use this property, so remove it here.

---
v2:
-fix dt-binding-check issue, also remove "fsl,wp-controller" in examples.

---
 Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml | 6 ------
 1 file changed, 6 deletions(-)
Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml +0 -6
index fbfd822b9270..e34b4fb4778a 100644
@@ -96,11 +96,6 @@ properties:
   interrupts:
     maxItems: 1
 
-  fsl,wp-controller:
-    description: |
-      boolean, if present, indicate to use controller internal write protection.
-    type: boolean
-
   fsl,delay-line:
     $ref: /schemas/types.yaml#/definitions/uint32
     description: |
@@ -190,7 +185,6 @@ examples:
         compatible = "fsl,imx51-esdhc";
         reg = <0x70004000 0x4000>;
         interrupts = <1>;
-        fsl,wp-controller;
     };
 
     mmc@70008000 {
Signature · 1 line
2.34.1
#7 lore raw

Re: [PATCH v2 3/4] dt-bindings: mmc: fsl-imx-esdhc: remove property "fsl,wp-controller"

Quoted 3 lines · On 06/05/2023 09:40, [email protected] wrote:

From: Haibo Chen <[email protected]>

Driver do not use this property, so remove it here.

You still need to expand the commit msg and justify why this property is being removed. "Driver" is vague, as it can be BSD driver which also might use this binding. Instead describe why this property should be removed, so we can understand also ABI implications.

Quoted 9 lines

---
v2:
-fix dt-binding-check issue, also remove "fsl,wp-controller" in examples.

---
 Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml | 6 ------
 1 file changed, 6 deletions(-)

Best regards,
Krzysztof

#8 lore raw

Re: [PATCH v2 3/4] dt-bindings: mmc: fsl-imx-esdhc: remove property "fsl,wp-controller"

Quoted 4 lines · Krzysztof Kozlowski

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

On 06/05/2023 09:40, [email protected] wrote:

Quoted 8 lines
Quoted 3 lines

From: Haibo Chen <[email protected]>

Driver do not use this property, so remove it here.

You still need to expand the commit msg and justify why this property is being removed. "Driver" is vague, as it can be BSD driver which also might use this binding. Instead describe why this property should be removed, so we can understand also ABI implications.

The better approach would be mark it as deprecated.

Regards,
Peng.

Quoted 14 lines
Quoted 10 lines

---
v2:
-fix dt-binding-check issue, also remove "fsl,wp-controller" in examples.

---
  Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml | 6 ------
  1 file changed, 6 deletions(-)

Best regards,
Krzysztof

maintainer
#9 lore raw

Re: [PATCH v2 3/4] dt-bindings: mmc: fsl-imx-esdhc: remove property "fsl,wp-controller"

Quoted 9 lines · Peng Fan
Quoted 6 lines · Krzysztof Kozlowski

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

Quoted 2 lines · On 06/05/2023 09:40, [email protected] wrote:

From: Haibo Chen <[email protected]>

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Driver do not use this property, so remove it here.

You still need to expand the commit msg and justify why this property is being removed. "Driver" is vague, as it can be BSD driver which also might use this binding. Instead describe why this property should be removed, so we can understand also ABI implications.

The better approach would be mark it as deprecated.

Sure, but still need to say why.

Rob

author maintainer
#10 lore raw

PATCH v2 4/4 arm: dts: imx: remove "fsl,wp-controller" since it is dropped

In reply to [email protected]

From: Haibo Chen <[email protected]>

The driver sdhci-esdhc-imx.c drop the "fsl,wp-controller", so do a clean up in the dts file.

Now the logic of write protect is:
if want to use gpio method to implement the write protect, need to add "wp-gpios" in dts file, otherwise will use the controller internal logic to implement the write protect. This controller method need to config one pin as a specific write protect function used for the controller. If not do this config or the board do not has this pin connect to card socket, then the write is enabled.

So now remove "fsl,wp-controller" will not involve any logic change.

---
 arch/arm/boot/dts/imx53-sk-imx53.dts         | 1 -
 arch/arm/boot/dts/imx53-tx53.dtsi            | 2 --
 arch/arm/boot/dts/imx6dl-tx6s-8035.dts       | 1 -
 arch/arm/boot/dts/imx6dl-tx6u-8033.dts       | 1 -
 arch/arm/boot/dts/imx6q-bosch-acc.dts        | 2 --
 arch/arm/boot/dts/imx6q-tx6q-1020-comtft.dts | 1 -
 arch/arm/boot/dts/imx6q-tx6q-1020.dts        | 1 -
 arch/arm/boot/dts/imx6q-tx6q-1036.dts        | 1 -
 arch/arm/boot/dts/imx6qdl-dhcom-som.dtsi     | 1 -
 arch/arm/boot/dts/imx6qdl-emcon.dtsi         | 2 --
 arch/arm/boot/dts/imx6qdl-ts4900.dtsi        | 1 -
 arch/arm/boot/dts/imx6qdl-ts7970.dtsi        | 1 -
 arch/arm/boot/dts/imx6qdl-tx6.dtsi           | 2 --
 arch/arm/boot/dts/imx6qp-tx6qp-8037.dts      | 1 -
 arch/arm/boot/dts/imx6qp-tx6qp-8137.dts      | 1 -
 arch/arm/boot/dts/imx6ul-tx6ul-0011.dts      | 1 -
 arch/arm/boot/dts/imx6ul-tx6ul.dtsi          | 1 -
 arch/arm/boot/dts/imxrt1050.dtsi             | 1 -
 18 files changed, 22 deletions(-)
arch/arm/boot/dts/imx53-sk-imx53.dts +0 -1
index 103e73176e47..071e8b4b0a7e 100644
@@ -76,7 +76,6 @@ &ecspi2 {
 
 &esdhc1 {
 	cd-gpios = <&gpio3 14 GPIO_ACTIVE_LOW>;
-	fsl,wp-controller;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_esdhc1>;
 	status = "okay";
arch/arm/boot/dts/imx53-tx53.dtsi +0 -2
index a439a47fb65a..4bef504008cc 100644
@@ -196,7 +196,6 @@ &gpio3 19 GPIO_ACTIVE_HIGH
 
 &esdhc1 {
 	cd-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>;
-	fsl,wp-controller;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_esdhc1>;
 	status = "okay";
@@ -204,7 +203,6 @@ &esdhc1 {
 
 &esdhc2 {
 	cd-gpios = <&gpio3 25 GPIO_ACTIVE_LOW>;
-	fsl,wp-controller;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_esdhc2>;
 	status = "okay";
arch/arm/boot/dts/imx6dl-tx6s-8035.dts +0 -1
index a5532ecc18c5..63f043372931 100644
@@ -67,7 +67,6 @@ &usdhc4 {
 	bus-width = <4>;
 	non-removable;
 	no-1-8-v;
-	fsl,wp-controller;
 	status = "okay";
 };
 
arch/arm/boot/dts/imx6dl-tx6u-8033.dts +0 -1
index 7030b2654bbd..2d24dae7dbfc 100644
@@ -63,7 +63,6 @@ &usdhc4 {
 	bus-width = <4>;
 	non-removable;
 	no-1-8-v;
-	fsl,wp-controller;
 	status = "okay";
 };
 
arch/arm/boot/dts/imx6q-bosch-acc.dts +0 -2
index 8263bfef9bf8..26794f425a59 100644
@@ -573,7 +573,6 @@ &usdhc2 {
 	wakeup-source;
 	voltage-ranges = <3300 3300>;
 	vmmc-supply = <&reg_sw4>;
-	fsl,wp-controller;
 	status = "okay";
 };
 
@@ -586,7 +585,6 @@ &usdhc4 {
 	keep-power-in-suspend;
 	voltage-ranges = <3300 3300>;
 	vmmc-supply = <&reg_sw4>;
-	fsl,wp-controller;
 	status = "okay";
 };
 
arch/arm/boot/dts/imx6q-tx6q-1020-comtft.dts +0 -1
index a773f252816c..15956a92fe8b 100644
@@ -91,7 +91,6 @@ &usdhc4 {
 	pinctrl-0 = <&pinctrl_usdhc4>;
 	bus-width = <4>;
 	no-1-8-v;
-	fsl,wp-controller;
 	status = "okay";
 };
 
arch/arm/boot/dts/imx6q-tx6q-1020.dts +0 -1
index 0a4daec8d3ad..9dc92773c2f1 100644
@@ -67,7 +67,6 @@ &usdhc4 {
 	bus-width = <4>;
 	non-removable;
 	no-1-8-v;
-	fsl,wp-controller;
 	status = "okay";
 };
 
arch/arm/boot/dts/imx6q-tx6q-1036.dts +0 -1
index cb2fcb4896c6..24eba1d2afd9 100644
@@ -67,7 +67,6 @@ &usdhc4 {
 	bus-width = <4>;
 	non-removable;
 	no-1-8-v;
-	fsl,wp-controller;
 	status = "okay";
 };
 
arch/arm/boot/dts/imx6qdl-dhcom-som.dtsi +0 -1
index eaa87b333164..f8b985029f51 100644
@@ -412,7 +412,6 @@ &usdhc2 { /* External SD card via DHCOM */
 
 &usdhc3 { /* Micro SD card on module */
 	cd-gpios = <&gpio7 8 GPIO_ACTIVE_LOW>;
-	fsl,wp-controller;
 	keep-power-in-suspend;
 	pinctrl-0 = <&pinctrl_usdhc3>;
 	pinctrl-names = "default";
arch/arm/boot/dts/imx6qdl-emcon.dtsi +0 -2
index ee2dd75cead6..61306e6da6bd 100644
@@ -792,13 +792,11 @@ &usbotg {
 &usdhc1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_usdhc1>;
-	fsl,wp-controller;
 };
 
 &usdhc2 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_usdhc2>;
-	fsl,wp-controller;
 };
 
 &usdhc3 {
arch/arm/boot/dts/imx6qdl-ts4900.dtsi +0 -1
index f88da757edda..6d2f04434d6c 100644
@@ -464,7 +464,6 @@ &usdhc2 {
 	pinctrl-0 = <&pinctrl_usdhc2>;
 	vmmc-supply = <&reg_3p3v>;
 	bus-width = <4>;
-	fsl,wp-controller;
 	status = "okay";
 };
 
arch/arm/boot/dts/imx6qdl-ts7970.dtsi +0 -1
index 1e0a041e9f60..d4c967971f6a 100644
@@ -579,7 +579,6 @@ &usdhc2 {
 	pinctrl-0 = <&pinctrl_usdhc2>;
 	vmmc-supply = <&reg_3p3v>;
 	bus-width = <4>;
-	fsl,wp-controller;
 	status = "okay";
 };
 
arch/arm/boot/dts/imx6qdl-tx6.dtsi +0 -2
index a197bac95cba..e74fb3171656 100644
@@ -777,7 +777,6 @@ &usdhc1 {
 	bus-width = <4>;
 	no-1-8-v;
 	cd-gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
-	fsl,wp-controller;
 	status = "okay";
 };
 
@@ -787,6 +786,5 @@ &usdhc2 {
 	bus-width = <4>;
 	no-1-8-v;
 	cd-gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
-	fsl,wp-controller;
 	status = "okay";
 };
arch/arm/boot/dts/imx6qp-tx6qp-8037.dts +0 -1
index ffc0f2ee11d2..18cda0d42826 100644
@@ -67,7 +67,6 @@ &usdhc4 {
 	bus-width = <4>;
 	non-removable;
 	no-1-8-v;
-	fsl,wp-controller;
 	status = "okay";
 };
 
arch/arm/boot/dts/imx6qp-tx6qp-8137.dts +0 -1
index dd494d587014..7478ae7535f4 100644
@@ -71,7 +71,6 @@ &usdhc4 {
 	bus-width = <4>;
 	non-removable;
 	no-1-8-v;
-	fsl,wp-controller;
 	status = "okay";
 };
 
arch/arm/boot/dts/imx6ul-tx6ul-0011.dts +0 -1
index d82698e7d50f..5a2e8edf149e 100644
@@ -63,6 +63,5 @@ &usdhc2 {
 	bus-width = <4>;
 	no-1-8-v;
 	non-removable;
-	fsl,wp-controller;
 	status = "okay";
 };
arch/arm/boot/dts/imx6ul-tx6ul.dtsi +0 -1
index 70cef5e817bd..62c96884bfda 100644
@@ -575,7 +575,6 @@ &usdhc1 {
 	bus-width = <4>;
 	no-1-8-v;
 	cd-gpios = <&gpio4 14 GPIO_ACTIVE_LOW>;
-	fsl,wp-controller;
 	status = "okay";
 };
 
arch/arm/boot/dts/imxrt1050.dtsi +0 -1
index 852861558b47..7e983c52ebcd 100644
@@ -91,7 +91,6 @@ usdhc1: mmc@402c0000 {
 				<&clks IMXRT1050_CLK_USDHC1>;
 			clock-names = "ipg", "ahb", "per";
 			bus-width = <4>;
-			fsl,wp-controller;
 			no-1-8-v;
 			max-frequency = <200000000>;
 			fsl,tuning-start-tap = <20>;
Signature · 1 line
2.34.1