From: Peter Geis <pgwipeout@gmail.com>
To: Jonas Karlman <jonas@kwiboo.se>,
"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
"linux-rockchip@lists.infradead.org"
<linux-rockchip@lists.infradead.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Cc: Stephen Boyd <sboyd@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Heiko Stuebner <heiko@sntech.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] clk: rockchip: fix wrong clock definitions for rk3328
Date: Sun, 10 Mar 2019 12:46:17 -0400 [thread overview]
Message-ID: <97e8505d-391c-9cc6-af3b-0eb1a7d895f5@gmail.com> (raw)
In-Reply-To: <AM3PR03MB0966A06101CACDAEA4ECD72BAC4F0@AM3PR03MB0966.eurprd03.prod.outlook.com>
On 3/10/2019 8:00 AM, Jonas Karlman wrote:
> This patch fixes definition of several clock gate and select register
> that is wrong for rk3328 referring to the TRM and vendor kernel.
> Also use correct number of softrst registers.
>
> Fix clock definition for:
> - clk_crypto
> - aclk_h265
> - pclk_h265
> - aclk_h264
> - hclk_h264
> - aclk_axisram
> - aclk_gmac
> - aclk_usb3otg
>
> Fixes: fe3511ad8a1c ("clk: rockchip: add clock controller for rk3328")
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Tested on the rk3328-roc-cc.
Tested-by: Peter Geis <pgwipeout@gmail.com>
> ---
> drivers/clk/rockchip/clk-rk3328.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/clk/rockchip/clk-rk3328.c b/drivers/clk/rockchip/clk-rk3328.c
> index faa94adb2a37..5f6b6bcc2149 100644
> --- a/drivers/clk/rockchip/clk-rk3328.c
> +++ b/drivers/clk/rockchip/clk-rk3328.c
> @@ -458,7 +458,7 @@ static struct rockchip_clk_branch rk3328_clk_branches[] __initdata = {
> RK3328_CLKSEL_CON(35), 15, 1, MFLAGS, 8, 7, DFLAGS,
> RK3328_CLKGATE_CON(2), 12, GFLAGS),
> COMPOSITE(SCLK_CRYPTO, "clk_crypto", mux_2plls_p, 0,
> - RK3328_CLKSEL_CON(20), 7, 1, MFLAGS, 0, 7, DFLAGS,
> + RK3328_CLKSEL_CON(20), 7, 1, MFLAGS, 0, 5, DFLAGS,
> RK3328_CLKGATE_CON(2), 4, GFLAGS),
> COMPOSITE_NOMUX(SCLK_TSADC, "clk_tsadc", "clk_24m", 0,
> RK3328_CLKSEL_CON(22), 0, 10, DFLAGS,
> @@ -550,15 +550,15 @@ static struct rockchip_clk_branch rk3328_clk_branches[] __initdata = {
> GATE(0, "hclk_rkvenc_niu", "hclk_rkvenc", 0,
> RK3328_CLKGATE_CON(25), 1, GFLAGS),
> GATE(ACLK_H265, "aclk_h265", "aclk_rkvenc", 0,
> - RK3328_CLKGATE_CON(25), 0, GFLAGS),
> + RK3328_CLKGATE_CON(25), 2, GFLAGS),
> GATE(PCLK_H265, "pclk_h265", "hclk_rkvenc", 0,
> - RK3328_CLKGATE_CON(25), 1, GFLAGS),
> + RK3328_CLKGATE_CON(25), 3, GFLAGS),
> GATE(ACLK_H264, "aclk_h264", "aclk_rkvenc", 0,
> - RK3328_CLKGATE_CON(25), 0, GFLAGS),
> + RK3328_CLKGATE_CON(25), 4, GFLAGS),
> GATE(HCLK_H264, "hclk_h264", "hclk_rkvenc", 0,
> - RK3328_CLKGATE_CON(25), 1, GFLAGS),
> + RK3328_CLKGATE_CON(25), 5, GFLAGS),
> GATE(ACLK_AXISRAM, "aclk_axisram", "aclk_rkvenc", CLK_IGNORE_UNUSED,
> - RK3328_CLKGATE_CON(25), 0, GFLAGS),
> + RK3328_CLKGATE_CON(25), 6, GFLAGS),
>
> COMPOSITE(SCLK_VENC_CORE, "sclk_venc_core", mux_4plls_p, 0,
> RK3328_CLKSEL_CON(51), 14, 2, MFLAGS, 8, 5, DFLAGS,
> @@ -663,7 +663,7 @@ static struct rockchip_clk_branch rk3328_clk_branches[] __initdata = {
>
> /* PD_GMAC */
> COMPOSITE(ACLK_GMAC, "aclk_gmac", mux_2plls_hdmiphy_p, 0,
> - RK3328_CLKSEL_CON(35), 6, 2, MFLAGS, 0, 5, DFLAGS,
> + RK3328_CLKSEL_CON(25), 6, 2, MFLAGS, 0, 5, DFLAGS,
> RK3328_CLKGATE_CON(3), 2, GFLAGS),
> COMPOSITE_NOMUX(PCLK_GMAC, "pclk_gmac", "aclk_gmac", 0,
> RK3328_CLKSEL_CON(25), 8, 3, DFLAGS,
> @@ -733,7 +733,7 @@ static struct rockchip_clk_branch rk3328_clk_branches[] __initdata = {
>
> /* PD_PERI */
> GATE(0, "aclk_peri_noc", "aclk_peri", CLK_IGNORE_UNUSED, RK3328_CLKGATE_CON(19), 11, GFLAGS),
> - GATE(ACLK_USB3OTG, "aclk_usb3otg", "aclk_peri", 0, RK3328_CLKGATE_CON(19), 4, GFLAGS),
> + GATE(ACLK_USB3OTG, "aclk_usb3otg", "aclk_peri", 0, RK3328_CLKGATE_CON(19), 14, GFLAGS),
>
> GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_peri", 0, RK3328_CLKGATE_CON(19), 0, GFLAGS),
> GATE(HCLK_SDIO, "hclk_sdio", "hclk_peri", 0, RK3328_CLKGATE_CON(19), 1, GFLAGS),
> @@ -913,7 +913,7 @@ static void __init rk3328_clk_init(struct device_node *np)
> &rk3328_cpuclk_data, rk3328_cpuclk_rates,
> ARRAY_SIZE(rk3328_cpuclk_rates));
>
> - rockchip_register_softrst(np, 11, reg_base + RK3328_SOFTRST_CON(0),
> + rockchip_register_softrst(np, 12, reg_base + RK3328_SOFTRST_CON(0),
> ROCKCHIP_SOFTRST_HIWORD_MASK);
>
> rockchip_register_restart_notifier(ctx, RK3328_GLB_SRST_FST, NULL);
>
next prev parent reply other threads:[~2019-03-10 16:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-10 12:00 [PATCH] clk: rockchip: fix wrong clock definitions for rk3328 Jonas Karlman
2019-03-10 16:46 ` Peter Geis [this message]
[not found] ` <AM3PR03MB0966A06101CACDAEA4ECD72BAC4F0-XQTXrJX/giFAc9da7WRX18eAHadYHfrlvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-03-12 10:50 ` Heiko Stuebner
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=97e8505d-391c-9cc6-af3b-0eb1a7d895f5@gmail.com \
--to=pgwipeout@gmail.com \
--cc=heiko@sntech.de \
--cc=jonas@kwiboo.se \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@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