All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: dts: imx51-babbage: Remove custom properties
@ 2013-10-07 17:32 Fabio Estevam
  2013-10-07 17:32   ` Fabio Estevam
  0 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2013-10-07 17:32 UTC (permalink / raw)
  To: shawn.guo; +Cc: linux-kernel, Fabio Estevam

No need to use such custom properties as the mmc core can handle card detection
properly when no GPIO is passed.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 arch/arm/boot/dts/imx51-babbage.dts | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts
index f13f339..0ecb42c 100644
--- a/arch/arm/boot/dts/imx51-babbage.dts
+++ b/arch/arm/boot/dts/imx51-babbage.dts
@@ -80,8 +80,6 @@
 &esdhc1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_esdhc1_1>;
-	fsl,cd-controller;
-	fsl,wp-controller;
 	status = "okay";
 };
 
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] mmc: sdhci-esdhc-imx: Remove custom properties
  2013-10-07 17:32 [PATCH 1/2] ARM: dts: imx51-babbage: Remove custom properties Fabio Estevam
@ 2013-10-07 17:32   ` Fabio Estevam
  0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2013-10-07 17:32 UTC (permalink / raw)
  To: shawn.guo; +Cc: linux-kernel, Fabio Estevam, Chris Ball, linux-mmc

According to Documentation/devicetree/bindings/mmc/mmc.txt:

"Card detection:
If no property below is supplied, host native card detect is used.
Only one of the properties in this section should be supplied:
  - broken-cd: There is no card detection available; polling must be used.
  - cd-gpios: Specify GPIOs for card detection, see gpio binding
  - non-removable: non-removable slot (like eMMC); assume always present. "

So remove the custom fsl,cd-controller and fsl,wp-controller properties, as the
mmc core can take care of it.

Tested on mx51babbage, mx53qsb boards and mx6qsabresd boards.

Cc: Chris Ball <cjb@laptop.org>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | 6 ------
 drivers/mmc/host/sdhci-esdhc-imx.c                      | 6 ------
 2 files changed, 12 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
index 1dd6225..5da8ab0 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
+++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
@@ -9,18 +9,12 @@ by mmc.txt and the properties used by the sdhci-esdhc-imx driver.
 Required properties:
 - compatible : Should be "fsl,<chip>-esdhc"
 
