Re: [PATCH v4] clk: expand clk_ignore_unused mechanism to keep only a few clks on

From: Uwe Kleine-König
Date: Thu Mar 30 2023 - 13:33:41 EST


Hello Sebastian,

On Thu, Mar 30, 2023 at 05:26:17PM +0200, Sebastian Reichel wrote:
> > > In that case it sounds like you want to compile the kernel with the
> > > support for enabling clks from debugfs. Can you use that?
> >
> > In some of the cases that might work. Unless for example the problem
> > makes the kernel fail to boot or the device is broken when the clk was
> > disabled and reenable doesn't help?!
>
> I recently debugged a similar issue like this:
>
> 1. build kernel with CLOCK_ALLOW_WRITE_DEBUGFS
> 2. boot with clk_ignore_unused, so clocks stay enabled
> 3. disable clocks via sysfs:
> echo 1 > /sys/kernel/debug/clk/${CLK}/clk_prepare_enable
> echo 0 > /sys/kernel/debug/clk/${CLK}/clk_prepare_enable
> 4. check if peripheral is still ok
> 5. repeat step 3 with the next 'interesting' clock

Ah, that makes sense. Thanks.

With that I cannot imagine a scenario that I can only debug with
clk_ignore_unused=n. So let's drop my patch.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature