Re: [PATCH v5 0/2] Add Loongson-2K0300 processor support

From: Yao Zi

Date: Tue Mar 24 2026 - 13:05:06 EST


On Tue, Mar 24, 2026 at 11:09:16PM +0800, wjjsn wrote:
> On 3/23/26 10:42, Yao Zi wrote:
> > On Mon, Mar 23, 2026 at 12:33:31AM +0800, wjjsn wrote:

...

> > > the clk_apb_gate will
> > > turn off by kernel while booting,though 16100000.serial is using
> >
> > This is unlikely an issue in the clock driver, but rather the consumer
> > is doing something wrong, though I haven't seen similar issues when
> > working on the clock driver.
> >
> > Please try booting the kernel with clk_ignore_unused, and check
> > /sys/kernel/debug/clk/clk_summary to see whether the serial correctly
> > acquires the apb gate clock. If not, one (and the most possible) reason
> > is both clock-frequency and clocks properties are specified in its
> > devicetree node, where 8250 driver would ignore the latter.
> >
>
> When I use 'clocks = <&clk LS2K0300_CLK_DEV_DIV>;', the system log gets
> stuck at the message about closing unused clocks, and there are no further
> logs. It seems like the clock for the serial port is being closed. However,
> if I set the parameter to not close unused clocks as a startup parameter,
> the serial port can continue to be used. If I use 'clocks = <&clk
> LS2K0300_CLK_APB_GATE>;', then the clock for the serial port is not closed
> and can start normally. I have not specified the clock frequency in the

This is the expected behavior, because LS2K0300_CLK_APB_GATE takes
LS2K0300_CLK_APB_DIV as parent, and unused clocks would be automatically
disabled by kernel.

It's intended to let consumers take the GATE clock instead of the DIV
clock, just like what you have done in your patch.

> Regards,
> wjjsn

Regards,
Yao Zi