-Optional properties:
-- fsl,cd-controller : Indicate to use controller internal card detection
-- fsl,wp-controller : Indicate to use controller internal write protection
-
 Examples:
 
 esdhc@70004000 {
 	compatible = "fsl,imx51-esdhc";
 	reg = <0x70004000 0x4000>;
 	interrupts = <1>;
-	fsl,cd-controller;
-	fsl,wp-controller;
 };
 
 esdhc@70008000 {
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index b9899e9..07662d1 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -796,12 +796,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
 	if (of_get_property(np, "non-removable", NULL))
 		boarddata->cd_type = ESDHC_CD_PERMANENT;
 
-	if (of_get_property(np, "fsl,cd-controller", NULL))
-		boarddata->cd_type = ESDHC_CD_CONTROLLER;
-
-	if (of_get_property(np, "fsl,wp-controller", NULL))
-		boarddata->wp_type = ESDHC_WP_CONTROLLER;
-
 	boarddata->cd_gpio = of_get_named_gpio(np, "cd-gpios", 0);
 	if (gpio_is_valid(boarddata->cd_gpio))
 		boarddata->cd_type = ESDHC_CD_GPIO;
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] mmc: sdhci-esdhc-imx: Remove custom properties
@ 2013-10-07 17:32   ` Fabio Estevam
  0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2013-10-07 17:32 UTC (permalink / raw)
  To: shawn.guo; +Cc: linux-kernel, Fabio Estevam, Chris Ball, linux-mmc

According to Documentation/devicetree/bindings/mmc/mmc.txt:

"Card detection:
If no property below is supplied, host native card detect is used.
Only one of the properties in this section should be supplied:
  - broken-cd: There is no card detection available; polling must be used.
  - cd-gpios: Specify GPIOs for card detection, see gpio binding
  - non-removable: non-removable slot (like eMMC); assume always present. "

So remove the custom fsl,cd-controller and fsl,wp-controller properties, as the
mmc core can take care of it.

Tested on mx51babbage, mx53qsb boards and mx6qsabresd boards.

Cc: Chris Ball <cjb@laptop.org>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | 6 ------
 drivers/mmc/host/sdhci-esdhc-imx.c                      | 6 ------
 2 files changed, 12 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
index 1dd6225..5da8ab0 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
+++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
@@ -9,18 +9,12 @@ by mmc.txt and the properties used by the sdhci-esdhc-imx driver.
 Required properties:
 - compatible : Should be "fsl,<chip>-esdhc"
 
-Optional properties:
-- fsl,cd-controller : Indicate to use controller internal card detection
-- fsl,wp-controller : Indicate to use controller internal write protection
-
 Examples:
 
 esdhc@70004000 {
 	compatible = "fsl,imx51-esdhc";
 	reg = <0x70004000 0x4000>;
 	interrupts = <1>;
-	fsl,cd-controller;
-	fsl,wp-controller;
 };
 
 esdhc@70008000 {
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index b9899e9..07662d1 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -796,12 +796,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
 	if (of_get_property(np, "non-removable", NULL))
 		boarddata->cd_type = ESDHC_CD_PERMANENT;
 
-	if (of_get_property(np, "fsl,cd-controller", NULL))
-		boarddata->cd_type = ESDHC_CD_CONTROLLER;
-
-	if (of_get_property(np, "fsl,wp-controller", NULL))
-		boarddata->wp_type = ESDHC_WP_CONTROLLER;
-
 	boarddata->cd_gpio = of_get_named_gpio(np, "cd-gpios", 0);
 	if (gpio_is_valid(boarddata->cd_gpio))
 		boarddata->cd_type = ESDHC_CD_GPIO;
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] mmc: sdhci-esdhc-imx: Remove custom properties
  2013-10-07 17:32   ` Fabio Estevam
@ 2013-10-08  6:45     ` Shawn Guo
  -1 siblings, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2013-10-08  6:45 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: linux-kernel, Chris Ball, linux-mmc

On Mon, Oct 07, 2013 at 02:32:24PM -0300, Fabio Estevam wrote:
> According to Documentation/devicetree/bindings/mmc/mmc.txt:
> 
> "Card detection:
> If no property below is supplied, host native card detect is used.
> Only one of the properties in this section should be supplied:
>   - broken-cd: There is no card detection available; polling must be used.
>   - cd-gpios: Specify GPIOs for card detection, see gpio binding
>   - non-removable: non-removable slot (like eMMC); assume always present. "
> 
> So remove the custom fsl,cd-controller and fsl,wp-controller properties, as the
> mmc core can take care of it.
> 
> Tested on mx51babbage, mx53qsb boards and mx6qsabresd boards.
> 
> Cc: Chris Ball <cjb@laptop.org>
> Cc: <linux-mmc@vger.kernel.org>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | 6 ------
>  drivers/mmc/host/sdhci-esdhc-imx.c                      | 6 ------
>  2 files changed, 12 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> index 1dd6225..5da8ab0 100644
> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> @@ -9,18 +9,12 @@ by mmc.txt and the properties used by the sdhci-esdhc-imx driver.
>  Required properties:
>  - compatible : Should be "fsl,<chip>-esdhc"
>  
> -Optional properties:
> -- fsl,cd-controller : Indicate to use controller internal card detection
> -- fsl,wp-controller : Indicate to use controller internal write protection
> -
>  Examples:
>  
>  esdhc@70004000 {
>  	compatible = "fsl,imx51-esdhc";
>  	reg = <0x70004000 0x4000>;
>  	interrupts = <1>;
> -	fsl,cd-controller;
> -	fsl,wp-controller;
>  };
>  
>  esdhc@70008000 {
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index b9899e9..07662d1 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -796,12 +796,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
>  	if (of_get_property(np, "non-removable", NULL))
>  		boarddata->cd_type = ESDHC_CD_PERMANENT;
>  
> -	if (of_get_property(np, "fsl,cd-controller", NULL))
> -		boarddata->cd_type = ESDHC_CD_CONTROLLER;

Without this removed, flag SDHCI_QUIRK_BROKEN_CARD_DETECTION will be
kept for the host controller.  Consequently, MMC_CAP_NEEDS_POLL is set,
and we will use polling for card-detection.

Shawn

> -
> -	if (of_get_property(np, "fsl,wp-controller", NULL))
> -		boarddata->wp_type = ESDHC_WP_CONTROLLER;
> -
>  	boarddata->cd_gpio = of_get_named_gpio(np, "cd-gpios", 0);
>  	if (gpio_is_valid(boarddata->cd_gpio))
>  		boarddata->cd_type = ESDHC_CD_GPIO;
> -- 
> 1.8.1.2
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] mmc: sdhci-esdhc-imx: Remove custom properties
@ 2013-10-08  6:45     ` Shawn Guo
  0 siblings, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2013-10-08  6:45 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: linux-kernel, Chris Ball, linux-mmc

