linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: boris.brezillon@free-electrons.com (Boris Brezillon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] clk: at91: utmi: use pmc_read when the at91_pmc is available
Date: Mon, 14 Sep 2015 16:31:52 +0200	[thread overview]
Message-ID: <20150914163152.30cd3d9c@bbrezillon> (raw)
In-Reply-To: <1441982047-11303-1-git-send-email-alexandre.belloni@free-electrons.com>

Hi Alexandre,

On Fri, 11 Sep 2015 16:34:06 +0200
Alexandre Belloni <alexandre.belloni@free-electrons.com> wrote:

> at91_pmc_read is a workaround to allow external drivers to acces some
> registers of the PMC. There is no need for it in clk-utmi.c as we aready
> have a pointer to the struct at91_pmc.

Indeed.

> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>

Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>

Thanks,

Boris

> ---
>  drivers/clk/at91/clk-utmi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/at91/clk-utmi.c b/drivers/clk/at91/clk-utmi.c
> index 30dd697b1668..ca561e90a60f 100644
> --- a/drivers/clk/at91/clk-utmi.c
> +++ b/drivers/clk/at91/clk-utmi.c
> @@ -47,7 +47,7 @@ static int clk_utmi_prepare(struct clk_hw *hw)
>  {
>  	struct clk_utmi *utmi = to_clk_utmi(hw);
>  	struct at91_pmc *pmc = utmi->pmc;
> -	u32 tmp = at91_pmc_read(AT91_CKGR_UCKR) | AT91_PMC_UPLLEN |
> +	u32 tmp = pmc_read(pmc, AT91_CKGR_UCKR) | AT91_PMC_UPLLEN |
>  		  AT91_PMC_UPLLCOUNT | AT91_PMC_BIASEN;
>  
>  	pmc_write(pmc, AT91_CKGR_UCKR, tmp);
> @@ -73,7 +73,7 @@ static void clk_utmi_unprepare(struct clk_hw *hw)
>  {
>  	struct clk_utmi *utmi = to_clk_utmi(hw);
>  	struct at91_pmc *pmc = utmi->pmc;
> -	u32 tmp = at91_pmc_read(AT91_CKGR_UCKR) & ~AT91_PMC_UPLLEN;
> +	u32 tmp = pmc_read(pmc, AT91_CKGR_UCKR) & ~AT91_PMC_UPLLEN;
>  
>  	pmc_write(pmc, AT91_CKGR_UCKR, tmp);
>  }



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  parent reply	other threads:[~2015-09-14 14:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-11 14:34 [PATCH 1/2] clk: at91: utmi: use pmc_read when the at91_pmc is available Alexandre Belloni
2015-09-11 14:34 ` [PATCH 2/2] clk: at91: system: don't try to free_irq when there is no IRQ Alexandre Belloni
2015-09-14 14:40   ` Boris Brezillon
2015-09-14 21:57   ` Stephen Boyd
2015-09-14 14:31 ` Boris Brezillon [this message]
2015-09-14 21:57 ` [PATCH 1/2] clk: at91: utmi: use pmc_read when the at91_pmc is available Stephen Boyd

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=20150914163152.30cd3d9c@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).