summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Leroy <[email protected]>2023-04-04 10:14:33 +0200
committerChristophe Leroy <[email protected]>2023-04-05 19:46:18 +0200
commit9750a245cd4aca96ff01152929bf72004029545c (patch)
tree44f87f168e4b83f2f47cdca3845ef58b5ba4ee6b
parenta25dcda452bf6a6de72764a8d990d72e5def643d (diff)
powerpc: mpc8xx: Migrate to CONFIG_SYS_CLK_FREQ
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 <[email protected]>
-rw-r--r--arch/powerpc/cpu/mpc8xx/Kconfig3
-rw-r--r--arch/powerpc/cpu/mpc8xx/speed.c4
-rw-r--r--configs/CMPC885_defconfig2
-rw-r--r--configs/MCR3000_defconfig2
4 files changed, 4 insertions, 7 deletions
diff --git a/arch/powerpc/cpu/mpc8xx/Kconfig b/arch/powerpc/cpu/mpc8xx/Kconfig
index 628d3617bc8..a7050145129 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 ad3d3f9101c..1a882a38820 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 7dff6ff270d..484a81b8d3f 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 f96e9f06e1e..4b5ce407eae 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