clk: meson: add Hardware Clock measure driver
Amlogic SoCs embeds an hardware clock measure block, port it
from Linux and implement it as a UCLK_CLK with only the dump
op and fail-only xlate.
Based on the Linux driver introduced in [1].
[1] commit 2b45ebef39a2 ("soc: amlogic: Add Meson Clock Measure driver").
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20231218-uboot-meson-clk-msr-v3-1-acf4d90ccfee@linaro.org
diff --git a/drivers/clk/meson/Kconfig b/drivers/clk/meson/Kconfig
index cdc9d6f..ee33c61 100644
--- a/drivers/clk/meson/Kconfig
+++ b/drivers/clk/meson/Kconfig
@@ -29,3 +29,13 @@
help
Enable clock support for the Amlogic A1 SoC family, such as
the A113L
+
+config CLK_MESON_MSR
+ bool "Enable clock measure driver for Amlogic SoCs"
+ depends on CLK && ARCH_MESON
+ depends on CMD_CLK
+ default ARCH_MESON
+ help
+ Enable measuring a set of internal Amlogic SoC clock frequencies
+ using the Hardware Clock Measure registers and print them using
+ the clk dump command.