mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Dmitry Osipenko <digetx@gmail.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] PM / devfreq: tegra30: Improve initial hardware resetting
Date: Mon, 28 Sep 2020 12:20:59 +0900	[thread overview]
Message-ID: <9cf563cc-fa74-4a98-c4e2-022dab675a9d@samsung.com> (raw)
In-Reply-To: <20200927205139.19548-1-digetx@gmail.com>

On 9/28/20 5:51 AM, Dmitry Osipenko wrote:
> It's safe to enable the ACTMON clock at any time during driver probing,
> even if we don't know the state of hardware, because it's used only for
> collecting and processing stats, and interrupt is kept disabled. This
> allows us to slightly improve code which performs initial hardware
> resetting by making use of a single reset_control_reset() instead of
> assert/deassert pair. Secondly, a potential error of the reset-control
> API is handled nicely now.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  drivers/devfreq/tegra30-devfreq.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c
> index dedd39de7367..f5e74c2ede85 100644
> --- a/drivers/devfreq/tegra30-devfreq.c
> +++ b/drivers/devfreq/tegra30-devfreq.c
> @@ -822,8 +822,6 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
>  		return err;
>  	}
>  
> -	reset_control_assert(tegra->reset);
> -
>  	err = clk_prepare_enable(tegra->clock);
>  	if (err) {
>  		dev_err(&pdev->dev,
> @@ -831,7 +829,11 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
>  		return err;
>  	}
>  
> -	reset_control_deassert(tegra->reset);
> +	err = reset_control_reset(tegra->reset);
> +	if (err) {
> +		dev_err(&pdev->dev, "Failed to reset hardware: %d\n", err);
> +		goto disable_clk;
> +	}
>  
>  	rate = clk_round_rate(tegra->emc_clock, ULONG_MAX);
>  	if (rate < 0) {
> 

Applied it. Thanks.

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

      reply	other threads:[~2020-09-28  3:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200927205217epcas1p1f4fffea5e9df2ca3b6e3ac13d46156e3@epcas1p1.samsung.com>
2020-09-27 20:51 ` Dmitry Osipenko
2020-09-28  3:20   ` Chanwoo Choi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9cf563cc-fa74-4a98-c4e2-022dab675a9d@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®