Re: [PATCH] clk: npcm7xx: Mark the dividers read-only

From: Jerome Brunet

Date: Mon Nov 30 2026 - 05:10:51 EST


On 2026-11-30 09:08 +0000, William A. Kennington III wrote:
> From: Tomer Maimon <tmaimon77@xxxxxxxxx>
>
> The NPCM7xx clock dividers are programmed by the boot firmware. The
> driver registers them as ordinary dividers, so a consumer that calls
> clk_set_rate() reprograms them.
>
> Register the dividers with CLK_DIVIDER_READ_ONLY, so that the kernel
> keeps what the firmware has set up. clk-npcm8xx already registers most
> of its dividers this way. The SPI3 divider stays writable.

You are explaining what you are doing, not really why you are doing it.
You've got a boot firmware that gives an initial state. This is fairly
usual and we don't lock all the clock controllers down based ont that.

Why should the kernel be unable to to touch these clocks now ?

--
Jerome