arm: stm32mp: add weak function to save vddcore
Add a weak functions to save the vddcore voltage value provided
in the OPP node when the clock tree is initialized.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c
index 8acbad2..c8840b9 100644
--- a/drivers/clk/clk_stm32mp1.c
+++ b/drivers/clk/clk_stm32mp1.c
@@ -1229,6 +1229,10 @@
}
}
+__weak void board_vddcore_init(u32 voltage_mv)
+{
+}
+
/*
* gets OPP parameters (frequency in KHz and voltage in mV) from
* an OPP table subnode. Platform HW support capabilities are also checked.
@@ -1306,6 +1310,7 @@
return -FDT_ERR_NOTFOUND;
*freq_hz = (u64)1000U * freq;
+ board_vddcore_init(voltage);
return 0;
}