On 05-10-2026 23:25, Dave Klotz wrote:
The driver sets the io clock to the max-frequency the device tree gives
and fails the probe on any non-zero return from clk_set_rate(). Two
problems follow:

- clk_set_rate() returns the new rate on success and a negative error
   code on failure. The SpacemiT clock driver happens to return 0, but
   any clock driver that reports the rate makes the probe fail.
- A node without max-frequency asks for 0 Hz. On the K1 clock driver
   that picks no divider at all and writes whatever the calculation left
   behind into the io clock's divider field; host->max_clk is then 0,
   the capabilities register gives no base clock either, and the probe
   fails in sdhci_setup_cfg().

Treat only a negative return as an error. Without max-frequency, leave
the io clock as an earlier stage set it and run from its current rate.

Signed-off-by: Dave Klotz <[email protected]>


Reviewed-by: Tanmay Kathpalia <[email protected]>

Reply via email to