From: Simon Horman <horms+renesas@verge.net.au> To: linux-renesas-soc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Magnus Damm <magnus.damm@gmail.com>, Simon Horman <horms+renesas@verge.net.au> Subject: [PATCH v4 0/6] clk: renesas: r8a779[56]: Add Z and Z2 clock support Date: Wed, 3 Jan 2018 13:18:34 +0100 [thread overview] Message-ID: <20180103121840.29316-1-horms+renesas@verge.net.au> (raw) Hi, this patch-set adds Z and Z2 clock support. These are dependencies for supporting CPUFreq. The remainder of that work is being posted separately and can be found at: https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git topic/rcar-gen3-cpufreq-v4 Based on v4.15-rc1 Changes since v3: * Rebase * Divide parent clock by 2 to give correct rate (again) * Take care not to overflow multiplication on 32 but platforms * Use __ffs as FIELD_{GET,PREP} don't not work with non-constant masks * Use correct mask in cpg_z_clk_recalc_rate() Changes since v2: * Rebase * Address review of v2 as noted in patch changelogs Takeshi Kihara (6): clk: renesas: rcar-gen3: Add Z clock divider support clk: renesas: rcar-gen3: Add Z2 clock divider support clk: renesas: r8a7795: Add Z clock clk: renesas: r8a7795: Add Z2 clock clk: renesas: r8a7796: Add Z clock clk: renesas: r8a7796: Add Z2 clock drivers/clk/renesas/r8a7795-cpg-mssr.c | 2 + drivers/clk/renesas/r8a7796-cpg-mssr.c | 2 + drivers/clk/renesas/rcar-gen3-cpg.c | 143 +++++++++++++++++++++++++++++++++ drivers/clk/renesas/rcar-gen3-cpg.h | 2 + 4 files changed, 149 insertions(+) Results of testing this on the Salvator-X r8a7796 are as follows: On Boot ------- Z clock is half of pll0 and corresponds to CPU frequency. Z2 clock is half pll2. This is as expected. root@Debian:~# cd /sys/devices/system/cpu/cpu0/cpufreq root@Debian:/sys/devices/system/cpu/cpu0/cpufreq# grep -E -w "pll0|z" /sys/kernel/debug/clk/clk_summary; grep -E -w "pll2|z2" /sys/kernel/debug/clk/clk_summary; grep . *cur* .pll0 0 0 2999999880 0 0 z 0 0 1499999940 0 0 .pll2 0 0 2399999904 0 0 z2 0 0 1199999952 0 0 cpuinfo_cur_freq:1499999 scaling_cur_freq:1500000 CPU Freq scaled to 1000000 and then 500000 ------------------------------------------ Z clock corresponds to new CPU frequency. Z2 clock, PLL0 and PLL2 are unchanged. This is also as expected. root@Debian:/sys/devices/system/cpu/cpu0/cpufreq# echo 1000000 > scaling_max_freq root@Debian:/sys/devices/system/cpu/cpu0/cpufreq# grep -E -w "pll0|z" /sys/kernel/debug/clk/clk_summary; grep -E -w "pll2|z2" /sys/kernel/debug/clk/clk_summary; grep . *cur* grep . *cur*lk_summary; grep -E -w "pll2|z2" /sys/kernel/debug/clk/clk_summary; .pll0 0 0 2999999880 0 0 z 0 0 1031249959 0 0 .pll2 0 0 2399999904 0 0 z2 0 0 1199999952 0 0 cpuinfo_cur_freq:1031249 scaling_cur_freq:1000000 root@Debian:/sys/devices/system/cpu/cpu0/cpufreq# echo 500000 > scaling_max_freq root@Debian:/sys/devices/system/cpu/cpu0/cpufreq# grep -E -w "pll0|z" /sys/kernel/debug/clk/clk_summary; grep -E -w "pll2|z2" /sys/kernel/debug/clk/clk_summary; grep . *cur* .pll0 0 0 2999999880 0 0 z 0 0 468749981 0 0 .pll2 0 0 2399999904 0 0 z2 0 0 1199999952 0 0 cpuinfo_cur_freq:468749 scaling_cur_freq:500000
WARNING: multiple messages have this Message-ID (diff)
From: horms+renesas@verge.net.au (Simon Horman) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 0/6] clk: renesas: r8a779[56]: Add Z and Z2 clock support Date: Wed, 3 Jan 2018 13:18:34 +0100 [thread overview] Message-ID: <20180103121840.29316-1-horms+renesas@verge.net.au> (raw) Hi, this patch-set adds Z and Z2 clock support. These are dependencies for supporting CPUFreq. The remainder of that work is being posted separately and can be found at: https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git topic/rcar-gen3-cpufreq-v4 Based on v4.15-rc1 Changes since v3: * Rebase * Divide parent clock by 2 to give correct rate (again) * Take care not to overflow multiplication on 32 but platforms * Use __ffs as FIELD_{GET,PREP} don't not work with non-constant masks * Use correct mask in cpg_z_clk_recalc_rate() Changes since v2: * Rebase * Address review of v2 as noted in patch changelogs Takeshi Kihara (6): clk: renesas: rcar-gen3: Add Z clock divider support clk: renesas: rcar-gen3: Add Z2 clock divider support clk: renesas: r8a7795: Add Z clock clk: renesas: r8a7795: Add Z2 clock clk: renesas: r8a7796: Add Z clock clk: renesas: r8a7796: Add Z2 clock drivers/clk/renesas/r8a7795-cpg-mssr.c | 2 + drivers/clk/renesas/r8a7796-cpg-mssr.c | 2 + drivers/clk/renesas/rcar-gen3-cpg.c | 143 +++++++++++++++++++++++++++++++++ drivers/clk/renesas/rcar-gen3-cpg.h | 2 + 4 files changed, 149 insertions(+) Results of testing this on the Salvator-X r8a7796 are as follows: On Boot ------- Z clock is half of pll0 and corresponds to CPU frequency. Z2 clock is half pll2. This is as expected. root at Debian:~# cd /sys/devices/system/cpu/cpu0/cpufreq root at Debian:/sys/devices/system/cpu/cpu0/cpufreq# grep -E -w "pll0|z" /sys/kernel/debug/clk/clk_summary; grep -E -w "pll2|z2" /sys/kernel/debug/clk/clk_summary; grep . *cur* .pll0 0 0 2999999880 0 0 z 0 0 1499999940 0 0 .pll2 0 0 2399999904 0 0 z2 0 0 1199999952 0 0 cpuinfo_cur_freq:1499999 scaling_cur_freq:1500000 CPU Freq scaled to 1000000 and then 500000 ------------------------------------------ Z clock corresponds to new CPU frequency. Z2 clock, PLL0 and PLL2 are unchanged. This is also as expected. root at Debian:/sys/devices/system/cpu/cpu0/cpufreq# echo 1000000 > scaling_max_freq root at Debian:/sys/devices/system/cpu/cpu0/cpufreq# grep -E -w "pll0|z" /sys/kernel/debug/clk/clk_summary; grep -E -w "pll2|z2" /sys/kernel/debug/clk/clk_summary; grep . *cur* grep . *cur*lk_summary; grep -E -w "pll2|z2" /sys/kernel/debug/clk/clk_summary; .pll0 0 0 2999999880 0 0 z 0 0 1031249959 0 0 .pll2 0 0 2399999904 0 0 z2 0 0 1199999952 0 0 cpuinfo_cur_freq:1031249 scaling_cur_freq:1000000 root at Debian:/sys/devices/system/cpu/cpu0/cpufreq# echo 500000 > scaling_max_freq root at Debian:/sys/devices/system/cpu/cpu0/cpufreq# grep -E -w "pll0|z" /sys/kernel/debug/clk/clk_summary; grep -E -w "pll2|z2" /sys/kernel/debug/clk/clk_summary; grep . *cur* .pll0 0 0 2999999880 0 0 z 0 0 468749981 0 0 .pll2 0 0 2399999904 0 0 z2 0 0 1199999952 0 0 cpuinfo_cur_freq:468749 scaling_cur_freq:500000
next reply other threads:[~2018-01-03 12:18 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-01-03 12:18 Simon Horman [this message] 2018-01-03 12:18 ` [PATCH v4 0/6] clk: renesas: r8a779[56]: Add Z and Z2 clock support Simon Horman 2018-01-03 12:18 ` [PATCH v4 1/6] clk: renesas: rcar-gen3: Add Z clock divider support Simon Horman 2018-01-03 12:18 ` Simon Horman 2018-01-03 12:18 ` [PATCH v4 2/6] clk: renesas: rcar-gen3: Add Z2 " Simon Horman 2018-01-03 12:18 ` Simon Horman 2018-01-03 12:47 ` Geert Uytterhoeven 2018-01-03 12:47 ` Geert Uytterhoeven 2018-01-05 14:04 ` Simon Horman 2018-01-05 14:04 ` Simon Horman 2018-01-05 14:35 ` Geert Uytterhoeven 2018-01-05 14:35 ` Geert Uytterhoeven 2018-01-08 8:02 ` Simon Horman 2018-01-08 8:02 ` Simon Horman 2018-01-08 8:06 ` Geert Uytterhoeven 2018-01-08 8:06 ` Geert Uytterhoeven 2018-01-29 14:24 ` Simon Horman 2018-01-29 14:24 ` Simon Horman 2018-01-29 15:01 ` Geert Uytterhoeven 2018-01-29 15:01 ` Geert Uytterhoeven 2018-01-29 15:19 ` Simon Horman 2018-01-29 15:19 ` Simon Horman 2018-01-29 15:46 ` Geert Uytterhoeven 2018-01-29 15:46 ` Geert Uytterhoeven 2018-01-29 16:42 ` Simon Horman 2018-01-29 16:42 ` Simon Horman 2018-01-29 15:51 ` Simon Horman 2018-01-29 15:51 ` Simon Horman 2018-01-29 16:31 ` Simon Horman 2018-01-29 16:31 ` Simon Horman 2018-01-03 12:18 ` [PATCH v4 3/6] clk: renesas: r8a7795: Add Z clock Simon Horman 2018-01-03 12:18 ` Simon Horman 2018-01-03 12:18 ` [PATCH v4 4/6] clk: renesas: r8a7795: Add Z2 clock Simon Horman 2018-01-03 12:18 ` Simon Horman 2018-01-03 12:18 ` [PATCH v4 5/6] clk: renesas: r8a7796: Add Z clock Simon Horman 2018-01-03 12:18 ` Simon Horman 2018-01-03 12:18 ` [PATCH v4 6/6] clk: renesas: r8a7796: Add Z2 clock Simon Horman 2018-01-03 12:18 ` Simon Horman
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=20180103121840.29316-1-horms+renesas@verge.net.au \ --to=horms+renesas@verge.net.au \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-renesas-soc@vger.kernel.org \ --cc=magnus.damm@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.