* [PATCH] mmc: sdhci-esdhc-imx: Remove unneeded code
@ 2015-05-07 18:00 Fabio Estevam
2015-05-08 2:24 ` Shawn Guo
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Fabio Estevam @ 2015-05-07 18:00 UTC (permalink / raw)
To: ulf.hansson; +Cc: shawn.guo, kernel, linux-mmc, Fabio Estevam
Since commit 8d86e4fcccf61 ("mmc: sdhci-esdhc-imx: Call mmc_of_parse()")
the 'non-removable' and 'cd-gpios' properties are handled by
mmc_of_parse(), so we can safely remove the pieces of code that still
handles them.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 8eed843..d7b0a39 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -872,19 +872,12 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
if (!np)
return -ENODEV;
- 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;
-
boarddata->wp_gpio = of_get_named_gpio(np, "wp-gpios", 0);
if (gpio_is_valid(boarddata->wp_gpio))
boarddata->wp_type = ESDHC_WP_GPIO;
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] mmc: sdhci-esdhc-imx: Remove unneeded code
2015-05-07 18:00 [PATCH] mmc: sdhci-esdhc-imx: Remove unneeded code Fabio Estevam
@ 2015-05-08 2:24 ` Shawn Guo
2015-05-08 4:41 ` Sascha Hauer
2015-05-08 11:49 ` Ulf Hansson
2 siblings, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2015-05-08 2:24 UTC (permalink / raw)
To: Fabio Estevam; +Cc: ulf.hansson, kernel, linux-mmc
On Thu, May 07, 2015 at 03:00:09PM -0300, Fabio Estevam wrote:
> Since commit 8d86e4fcccf61 ("mmc: sdhci-esdhc-imx: Call mmc_of_parse()")
> the 'non-removable' and 'cd-gpios' properties are handled by
> mmc_of_parse(), so we can safely remove the pieces of code that still
> handles them.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
It looks like a left-over of commit 8d86e4fcccf61.
Acked-by: Shawn Guo <shawn.guo@linaro.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mmc: sdhci-esdhc-imx: Remove unneeded code
2015-05-07 18:00 [PATCH] mmc: sdhci-esdhc-imx: Remove unneeded code Fabio Estevam
2015-05-08 2:24 ` Shawn Guo
@ 2015-05-08 4:41 ` Sascha Hauer
2015-05-08 5:59 ` Fabio Estevam
2015-05-08 11:49 ` Ulf Hansson
2 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2015-05-08 4:41 UTC (permalink / raw)
To: Fabio Estevam; +Cc: ulf.hansson, shawn.guo, linux-mmc, kernel
On Thu, May 07, 2015 at 03:00:09PM -0300, Fabio Estevam wrote:
> Since commit 8d86e4fcccf61 ("mmc: sdhci-esdhc-imx: Call mmc_of_parse()")
> the 'non-removable' and 'cd-gpios' properties are handled by
> mmc_of_parse(), so we can safely remove the pieces of code that still
> handles them.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> drivers/mmc/host/sdhci-esdhc-imx.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 8eed843..d7b0a39 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -872,19 +872,12 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
> if (!np)
> return -ENODEV;
>
> - 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;
> -
> boarddata->wp_gpio = of_get_named_gpio(np, "wp-gpios", 0);
> if (gpio_is_valid(boarddata->wp_gpio))
> boarddata->wp_type = ESDHC_WP_GPIO;
This is equally unused.
Commit 8d86e4fcccf61ba mmc: sdhci-esdhc-imx: Call mmc_of_parse()
is seriously broken. It removed the calls to
mmc_gpio_request_ro(host->mmc, boarddata->wp_gpio);
and
mmc_gpio_request_cd(host->mmc, boarddata->cd_gpio, 0);
This makes the boarddata gpios unused, thus effectivly breaking
platform_data provided cd/wp gpios. Not that I care much about
platform_data based boards, but maybe we should make that explicit.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mmc: sdhci-esdhc-imx: Remove unneeded code
2015-05-08 4:41 ` Sascha Hauer
@ 2015-05-08 5:59 ` Fabio Estevam
0 siblings, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2015-05-08 5:59 UTC (permalink / raw)
To: Sascha Hauer
Cc: Fabio Estevam, Ulf Hansson, Shawn Guo, linux-mmc@vger.kernel.org,
Sascha Hauer
Hi Sascha,
On Fri, May 8, 2015 at 1:41 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> Commit 8d86e4fcccf61ba mmc: sdhci-esdhc-imx: Call mmc_of_parse()
> is seriously broken. It removed the calls to
>
> mmc_gpio_request_ro(host->mmc, boarddata->wp_gpio);
>
> and
>
> mmc_gpio_request_cd(host->mmc, boarddata->cd_gpio, 0);
>
> This makes the boarddata gpios unused, thus effectivly breaking
> platform_data provided cd/wp gpios. Not that I care much about
> platform_data based boards, but maybe we should make that explicit.
You are right. I forgot about the non-dt case.
This affects mach-pcm043.c, so I am sending a series that will restore
the cd/wp functionality for the non-dt case.
Regards,
Fabio Estevam
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mmc: sdhci-esdhc-imx: Remove unneeded code
2015-05-07 18:00 [PATCH] mmc: sdhci-esdhc-imx: Remove unneeded code Fabio Estevam
2015-05-08 2:24 ` Shawn Guo
2015-05-08 4:41 ` Sascha Hauer
@ 2015-05-08 11:49 ` Ulf Hansson
2015-05-08 12:27 ` Fabio Estevam
2 siblings, 1 reply; 6+ messages in thread
From: Ulf Hansson @ 2015-05-08 11:49 UTC (permalink / raw)
To: Fabio Estevam; +Cc: Shawn Guo, Sascha Hauer, linux-mmc
On 7 May 2015 at 20:00, Fabio Estevam <fabio.estevam@freescale.com> wrote:
> Since commit 8d86e4fcccf61 ("mmc: sdhci-esdhc-imx: Call mmc_of_parse()")
> the 'non-removable' and 'cd-gpios' properties are handled by
> mmc_of_parse(), so we can safely remove the pieces of code that still
> handles them.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> drivers/mmc/host/sdhci-esdhc-imx.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 8eed843..d7b0a39 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -872,19 +872,12 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
> if (!np)
> return -ENODEV;
>
> - 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;
> -
> boarddata->wp_gpio = of_get_named_gpio(np, "wp-gpios", 0);
This seems like a leftover as well!?
> if (gpio_is_valid(boarddata->wp_gpio))
> boarddata->wp_type = ESDHC_WP_GPIO;
> --
> 1.9.1
>
Kind regards
Uffe
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mmc: sdhci-esdhc-imx: Remove unneeded code
2015-05-08 11:49 ` Ulf Hansson
@ 2015-05-08 12:27 ` Fabio Estevam
0 siblings, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2015-05-08 12:27 UTC (permalink / raw)
To: Ulf Hansson; +Cc: Fabio Estevam, Shawn Guo, Sascha Hauer, linux-mmc
On Fri, May 8, 2015 at 8:49 AM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>> -
>> boarddata->wp_gpio = of_get_named_gpio(np, "wp-gpios", 0);
>
> This seems like a leftover as well!?
Please discard this patch. I have sent another series that restores
the non-dt functionality.
Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-05-08 12:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-07 18:00 [PATCH] mmc: sdhci-esdhc-imx: Remove unneeded code Fabio Estevam
2015-05-08 2:24 ` Shawn Guo
2015-05-08 4:41 ` Sascha Hauer
2015-05-08 5:59 ` Fabio Estevam
2015-05-08 11:49 ` Ulf Hansson
2015-05-08 12:27 ` Fabio Estevam
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.