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>
This commit is contained in:
		
							parent
							
								
									37ad8377af
								
							
						
					
					
						commit
						4e62642aef
					
				| 
						 | 
					@ -48,3 +48,6 @@ void get_soc_name(char name[SOC_NAME_SIZE]);
 | 
				
			||||||
u32 get_bootmode(void);
 | 
					u32 get_bootmode(void);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int setup_mac_address(void);
 | 
					int setup_mac_address(void);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* board power management : configure vddcore according OPP */
 | 
				
			||||||
 | 
					void board_vddcore_init(u32 voltage_mv);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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
 | 
					 * gets OPP parameters (frequency in KHz and voltage in mV) from
 | 
				
			||||||
 * an OPP table subnode. Platform HW support capabilities are also checked.
 | 
					 * 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;
 | 
							return -FDT_ERR_NOTFOUND;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	*freq_hz = (u64)1000U * freq;
 | 
						*freq_hz = (u64)1000U * freq;
 | 
				
			||||||
 | 
						board_vddcore_init(voltage);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue