firmware: raspberrypi: Provide a helper to query a clock max rate
authorMaxime Ripard <maxime@cerno.tech>
Thu, 27 Oct 2022 12:52:43 +0000 (14:52 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Fri, 28 Oct 2022 11:03:19 +0000 (13:03 +0200)
commit40c31955e4e9ff268d21c0a8009e35f4cfaa167c
treec6151e11dd3620fef12ce29984d8e4d2b7c31a80
parentd0cde9b3b0cae06f5998f6d3936e90a80d05b2ec
firmware: raspberrypi: Provide a helper to query a clock max rate

The firmware allows to query for its clocks the operating range of a
given clock. We'll need this for some drivers (KMS, in particular) to
infer the state of some configuration options, so let's create a
function to do so.

Acked-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20220815-rpi-fix-4k-60-v5-3-fe9e7ac8b111@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/firmware/raspberrypi.c
include/soc/bcm2835/raspberrypi-firmware.h