[PATCH v1 01/14] powerpc: mpc8xx: Migrate to CONFIG_SYS_CLK_FREQ
Christophe Leroy
christophe.leroy at csgroup.eu
Thu Apr 6 16:27:05 CEST 2023
8xx has CONFIG_8xx_GCLK_FREQ which is similar to
CONFIG_SYS_CLK_FREQ, and doesn't set CONFIG_SYS_CLK_FREQ.
Due to that, get_board_sys_clk() returns 0.
Remove CONFIG_8xx_GCLK_FREQ and use CONFIG_SYS_CLK_FREQ instead.
Signed-off-by: Christophe Leroy <christophe.leroy at csgroup.eu>
---
arch/powerpc/cpu/mpc8xx/Kconfig | 3 ---
arch/powerpc/cpu/mpc8xx/speed.c | 4 ++--
configs/CMPC885_defconfig | 2 +-
configs/MCR3000_defconfig | 2 +-
4 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/cpu/mpc8xx/Kconfig b/arch/powerpc/cpu/mpc8xx/Kconfig
index 628d3617bc..a705014512 100644
--- a/arch/powerpc/cpu/mpc8xx/Kconfig
+++ b/arch/powerpc/cpu/mpc8xx/Kconfig
@@ -30,9 +30,6 @@ config MPC885
endchoice
-config 8xx_GCLK_FREQ
- int "CPU GCLK Frequency"
-
comment "Specific commands"
config CMD_IMMAP
diff --git a/arch/powerpc/cpu/mpc8xx/speed.c b/arch/powerpc/cpu/mpc8xx/speed.c
index ad3d3f9101..1a882a3882 100644
--- a/arch/powerpc/cpu/mpc8xx/speed.c
+++ b/arch/powerpc/cpu/mpc8xx/speed.c
@@ -14,7 +14,7 @@
DECLARE_GLOBAL_DATA_PTR;
/*
- * get_clocks() fills in gd->cpu_clock depending on CONFIG_8xx_GCLK_FREQ
+ * get_clocks() fills in gd->cpu_clk depending on CONFIG_SYS_CLK_FREQ
*/
int get_clocks(void)
{
@@ -28,7 +28,7 @@ int get_clocks(void)
* (For example, the cogent CMA286-60 CPU module has no
* separate oscillator for PITRTCLK)
*/
- gd->cpu_clk = CONFIG_8xx_GCLK_FREQ;
+ gd->cpu_clk = CONFIG_SYS_CLK_FREQ;
if ((sccr & SCCR_EBDF11) == 0) {
/* No Bus Divider active */
diff --git a/configs/CMPC885_defconfig b/configs/CMPC885_defconfig
index 7dff6ff270..484a81b8d3 100644
--- a/configs/CMPC885_defconfig
+++ b/configs/CMPC885_defconfig
@@ -4,11 +4,11 @@ CONFIG_ENV_SECT_SIZE=0x2000
CONFIG_DM_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="cmpc885"
CONFIG_SYS_PROMPT="S3K> "
+CONFIG_SYS_CLK_FREQ=132000000
CONFIG_ENV_ADDR=0x40004000
CONFIG_MPC8xx=y
CONFIG_TARGET_CMPC885=y
CONFIG_MPC885=y
-CONFIG_8xx_GCLK_FREQ=132000000
CONFIG_CMD_IMMAP=y
CONFIG_SYS_SIUMCR=0x00620000
CONFIG_SYS_SYPCR=0xFFFFFF8F
diff --git a/configs/MCR3000_defconfig b/configs/MCR3000_defconfig
index f96e9f06e1..4b5ce407ea 100644
--- a/configs/MCR3000_defconfig
+++ b/configs/MCR3000_defconfig
@@ -4,11 +4,11 @@ CONFIG_ENV_SIZE=0x2000
CONFIG_ENV_SECT_SIZE=0x2000
CONFIG_DEFAULT_DEVICE_TREE="mcr3000"
CONFIG_SYS_PROMPT="S3K> "
+CONFIG_SYS_CLK_FREQ=132000000
CONFIG_SYS_LOAD_ADDR=0x200000
CONFIG_ENV_ADDR=0x4004000
CONFIG_MPC8xx=y
CONFIG_TARGET_MCR3000=y
-CONFIG_8xx_GCLK_FREQ=132000000
CONFIG_CMD_IMMAP=y
CONFIG_SYS_SIUMCR=0x00600400
CONFIG_SYS_SYPCR=0xFFFFFF8F
--
2.39.2
More information about the U-Boot
mailing list