linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: "linux-renesas-soc@vger.kernel.org"  <linux-renesas-soc@vger.kernel.org>
Subject: RE: [PATCH/RFC] clk: renesas: r8a779a0: Add Z0 and Z1 clock support
Date: Wed, 4 Aug 2021 11:49:44 +0000	[thread overview]
Message-ID: <TY2PR01MB369226AD09A144F60F9D3E11D8F19@TY2PR01MB3692.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <2112e3bc870580c623bdecfeff8c74739699c610.1625219713.git.geert+renesas@glider.be>

Hi Geert-san,

Thank you for the patch!

> From: Geert Uytterhoeven, Sent: Friday, July 2, 2021 6:58 PM
> 
> Add support for the Z0 and Z1 (Cortex-A76 Sub-system 0 and 1) clocks,
> based on the existing support for Z clocks on R-Car Gen3.
> 
> As the offsets of the CPG_FRQCRB and CPG_FRQCRC registers on R-Car V3U
> differ from the offsets on other R-Car Gen3 SoCs, we cannot use the
> existing R-Car Gen3 support as-is.  For now, just make a copy, and
> change the register offsets.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Tested on Falcon by changing
> 
>     -#undef CLOCK_ALLOW_WRITE_DEBUGFS
>     +#define CLOCK_ALLOW_WRITE_DEBUGFS
> 
> in drivers/clk/clk.c, writing the desired clock rate to
> /sys/kernel/debug/clk/z0/clk_rate, and timing shell loops.
> The performance/clock rate looks fine over the full range from 56.25 MHz
> to 1.8 GHz.
> 
> RFC as it is not clear from the R-Car V3U User's Manual Rev. 0.5 if the
> CPG_FRQCRB.KICK bit applies to changes to CPG_FRQCRC or not:
>   - Section 8.2.12 ("Frequency Control Register B (FRQCRB)") says the
>     KICK bit activates the FRQCRB settings, but doesn't mention FRQCRC
>     like on R-Car Gen2 and Gen3,

The latest internal manual is also not clear about this unfortunately...

>   - Section 8.3 ("CPG Operation") says the KICK bit should be used when
>     changing Z0 or Z1.

I also understood it.

> Setting the KICK bit seems to work, and it is cleared automatically
> after 1 or 2 loops.

It looks good to me.

> The handling of Z clocks on R-Car Gen2, Gen3, and V3-U should be
> consolidated and moved to rcar-cpg-lib.c, so it can be shared by all
> clock drivers.

I think so. But, anyway,

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Best regards,
Yoshihiro Shimoda


      reply	other threads:[~2021-08-04 11:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-02  9:58 [PATCH/RFC] clk: renesas: r8a779a0: Add Z0 and Z1 clock support Geert Uytterhoeven
2021-08-04 11:49 ` Yoshihiro Shimoda [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=TY2PR01MB369226AD09A144F60F9D3E11D8F19@TY2PR01MB3692.jpnprd01.prod.outlook.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-renesas-soc@vger.kernel.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).