]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
powerpc: mpc8xx: Migrate to CONFIG_SYS_CLK_FREQ
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 4 Apr 2023 08:14:33 +0000 (10:14 +0200)
committerChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 5 Apr 2023 17:46:18 +0000 (19:46 +0200)
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@csgroup.eu>
arch/powerpc/cpu/mpc8xx/Kconfig
arch/powerpc/cpu/mpc8xx/speed.c
configs/CMPC885_defconfig
configs/MCR3000_defconfig

index 628d3617bc8ca8f3e0aa71c0ab5424e04cca8d68..a705014512926760ac9fcfe83715fc541dfe3c83 100644 (file)
@@ -30,9 +30,6 @@ config MPC885
 
 endchoice
 
-config 8xx_GCLK_FREQ
-       int "CPU GCLK Frequency"
-
 comment "Specific commands"
 
 config CMD_IMMAP
index ad3d3f9101cc3f53c64e3f8bf916ae53a511a8ef..1a882a38820dfd5742b72f3fdb12fca71adea4e8 100644 (file)
@@ -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 */
index 7dff6ff270db228eefdc6ccc45ce0e1a80a975d3..484a81b8d3f76520d2a0a184453e98f5b6c4ceef 100644 (file)
@@ -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
index f96e9f06e1e3e7d439c74ef1e270671fe80e6938..4b5ce407eae6bdd94999919a2390acb1fa3999f9 100644 (file)
@@ -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