On Mon, Oct 07, 2013 at 02:32:24PM -0300, Fabio Estevam wrote:
> According to Documentation/devicetree/bindings/mmc/mmc.txt:
> 
> "Card detection:
> If no property below is supplied, host native card detect is used.
> Only one of the properties in this section should be supplied:
>   - broken-cd: There is no card detection available; polling must be used.
>   - cd-gpios: Specify GPIOs for card detection, see gpio binding
>   - non-removable: non-removable slot (like eMMC); assume always present. "
> 
> So remove the custom fsl,cd-controller and fsl,wp-controller properties, as the
> mmc core can take care of it.
> 
> Tested on mx51babbage, mx53qsb boards and mx6qsabresd boards.
> 
> Cc: Chris Ball <cjb@laptop.org>
> Cc: <linux-mmc@vger.kernel.org>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | 6 ------
>  drivers/mmc/host/sdhci-esdhc-imx.c                      | 6 ------
>  2 files changed, 12 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> index 1dd6225..5da8ab0 100644
> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
> @@ -9,18 +9,12 @@ by mmc.txt and the properties used by the sdhci-esdhc-imx driver.
>  Required properties:
>  - compatible : Should be "fsl,<chip>-esdhc"
>  
> -Optional properties:
> -- fsl,cd-controller : Indicate to use controller internal card detection
> -- fsl,wp-controller : Indicate to use controller internal write protection
> -
>  Examples:
>  
>  esdhc@70004000 {
>  	compatible = "fsl,imx51-esdhc";
>  	reg = <0x70004000 0x4000>;
>  	interrupts = <1>;
> -	fsl,cd-controller;
> -	fsl,wp-controller;
>  };
>  
>  esdhc@70008000 {
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index b9899e9..07662d1 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -796,12 +796,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
>  	if (of_get_property(np, "non-removable", NULL))
>  		boarddata->cd_type = ESDHC_CD_PERMANENT;
>  
> -	if (of_get_property(np, "fsl,cd-controller", NULL))
> -		boarddata->cd_type = ESDHC_CD_CONTROLLER;

Without this removed, flag SDHCI_QUIRK_BROKEN_CARD_DETECTION will be
kept for the host controller.  Consequently, MMC_CAP_NEEDS_POLL is set,
and we will use polling for card-detection.

Shawn

> -
> -	if (of_get_property(np, "fsl,wp-controller", NULL))
> -		boarddata->wp_type = ESDHC_WP_CONTROLLER;
> -
>  	boarddata->cd_gpio = of_get_named_gpio(np, "cd-gpios", 0);
>  	if (gpio_is_valid(boarddata->cd_gpio))
>  		boarddata->cd_type = ESDHC_CD_GPIO;
> -- 
> 1.8.1.2
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-10-08  6:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-07 17:32 [PATCH 1/2] ARM: dts: imx51-babbage: Remove custom properties Fabio Estevam
2013-10-07 17:32 ` [PATCH 2/2] mmc: sdhci-esdhc-imx: " Fabio Estevam
2013-10-07 17:32   ` Fabio Estevam
2013-10-08  6:45   ` Shawn Guo
2013-10-08  6:45     ` Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.