From: Drew Fustini <fustini@kernel.org>
To: Yao Zi <ziyao@disroot.org>
Cc: Guo Ren <guoren@kernel.org>, Fu Wei <wefu@redhat.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Jisheng Zhang <jszhang@kernel.org>,
Yangtao Li <frank.li@vivo.com>,
linux-riscv@lists.infradead.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] clk: thead: th1520-ap: Correctly refer the parent of osc_12m
Date: Sun, 13 Jul 2025 12:57:42 -0700 [thread overview]
Message-ID: <aHQPtjB9FjIsCYHW@x1> (raw)
In-Reply-To: <aHAp1q9tLy465gnO@x1>
On Thu, Jul 10, 2025 at 02:00:06PM -0700, Drew Fustini wrote:
> On Thu, Jul 10, 2025 at 09:21:34AM +0000, Yao Zi wrote:
> > The "osc_12m" fixed factor clock refers the external oscillator by
> > setting clk_parent_data.fw_name to osc_24m, which is obviously wrong
> > since no clock-names property is allowed for compatible
> > thead,th1520-clk-ap.
> >
> > Refer the oscillator as parent by index instead.
> >
> > Fixes: ae81b69fd2b1 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks")
> > Signed-off-by: Yao Zi <ziyao@disroot.org>
> > ---
> > drivers/clk/thead/clk-th1520-ap.c | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/clk/thead/clk-th1520-ap.c b/drivers/clk/thead/clk-th1520-ap.c
> > index ebfb1d59401d..42feb4bb6329 100644
> > --- a/drivers/clk/thead/clk-th1520-ap.c
> > +++ b/drivers/clk/thead/clk-th1520-ap.c
> > @@ -582,7 +582,14 @@ static const struct clk_parent_data peri2sys_apb_pclk_pd[] = {
> > { .hw = &peri2sys_apb_pclk.common.hw }
> > };
> >
> > -static CLK_FIXED_FACTOR_FW_NAME(osc12m_clk, "osc_12m", "osc_24m", 2, 1, 0);
> > +static struct clk_fixed_factor osc12m_clk = {
> > + .div = 2,
> > + .mult = 1,
> > + .hw.init = CLK_HW_INIT_PARENTS_DATA("osc_12m",
> > + osc_24m_clk,
> > + &clk_fixed_factor_ops,
> > + 0),
> > +};
> >
> > static const char * const out_parents[] = { "osc_24m", "osc_12m" };
> >
> > --
> > 2.50.0
>
> Reviewed-by: Drew Fustini <fustini@kernel.org>
>
> Thanks for fixing this. osc_12m now appears under osc_24m in
> clk_summary.
>
> Drew
Thank you for the patch. I've now applied it to thead-clk-for-next as
commit d274c77ffa20 [1].
Drew
[1] https://github.com/pdp7/linux/commit/d274c77ffa202b70ad01d579f33b73b4de123375
WARNING: multiple messages have this Message-ID (diff)
From: Drew Fustini <fustini@kernel.org>
To: Yao Zi <ziyao@disroot.org>
Cc: Guo Ren <guoren@kernel.org>, Fu Wei <wefu@redhat.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Jisheng Zhang <jszhang@kernel.org>,
Yangtao Li <frank.li@vivo.com>,
linux-riscv@lists.infradead.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] clk: thead: th1520-ap: Correctly refer the parent of osc_12m
Date: Sun, 13 Jul 2025 12:57:42 -0700 [thread overview]
Message-ID: <aHQPtjB9FjIsCYHW@x1> (raw)
In-Reply-To: <aHAp1q9tLy465gnO@x1>
On Thu, Jul 10, 2025 at 02:00:06PM -0700, Drew Fustini wrote:
> On Thu, Jul 10, 2025 at 09:21:34AM +0000, Yao Zi wrote:
> > The "osc_12m" fixed factor clock refers the external oscillator by
> > setting clk_parent_data.fw_name to osc_24m, which is obviously wrong
> > since no clock-names property is allowed for compatible
> > thead,th1520-clk-ap.
> >
> > Refer the oscillator as parent by index instead.
> >
> > Fixes: ae81b69fd2b1 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks")
> > Signed-off-by: Yao Zi <ziyao@disroot.org>
> > ---
> > drivers/clk/thead/clk-th1520-ap.c | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/clk/thead/clk-th1520-ap.c b/drivers/clk/thead/clk-th1520-ap.c
> > index ebfb1d59401d..42feb4bb6329 100644
> > --- a/drivers/clk/thead/clk-th1520-ap.c
> > +++ b/drivers/clk/thead/clk-th1520-ap.c
> > @@ -582,7 +582,14 @@ static const struct clk_parent_data peri2sys_apb_pclk_pd[] = {
> > { .hw = &peri2sys_apb_pclk.common.hw }
> > };
> >
> > -static CLK_FIXED_FACTOR_FW_NAME(osc12m_clk, "osc_12m", "osc_24m", 2, 1, 0);
> > +static struct clk_fixed_factor osc12m_clk = {
> > + .div = 2,
> > + .mult = 1,
> > + .hw.init = CLK_HW_INIT_PARENTS_DATA("osc_12m",
> > + osc_24m_clk,
> > + &clk_fixed_factor_ops,
> > + 0),
> > +};
> >
> > static const char * const out_parents[] = { "osc_24m", "osc_12m" };
> >
> > --
> > 2.50.0
>
> Reviewed-by: Drew Fustini <fustini@kernel.org>
>
> Thanks for fixing this. osc_12m now appears under osc_24m in
> clk_summary.
>
> Drew
Thank you for the patch. I've now applied it to thead-clk-for-next as
commit d274c77ffa20 [1].
Drew
[1] https://github.com/pdp7/linux/commit/d274c77ffa202b70ad01d579f33b73b4de123375
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-07-13 19:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 9:21 [PATCH v2 0/2] Fix orphan clocks in clk-th1520-ap driver Yao Zi
2025-07-10 9:21 ` Yao Zi
2025-07-10 9:21 ` [PATCH v2 1/2] clk: thead: th1520-ap: Correctly refer the parent of osc_12m Yao Zi
2025-07-10 9:21 ` Yao Zi
2025-07-10 21:00 ` Drew Fustini
2025-07-10 21:00 ` Drew Fustini
2025-07-13 19:57 ` Drew Fustini [this message]
2025-07-13 19:57 ` Drew Fustini
2025-07-10 9:21 ` [PATCH v2 2/2] clk: thead: th1520-ap: Correctly refer the parent of c910-i0 Yao Zi
2025-07-10 9:21 ` Yao Zi
2025-07-11 8:52 ` Drew Fustini
2025-07-11 8:52 ` Drew Fustini
2025-07-12 0:39 ` Yao Zi
2025-07-12 0:39 ` Yao Zi
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=aHQPtjB9FjIsCYHW@x1 \
--to=fustini@kernel.org \
--cc=frank.li@vivo.com \
--cc=guoren@kernel.org \
--cc=jszhang@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
--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 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.