From: Drew Fustini <fustini@kernel.org>
To: Icenowy Zheng <uwu@icenowy.me>
Cc: Guo Ren <guoren@kernel.org>, Fu Wei <wefu@redhat.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Michal Wilczynski <m.wilczynski@samsung.com>,
Yao Zi <ziyao@disroot.org>, Han Gao <rabenda.cn@gmail.com>,
linux-riscv@lists.infradead.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] clk: thead: th1520-ap: fix parent of padctrl0 clock
Date: Fri, 15 Aug 2025 16:45:02 -0700 [thread overview]
Message-ID: <aJ/GfmLjU/K4FJOM@x1> (raw)
In-Reply-To: <20250813171136.2213309-3-uwu@icenowy.me>
On Thu, Aug 14, 2025 at 01:11:36AM +0800, Icenowy Zheng wrote:
> The padctrl0 clock seems to be a child of the perisys_apb4_hclk clock,
> gating the later makes padctrl0 registers stuck too.
>
> Fix this relationship.
>
> Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
> ---
> drivers/clk/thead/clk-th1520-ap.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/thead/clk-th1520-ap.c b/drivers/clk/thead/clk-th1520-ap.c
> index d08e7fb387e50..f6f3d63d53353 100644
> --- a/drivers/clk/thead/clk-th1520-ap.c
> +++ b/drivers/clk/thead/clk-th1520-ap.c
> @@ -888,13 +888,16 @@ static CCU_GATE(CLK_PERISYS_APB3_HCLK, perisys_apb3_hclk, "perisys-apb3-hclk", p
> 0x150, 11, CLK_IS_CRITICAL);
> static CCU_GATE(CLK_PERISYS_APB4_HCLK, perisys_apb4_hclk, "perisys-apb4-hclk", perisys_ahb_hclk_pd,
> 0x150, 12, 0);
> +static const struct clk_parent_data perisys_apb4_hclk_pd[] = {
> + { .hw = &perisys_apb4_hclk.gate.hw },
> +};
Nit: when I run checkpatch on the whole file, it warns that there should
be a blank line after function/struct/union/enum declarations. Probably
best to insert a new line here.
> static CCU_GATE(CLK_NPU_AXI, npu_axi_clk, "npu-axi", axi_aclk_pd, 0x1c8, 5, CLK_IS_CRITICAL);
> static CCU_GATE(CLK_CPU2VP, cpu2vp_clk, "cpu2vp", axi_aclk_pd, 0x1e0, 13, CLK_IS_CRITICAL);
> static CCU_GATE(CLK_EMMC_SDIO, emmc_sdio_clk, "emmc-sdio", emmc_sdio_ref_clk_pd, 0x204, 30, 0);
> static CCU_GATE(CLK_GMAC1, gmac1_clk, "gmac1", gmac_pll_clk_pd, 0x204, 26, 0);
> static CCU_GATE(CLK_PADCTRL1, padctrl1_clk, "padctrl1", perisys_apb_pclk_pd, 0x204, 24, 0);
> static CCU_GATE(CLK_DSMART, dsmart_clk, "dsmart", perisys_apb_pclk_pd, 0x204, 23, 0);
> -static CCU_GATE(CLK_PADCTRL0, padctrl0_clk, "padctrl0", perisys_apb_pclk_pd, 0x204, 22, 0);
> +static CCU_GATE(CLK_PADCTRL0, padctrl0_clk, "padctrl0", perisys_apb4_hclk_pd, 0x204, 22, 0);
> static CCU_GATE(CLK_GMAC_AXI, gmac_axi_clk, "gmac-axi", axi4_cpusys2_aclk_pd, 0x204, 21, 0);
> static CCU_GATE(CLK_GPIO3, gpio3_clk, "gpio3-clk", peri2sys_apb_pclk_pd, 0x204, 20, 0);
> static CCU_GATE(CLK_GMAC0, gmac0_clk, "gmac0", gmac_pll_clk_pd, 0x204, 19, 0);
> --
> 2.50.1
Aside from that nit:
Reviewed-by: Drew Fustini <fustini@kernel.org>
next prev parent reply other threads:[~2025-08-15 23:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-13 17:11 [PATCH 0/2] clk: thead: th1520-ap: allow gate cascade and fix padctrl0 Icenowy Zheng
2025-08-13 17:11 ` [PATCH 1/2] clk: thead: th1520-ap: describe gate clocks with clk_gate Icenowy Zheng
2025-08-14 3:12 ` Guo Ren
2025-08-14 5:02 ` Icenowy Zheng
2025-08-14 6:41 ` Guo Ren
2025-08-14 6:47 ` Icenowy Zheng
2025-08-15 23:45 ` Drew Fustini
2025-08-16 8:11 ` Troy Mitchell
2025-08-16 23:16 ` Drew Fustini
2025-08-13 17:11 ` [PATCH 2/2] clk: thead: th1520-ap: fix parent of padctrl0 clock Icenowy Zheng
2025-08-14 3:08 ` Guo Ren
2025-08-14 5:03 ` Icenowy Zheng
2025-08-15 23:45 ` Drew Fustini [this message]
2025-08-16 8:01 ` Troy Mitchell
2025-08-13 17:16 ` [PATCH 0/2] clk: thead: th1520-ap: allow gate cascade and fix padctrl0 Icenowy Zheng
2025-08-14 3:10 ` Guo Ren
2025-08-15 23:28 ` Drew Fustini
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=aJ/GfmLjU/K4FJOM@x1 \
--to=fustini@kernel.org \
--cc=guoren@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=m.wilczynski@samsung.com \
--cc=mturquette@baylibre.com \
--cc=rabenda.cn@gmail.com \
--cc=sboyd@kernel.org \
--cc=uwu@icenowy.me \
--cc=wefu@redhat.com \
--cc=ziyao@disroot.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).