[PATCH 02/12] clk: thead: th1520-ap: add support for MISC subsys clocks

Icenowy Zheng uwu at icenowy.me
Mon Jun 8 23:01:43 PDT 2026


在 2026-06-08一的 23:00 -0700,Drew Fustini写道:
> On Thu, May 07, 2026 at 04:17:00PM +0800, Icenowy Zheng wrote:
> > The TH1520 SoC contains a MISC_SUBSYS clock controller, which
> > allows
> > controlling of USB related clocks and MMC/SD controller AHB bus
> > clocks.
> > 
> > Add support for this clock controller, in order to enable USB
> > support.
> > 
> > Signed-off-by: Icenowy Zheng <zhengxingda at iscas.ac.cn>
> > ---
> >  drivers/clk/thead/clk-th1520-ap.c | 64
> > +++++++++++++++++++++++++++++++
> >  1 file changed, 64 insertions(+)
> > 
> > diff --git a/drivers/clk/thead/clk-th1520-ap.c
> > b/drivers/clk/thead/clk-th1520-ap.c
> > index 3a6847f1c950f..24f785f0b329a 100644
> > --- a/drivers/clk/thead/clk-th1520-ap.c
> > +++ b/drivers/clk/thead/clk-th1520-ap.c
> [...]
> > @@ -1609,6 +1663,12 @@ static int th1520_clk_probe(struct
> > platform_device *pdev)
> >  			return ret;
> >  	}
> >  
> > +	if (plat_data == &th1520_ap_platdata) {
> > +		ret = devm_clk_hw_register(dev,
> > &usb_suspend_div_clk.hw);
> > +		if (ret)
> > +			return ret;
> > +	}
> 
> Should usb_suspend_div_clk.hw instead be registered under
> 'if (plat_data == &th1520_ap_platdata)'?

Do you mean misc_platdata?

Yes, this is an copy-n-paste error that deserves a fix.

Thanks,
Icenowy

> 
> Thanks,
> Drew



More information about the linux-riscv mailing list