Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1713884 > unrolled thread

[PATCH] mmc: tegra: suppress errors when probe is deferred

Started byTimo Alho <talho@nvidia.com>
First post2017-08-17 14:00 +0200
Last post2017-08-22 11:30 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] mmc: tegra: suppress errors when probe is deferred Timo Alho <talho@nvidia.com> - 2017-08-17 14:00 +0200
    Re: [PATCH] mmc: tegra: suppress errors when probe is deferred Adrian Hunter <adrian.hunter@intel.com> - 2017-08-21 15:20 +0200
    Re: [PATCH] mmc: tegra: suppress errors when probe is deferred Ulf Hansson <ulf.hansson@linaro.org> - 2017-08-22 11:30 +0200

#1713884 — [PATCH] mmc: tegra: suppress errors when probe is deferred

FromTimo Alho <talho@nvidia.com>
Date2017-08-17 14:00 +0200
Subject[PATCH] mmc: tegra: suppress errors when probe is deferred
Message-ID<ufrCW-4m1-33@gated-at.bofh.it>
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);
 		goto err_clk_get;
 	}
 	clk_prepare_enable(clk);
-- 
2.7.4

[toc] | [next] | [standalone]


#1716434

FromAdrian Hunter <adrian.hunter@intel.com>
Date2017-08-21 15:20 +0200
Message-ID<ugUMx-4R2-5@gated-at.bofh.it>
In reply to#1713884
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@nvidia.com>

One comment below, nevertheless:

Acked-by: Adrian Hunter <adrian.hunter@intel.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,

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);
> 

[toc] | [prev] | [next] | [standalone]


#1717214

FromUlf Hansson <ulf.hansson@linaro.org>
Date2017-08-22 11:30 +0200
Message-ID<uhdFw-ng-11@gated-at.bofh.it>
In reply to#1713884
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web