* [PATCH] mmc: tegra: suppress errors when probe is deferred
@ 2017-08-17 11:52 Timo Alho
[not found] ` <1502970766-23541-1-git-send-email-talho-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-08-22 9:27 ` Ulf Hansson
0 siblings, 2 replies; 3+ messages in thread
From: Timo Alho @ 2017-08-17 11:52 UTC (permalink / raw)
To: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
ulf.hansson-QSEj5FYQhm4dnm+yROfE0A,
adrian.hunter-ral2JQCrhuEAvxtiuMwx3w
Cc: linux-mmc-u79uwXL29TY76Z2rM5mHXA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Timo Alho
Don't print error message when clk_get() returns -EPROBE_DEFER. On
recent Tegra chips (t186 onwards), the clocks are provided by
auxiliary microprocessor (bpmp) and until the driver for it is probed
clocks are not available.
While at it, change the real error message more meaningful.
Signed-off-by: Timo Alho <talho-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
drivers/mmc/host/sdhci-tegra.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index f668a6f..cdde9ff 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -501,8 +501,10 @@ static int sdhci_tegra_probe(struct platform_device *pdev)
clk = devm_clk_get(mmc_dev(host->mmc), NULL);
if (IS_ERR(clk)) {
- dev_err(mmc_dev(host->mmc), "clk err\n");
rc = PTR_ERR(clk);
+ if (rc != -EPROBE_DEFER)
+ dev_err(&pdev->dev,
+ "failed to get controller clock: %d\n", rc);
goto err_clk_get;
}
clk_prepare_enable(clk);
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1502970766-23541-1-git-send-email-talho-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] mmc: tegra: suppress errors when probe is deferred
[not found] ` <1502970766-23541-1-git-send-email-talho-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2017-08-21 13:05 ` Adrian Hunter
0 siblings, 0 replies; 3+ messages in thread
From: Adrian Hunter @ 2017-08-21 13:05 UTC (permalink / raw)
To: Timo Alho, thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
ulf.hansson-QSEj5FYQhm4dnm+yROfE0A
Cc: linux-mmc-u79uwXL29TY76Z2rM5mHXA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On 17/08/17 14:52, Timo Alho wrote:
> Don't print error message when clk_get() returns -EPROBE_DEFER. On
> recent Tegra chips (t186 onwards), the clocks are provided by
> auxiliary microprocessor (bpmp) and until the driver for it is probed
> clocks are not available.
>
> While at it, change the real error message more meaningful.
>
> Signed-off-by: Timo Alho <talho-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
One comment below, nevertheless:
Acked-by: Adrian Hunter <adrian.hunter-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> ---
> drivers/mmc/host/sdhci-tegra.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
> index f668a6f..cdde9ff 100644
> --- a/drivers/mmc/host/sdhci-tegra.c
> +++ b/drivers/mmc/host/sdhci-tegra.c
> @@ -501,8 +501,10 @@ static int sdhci_tegra_probe(struct platform_device *pdev)
>
> clk = devm_clk_get(mmc_dev(host->mmc), NULL);
> if (IS_ERR(clk)) {
> - dev_err(mmc_dev(host->mmc), "clk err\n");
> rc = PTR_ERR(clk);
> + if (rc != -EPROBE_DEFER)
> + dev_err(&pdev->dev,
Looks a bit weird sometimes using mmc_dev(host->mmc) and sometimes &pdev->dev.
> + "failed to get controller clock: %d\n", rc);
> goto err_clk_get;
> }
> clk_prepare_enable(clk);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: tegra: suppress errors when probe is deferred
2017-08-17 11:52 [PATCH] mmc: tegra: suppress errors when probe is deferred Timo Alho
[not found] ` <1502970766-23541-1-git-send-email-talho-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2017-08-22 9:27 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2017-08-22 9:27 UTC (permalink / raw)
To: Timo Alho
Cc: Thierry Reding, Adrian Hunter, linux-mmc@vger.kernel.org,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
On 17 August 2017 at 13:52, Timo Alho <talho@nvidia.com> wrote:
> Don't print error message when clk_get() returns -EPROBE_DEFER. On
> recent Tegra chips (t186 onwards), the clocks are provided by
> auxiliary microprocessor (bpmp) and until the driver for it is probed
> clocks are not available.
>
> While at it, change the real error message more meaningful.
>
> Signed-off-by: Timo Alho <talho@nvidia.com>
> ---
> drivers/mmc/host/sdhci-tegra.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
> index f668a6f..cdde9ff 100644
> --- a/drivers/mmc/host/sdhci-tegra.c
> +++ b/drivers/mmc/host/sdhci-tegra.c
> @@ -501,8 +501,10 @@ static int sdhci_tegra_probe(struct platform_device *pdev)
>
> clk = devm_clk_get(mmc_dev(host->mmc), NULL);
> if (IS_ERR(clk)) {
> - dev_err(mmc_dev(host->mmc), "clk err\n");
> rc = PTR_ERR(clk);
> + if (rc != -EPROBE_DEFER)
> + dev_err(&pdev->dev,
> + "failed to get controller clock: %d\n", rc);
There is no need to print an error in any case, as the common clk
framework deals with relevant error printing.
> goto err_clk_get;
> }
> clk_prepare_enable(clk);
> --
> 2.7.4
>
Kind regards
Uffe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-22 9:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-17 11:52 [PATCH] mmc: tegra: suppress errors when probe is deferred Timo Alho
[not found] ` <1502970766-23541-1-git-send-email-talho-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-08-21 13:05 ` Adrian Hunter
2017-08-22 9:27 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox