stm32mp1: clk: use gd to store frequency information
Use existing gd structure to store frequency information which can be used in drivers or arch without new request. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
This commit is contained in:
parent
7879a7d09c
commit
4de076ed09
@ -15,6 +15,8 @@
|
|||||||
#include <dt-bindings/clock/stm32mp1-clks.h>
|
#include <dt-bindings/clock/stm32mp1-clks.h>
|
||||||
#include <dt-bindings/clock/stm32mp1-clksrc.h>
|
#include <dt-bindings/clock/stm32mp1-clksrc.h>
|
||||||
|
|
||||||
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
#ifndef CONFIG_STM32MP1_TRUSTED
|
#ifndef CONFIG_STM32MP1_TRUSTED
|
||||||
#if !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD)
|
#if !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD)
|
||||||
/* activate clock tree initialization in the driver */
|
/* activate clock tree initialization in the driver */
|
||||||
@ -2042,22 +2044,22 @@ static int stm32mp1_clk_probe(struct udevice *dev)
|
|||||||
stm32mp1_clk_dump(priv);
|
stm32mp1_clk_dump(priv);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
gd->cpu_clk = stm32mp1_clk_get(priv, _CK_MPU);
|
||||||
|
gd->bus_clk = stm32mp1_clk_get(priv, _ACLK);
|
||||||
|
/* DDRPHYC father */
|
||||||
|
gd->mem_clk = stm32mp1_clk_get(priv, _PLL2_R);
|
||||||
#if defined(CONFIG_DISPLAY_CPUINFO)
|
#if defined(CONFIG_DISPLAY_CPUINFO)
|
||||||
if (gd->flags & GD_FLG_RELOC) {
|
if (gd->flags & GD_FLG_RELOC) {
|
||||||
char buf[32];
|
char buf[32];
|
||||||
|
|
||||||
printf("Clocks:\n");
|
printf("Clocks:\n");
|
||||||
printf("- MPU : %s MHz\n",
|
printf("- MPU : %s MHz\n", strmhz(buf, gd->cpu_clk));
|
||||||
strmhz(buf, stm32mp1_clk_get(priv, _CK_MPU)));
|
|
||||||
printf("- MCU : %s MHz\n",
|
printf("- MCU : %s MHz\n",
|
||||||
strmhz(buf, stm32mp1_clk_get(priv, _CK_MCU)));
|
strmhz(buf, stm32mp1_clk_get(priv, _CK_MCU)));
|
||||||
printf("- AXI : %s MHz\n",
|
printf("- AXI : %s MHz\n", strmhz(buf, gd->bus_clk));
|
||||||
strmhz(buf, stm32mp1_clk_get(priv, _ACLK)));
|
|
||||||
printf("- PER : %s MHz\n",
|
printf("- PER : %s MHz\n",
|
||||||
strmhz(buf, stm32mp1_clk_get(priv, _CK_PER)));
|
strmhz(buf, stm32mp1_clk_get(priv, _CK_PER)));
|
||||||
/* DDRPHYC father */
|
printf("- DDR : %s MHz\n", strmhz(buf, gd->mem_clk));
|
||||||
printf("- DDR : %s MHz\n",
|
|
||||||
strmhz(buf, stm32mp1_clk_get(priv, _PLL2_R)));
|
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_DISPLAY_CPUINFO */
|
#endif /* CONFIG_DISPLAY_CPUINFO */
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user