* [PATCH] mmc: sdhci-esdhc-imx: don't exit in case of no pinctrl states
@ 2014-10-01 9:25 Andrew Gabbasov
2014-10-13 12:02 ` Andrew Gabbasov
2014-10-27 12:24 ` Ulf Hansson
0 siblings, 2 replies; 3+ messages in thread
From: Andrew Gabbasov @ 2014-10-01 9:25 UTC (permalink / raw)
To: linux-mmc
From: Dirk Behme <dirk.behme@de.bosch.com>
The commit ad93220de7da ("mmc: sdhci-esdhc-imx: change pinctrl state
according to uhs mode") exits the probe in case there are no valid
pinctrl states found.
As there are configurations doing the pin mux properly in the boot
loader, don't exit. Just warn, but go on in case if there are no
pinctrl states in the device tree.
Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index ccec0e3..b714b9d 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -1012,9 +1012,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
imx_data->pins_default = pinctrl_lookup_state(imx_data->pinctrl,
PINCTRL_STATE_DEFAULT);
if (IS_ERR(imx_data->pins_default)) {
- err = PTR_ERR(imx_data->pins_default);
- dev_err(mmc_dev(host->mmc), "could not get default state\n");
- goto disable_clk;
+ dev_warn(mmc_dev(host->mmc), "could not get default state\n");
}
host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
@@ -1103,7 +1101,8 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
}
/* sdr50 and sdr104 needs work on 1.8v signal voltage */
- if ((boarddata->support_vsel) && esdhc_is_usdhc(imx_data)) {
+ if ((boarddata->support_vsel) && esdhc_is_usdhc(imx_data) &&
+ !IS_ERR(imx_data->pins_default)) {
imx_data->pins_100mhz = pinctrl_lookup_state(imx_data->pinctrl,
ESDHC_PINCTRL_STATE_100MHZ);
imx_data->pins_200mhz = pinctrl_lookup_state(imx_data->pinctrl,
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [PATCH] mmc: sdhci-esdhc-imx: don't exit in case of no pinctrl states
2014-10-01 9:25 [PATCH] mmc: sdhci-esdhc-imx: don't exit in case of no pinctrl states Andrew Gabbasov
@ 2014-10-13 12:02 ` Andrew Gabbasov
2014-10-27 12:24 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Gabbasov @ 2014-10-13 12:02 UTC (permalink / raw)
To: linux-mmc
Hi,
Any comments on this?
> -----Original Message-----
> From: Andrew Gabbasov [mailto:andrew_gabbasov@mentor.com]
> Sent: Wednesday, October 01, 2014 1:26 PM
> To: linux-mmc@vger.kernel.org
> Subject: [PATCH] mmc: sdhci-esdhc-imx: don't exit in case of no pinctrl
states
>
> From: Dirk Behme <dirk.behme@de.bosch.com>
>
> The commit ad93220de7da ("mmc: sdhci-esdhc-imx: change pinctrl state
> according to uhs mode") exits the probe in case there are no valid
> pinctrl states found.
>
> As there are configurations doing the pin mux properly in the boot
> loader, don't exit. Just warn, but go on in case if there are no
> pinctrl states in the device tree.
>
> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
> Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
> ---
> drivers/mmc/host/sdhci-esdhc-imx.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c
b/drivers/mmc/host/sdhci-esdhc-imx.c
> index ccec0e3..b714b9d 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -1012,9 +1012,7 @@ static int sdhci_esdhc_imx_probe(struct
platform_device *pdev)
> imx_data->pins_default = pinctrl_lookup_state(imx_data->pinctrl,
> PINCTRL_STATE_DEFAULT);
> if (IS_ERR(imx_data->pins_default)) {
> - err = PTR_ERR(imx_data->pins_default);
> - dev_err(mmc_dev(host->mmc), "could not get default
state\n");
> - goto disable_clk;
> + dev_warn(mmc_dev(host->mmc), "could not get default
state\n");
> }
>
> host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
> @@ -1103,7 +1101,8 @@ static int sdhci_esdhc_imx_probe(struct
platform_device *pdev)
> }
>
> /* sdr50 and sdr104 needs work on 1.8v signal voltage */
> - if ((boarddata->support_vsel) && esdhc_is_usdhc(imx_data)) {
> + if ((boarddata->support_vsel) && esdhc_is_usdhc(imx_data) &&
> + !IS_ERR(imx_data->pins_default)) {
> imx_data->pins_100mhz =
pinctrl_lookup_state(imx_data->pinctrl,
> ESDHC_PINCTRL_STATE_100MHZ);
> imx_data->pins_200mhz =
pinctrl_lookup_state(imx_data->pinctrl,
> --
> 2.1.0
Thanks.
Best regards,
Andrew Gabbasov
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] mmc: sdhci-esdhc-imx: don't exit in case of no pinctrl states
2014-10-01 9:25 [PATCH] mmc: sdhci-esdhc-imx: don't exit in case of no pinctrl states Andrew Gabbasov
2014-10-13 12:02 ` Andrew Gabbasov
@ 2014-10-27 12:24 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2014-10-27 12:24 UTC (permalink / raw)
To: Andrew Gabbasov; +Cc: linux-mmc
On 1 October 2014 11:25, Andrew Gabbasov <andrew_gabbasov@mentor.com> wrote:
> From: Dirk Behme <dirk.behme@de.bosch.com>
>
> The commit ad93220de7da ("mmc: sdhci-esdhc-imx: change pinctrl state
> according to uhs mode") exits the probe in case there are no valid
> pinctrl states found.
>
> As there are configurations doing the pin mux properly in the boot
> loader, don't exit. Just warn, but go on in case if there are no
> pinctrl states in the device tree.
>
> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
> Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Thanks! Applied for next with a minor fix, see below!
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci-esdhc-imx.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index ccec0e3..b714b9d 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -1012,9 +1012,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
> imx_data->pins_default = pinctrl_lookup_state(imx_data->pinctrl,
> PINCTRL_STATE_DEFAULT);
> if (IS_ERR(imx_data->pins_default)) {
> - err = PTR_ERR(imx_data->pins_default);
> - dev_err(mmc_dev(host->mmc), "could not get default state\n");
> - goto disable_clk;
> + dev_warn(mmc_dev(host->mmc), "could not get default state\n");
This "if" don't need the brackets any more. I removed them.
> }
>
> host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
> @@ -1103,7 +1101,8 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
> }
>
> /* sdr50 and sdr104 needs work on 1.8v signal voltage */
> - if ((boarddata->support_vsel) && esdhc_is_usdhc(imx_data)) {
> + if ((boarddata->support_vsel) && esdhc_is_usdhc(imx_data) &&
> + !IS_ERR(imx_data->pins_default)) {
> imx_data->pins_100mhz = pinctrl_lookup_state(imx_data->pinctrl,
> ESDHC_PINCTRL_STATE_100MHZ);
> imx_data->pins_200mhz = pinctrl_lookup_state(imx_data->pinctrl,
> --
> 2.1.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-27 12:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-01 9:25 [PATCH] mmc: sdhci-esdhc-imx: don't exit in case of no pinctrl states Andrew Gabbasov
2014-10-13 12:02 ` Andrew Gabbasov
2014-10-27 12:24 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox