]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: stm32mp: add weak function to save vddcore
authorPatrick Delaunay <patrick.delaunay@st.com>
Mon, 25 May 2020 10:19:45 +0000 (12:19 +0200)
committerPatrick Delaunay <patrick.delaunay@st.com>
Tue, 7 Jul 2020 14:01:23 +0000 (16:01 +0200)
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>
arch/arm/mach-stm32mp/include/mach/sys_proto.h
drivers/clk/clk_stm32mp1.c

index 4b6c7b8bdd260fb7b6a937466504eddf5c8d6b2b..4149d3a13379d765f3af9d271bb3406865f4a925 100644 (file)
@@ -48,3 +48,6 @@ void get_soc_name(char name[SOC_NAME_SIZE]);
 u32 get_bootmode(void);
 
 int setup_mac_address(void);
+
+/* board power management : configure vddcore according OPP */
+void board_vddcore_init(u32 voltage_mv);
index 8acbad25f9a6db9b7a47c1f085b4cd198ddc1df0..c8840b9e5f117105c5b0d6ef5b2b21bf234cf5f3 100644 (file)
@@ -1229,6 +1229,10 @@ bool stm32mp1_supports_opp(u32 opp_id, u32 cpu_type)
        }
 }
 
+__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 @@ int stm32mp1_get_max_opp_freq(struct stm32mp1_clk_priv *priv, u64 *freq_hz)
                return -FDT_ERR_NOTFOUND;
 
        *freq_hz = (u64)1000U * freq;
+       board_vddcore_init(voltage);
 
        return 0;
 }