clk: bcm: rpi: Set a default minimum rate
authorMaxime Ripard <maxime@cerno.tech>
Fri, 25 Feb 2022 14:35:31 +0000 (15:35 +0100)
committerStephen Boyd <sboyd@kernel.org>
Sat, 12 Mar 2022 03:15:04 +0000 (19:15 -0800)
commit542acfec4e313c001f9b82332f4fa2848ec7bf58
treecccef84c5625b1271b2bdbe91521ece30b60e28c
parent12c90f3f27bb3ad0dd3fad1550fec87091aa3329
clk: bcm: rpi: Set a default minimum rate

The M2MC clock provides the state machine clock for both HDMI
controllers.

However, if no HDMI monitor is plugged in at boot, its clock rate will
be left at 0 by the firmware and will make any register access end up in
a CPU stall, even though the clock was enabled.

We had some code in the HDMI controller to deal with this before, but it
makes more sense to have it in the clock driver. Move it there.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220225143534.405820-10-maxime@cerno.tech
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/bcm/clk-raspberrypi.c