]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
CONFIG_SYS_CLK_FREQ: Consistently be static or get_board_sys_clk()
authorTom Rini <trini@konsulko.com>
Tue, 14 Dec 2021 18:36:39 +0000 (13:36 -0500)
committerTom Rini <trini@konsulko.com>
Mon, 27 Dec 2021 21:20:18 +0000 (16:20 -0500)
This CONFIG option is used in one of two ways.  The first way is that it
is defined to a static value, of an unsigned long size.  The second way
is that it is defined to something, typically a function, to determine
this value at run time.

However, in a few cases that function returns a static value.  Change
that to using the static value directly.

In the case of using something at run time, convert everything to using
a function of the same name and prototype.  This will allow for further
cleanups.

Finally, we have a few cases where the function is just not used, so
drop it.

Signed-off-by: Tom Rini <trini@konsulko.com>
35 files changed:
arch/arm/mach-davinci/cpu.c
board/cadence/xtfpga/xtfpga.c
board/freescale/common/cadmus.c
board/freescale/common/cadmus.h
board/freescale/ls1021aqds/ls1021aqds.c
board/freescale/ls1088a/ls1088a.c
board/freescale/p2041rdb/p2041rdb.c
board/freescale/t102xrdb/spl.c
board/freescale/t102xrdb/t102xrdb.c
board/freescale/t104xrdb/spl.c
board/freescale/t208xrdb/spl.c
board/freescale/t208xrdb/t208xrdb.c
board/freescale/t4rdb/spl.c
board/keymile/kmcent2/kmcent2.c
board/xes/common/fsl_8xxx_clk.c
include/configs/MPC8548CDS.h
include/configs/P2041RDB.h
include/configs/T102xRDB.h
include/configs/T208xRDB.h
include/configs/T4240RDB.h
include/configs/alt.h
include/configs/blanche.h
include/configs/condor.h
include/configs/da850evm.h
include/configs/eagle.h
include/configs/falcon.h
include/configs/gose.h
include/configs/koelsch.h
include/configs/lager.h
include/configs/legoev3.h
include/configs/omapl138_lcdk.h
include/configs/porter.h
include/configs/silk.h
include/configs/stout.h
include/configs/xtfpga.h

index aefd21dc458a4ac5b505714939bb3e23eda6c956..439d2e2b4d28f1f09ffa5e17a07bc009dd43e3a7 100644 (file)
@@ -91,3 +91,8 @@ int set_cpu_clk_info(void)
        gd->bd->bi_dsp_freq = 0;
        return 0;
 }
+
+unsigned long get_board_sys_clk(void)
+{
+       return clk_get(DAVINCI_ARM_CLKID);
+}
index c26793d76cc8325fe15e3b9708e9297b670f347f..d30940d7c3e3fe4d294e33a9e5497ea4002528a6 100644 (file)
@@ -49,7 +49,7 @@ int checkboard(void)
        return 0;
 }
 
-int board_postclk_init(void)
+unsigned long get_board_sys_clk(void)
 {
        /*
         * Obtain CPU clock frequency from board and cache in global
@@ -58,11 +58,17 @@ int board_postclk_init(void)
         */
 
 #ifdef CONFIG_SYS_FPGAREG_FREQ
-       gd->cpu_clk = (*(volatile unsigned long *)CONFIG_SYS_FPGAREG_FREQ);
+       return (*(volatile unsigned long *)CONFIG_SYS_FPGAREG_FREQ);
 #else
        /* early Tensilica bitstreams lack this reg, but most run at 50 MHz */
-       gd->cpu_clk = 50000000UL;
+       return 50000000;
 #endif
+}
+
+int board_postclk_init(void)
+{
+       gd->cpu_clk = get_board_sys_clk();
+
        return 0;
 }
 
index 7e7394f333e7cca7667cbc07b7ea63bc99931e64..b14abac9a1c43bd61e00794ebe404e10b2e6d020 100644 (file)
@@ -37,7 +37,7 @@ get_board_version(void)
 
 
 unsigned long
-get_clock_freq(void)
+get_board_sys_clk(void)
 {
        volatile cadmus_reg_t *cadmus = (cadmus_reg_t *)CONFIG_SYS_CADMUS_BASE_REG;
 
index ddc2bb6c1f6659302c74e5ee0b65079f6dec51cd..fb74e8f6db5ed04e10d994ac79e4f857a8dde92c 100644 (file)
@@ -19,7 +19,7 @@ extern unsigned int get_board_version(void);
 /*
  * Returns either 33000000 or 66000000 as the SYS_CLK_FREQ.
  */
-extern unsigned long get_clock_freq(void);
+extern unsigned long get_board_sys_clk(void);
 
 
 /*
index fbbd27d9d71eb156dbe846201bdcb7b0212302e2..0647622cde5936c0d3505f89e78d3efe0f9c250c 100644 (file)
@@ -102,6 +102,7 @@ int checkboard(void)
        return 0;
 }
 
+#ifdef CONFIG_DYNAMIC_SYS_CLK_FREQ
 unsigned long get_board_sys_clk(void)
 {
        u8 sysclk_conf = QIXIS_READ(brdcfg[1]);
@@ -126,6 +127,7 @@ unsigned long get_board_sys_clk(void)
        }
        return 66666666;
 }
+#endif
 
 #ifdef CONFIG_DYNAMIC_DDR_CLK_FREQ
 unsigned long get_board_ddr_clk(void)
index 73c2077ecdb65c2f7c94f38a5f12b31a83ab2f71..8a112a699a6b3382bbe0982df05f30428686a9ab 100644 (file)
@@ -374,6 +374,7 @@ bool if_board_diff_clk(void)
 #endif
 }
 
+#ifdef CONFIG_DYNAMIC_SYS_CLK_FREQ
 unsigned long get_board_sys_clk(void)
 {
        u8 sysclk_conf = QIXIS_READ(brdcfg[1]);
@@ -397,6 +398,7 @@ unsigned long get_board_sys_clk(void)
 
        return 66666666;
 }
+#endif
 
 #ifdef CONFIG_DYNAMIC_DDR_CLK_FREQ
 unsigned long get_board_ddr_clk(void)
index 4ece1e6ea0a4fd94c90677555311f7b6c8430261..894fe8ee2794e202b6ac59b33ac4429ead51ac06 100644 (file)
@@ -148,7 +148,7 @@ int board_early_init_r(void)
        return 0;
 }
 
-unsigned long get_board_sys_clk(unsigned long dummy)
+unsigned long get_board_sys_clk(void)
 {
        u8 sysclk_conf = CPLD_READ(sysclk_sw1);
 
index ac373d7724788f2df6c632feeaa6f1c72871b940..7f59172076be5a5f04970eb0c1f4513ab919bafe 100644 (file)
@@ -25,11 +25,6 @@ phys_size_t get_effective_memsize(void)
        return CONFIG_SYS_L3_SIZE;
 }
 
-unsigned long get_board_sys_clk(void)
-{
-       return CONFIG_SYS_CLK_FREQ;
-}
-
 #if defined(CONFIG_SPL_MMC_BOOT)
 #define GPIO1_SD_SEL 0x00020000
 int board_mmc_getcd(struct mmc *mmc)
@@ -74,7 +69,7 @@ void board_init_f(ulong bootflag)
 #endif
 
        /* initialize selected port with appropriate baud rate */
-       sys_clk = get_board_sys_clk();
+       sys_clk = CONFIG_SYS_CLK_FREQ;
        plat_ratio = (in_be32(&gur->rcwsr[0]) >> 25) & 0x1f;
        ccb_clk = sys_clk * plat_ratio / 2;
 
index ab7675e2090ca857b0fce68d2eca6e3ec4c7c637..539a5c73444ec517ee95f0dacfeafa0b0c83df7c 100644 (file)
@@ -162,11 +162,6 @@ int board_early_init_r(void)
        return 0;
 }
 
-unsigned long get_board_sys_clk(void)
-{
-       return CONFIG_SYS_CLK_FREQ;
-}
-
 #ifdef CONFIG_TARGET_T1024RDB
 void board_reset(void)
 {
index c7df11100e04371cf3443b0a6d05bb4033115b87..6acc5161b6dd629361be4123c5c8f5bf9900a17e 100644 (file)
@@ -25,11 +25,6 @@ phys_size_t get_effective_memsize(void)
        return CONFIG_SYS_L3_SIZE;
 }
 
-unsigned long get_board_sys_clk(void)
-{
-       return CONFIG_SYS_CLK_FREQ;
-}
-
 #define FSL_CORENET_CCSR_PORSR1_RCW_MASK       0xFF800000
 void board_init_f(ulong bootflag)
 {
@@ -73,7 +68,7 @@ void board_init_f(ulong bootflag)
        console_init_f();
 
        /* initialize selected port with appropriate baud rate */
-       sys_clk = get_board_sys_clk();
+       sys_clk = CONFIG_SYS_CLK_FREQ;
        plat_ratio = (in_be32(&gur->rcwsr[0]) >> 25) & 0x1f;
        uart_clk = sys_clk * plat_ratio / 2;
 
index 2204a98ac8ae136aa28e94dd46d8e8a3c6dcba92..40aa0c5df39e889d94ce81a9caf13f8f418e9131 100644 (file)
@@ -24,11 +24,6 @@ phys_size_t get_effective_memsize(void)
        return CONFIG_SYS_L3_SIZE;
 }
 
-unsigned long get_board_sys_clk(void)
-{
-       return CONFIG_SYS_CLK_FREQ;
-}
-
 void board_init_f(ulong bootflag)
 {
        u32 plat_ratio, sys_clk, ccb_clk;
@@ -43,7 +38,7 @@ void board_init_f(ulong bootflag)
        console_init_f();
 
        /* initialize selected port with appropriate baud rate */
-       sys_clk = get_board_sys_clk();
+       sys_clk = CONFIG_SYS_CLK_FREQ;
        plat_ratio = (in_be32(&gur->rcwsr[0]) >> 25) & 0x1f;
        ccb_clk = sys_clk * plat_ratio / 2;
 
index 3611dbbf3273743b54f9b0fc19392ffb7d429310..1c8017b593aa5d88fcde580c6447955940347dec 100644 (file)
@@ -109,11 +109,6 @@ int board_early_init_r(void)
        return 0;
 }
 
-unsigned long get_board_sys_clk(void)
-{
-       return CONFIG_SYS_CLK_FREQ;
-}
-
 int misc_init_r(void)
 {
        u8 reg;
index 69d1449b070ca0a7e0de78b94a51b1ba70f233da..8c7421da81c8e15b5cce1e18f8dd971c9a0f04cb 100644 (file)
@@ -30,11 +30,6 @@ phys_size_t get_effective_memsize(void)
        return CONFIG_SYS_L3_SIZE;
 }
 
-unsigned long get_board_sys_clk(void)
-{
-       return CONFIG_SYS_CLK_FREQ;
-}
-
 void board_init_f(ulong bootflag)
 {
        u32 plat_ratio, sys_clk, ccb_clk;
@@ -52,7 +47,7 @@ void board_init_f(ulong bootflag)
        console_init_f();
 
        /* initialize selected port with appropriate baud rate */
-       sys_clk = get_board_sys_clk();
+       sys_clk = CONFIG_SYS_CLK_FREQ;
        plat_ratio = (in_be32(&gur->rcwsr[0]) >> 25) & 0x1f;
        ccb_clk = sys_clk * plat_ratio / 2;
 
index 4f5164e63ca9b2a960fde4419add60a319e804ba..ca24b960c7624babb29ca700550f018158531c72 100644 (file)
@@ -181,11 +181,6 @@ unsigned long get_serial_clock(unsigned long dummy)
        return (gd->bus_clk / 2);
 }
 
-unsigned long get_board_sys_clk(unsigned long dummy)
-{
-       return 66666666;
-}
-
 int misc_init_f(void)
 {
        /* configure QRIO pis for i2c deblocking */
index 8ca65ca859310c251234aa698a9ae10009c31d09..8c72c1544567aa9ee66f59cacb33be8430ac2ea4 100644 (file)
@@ -9,7 +9,7 @@
 /*
  * Return SYSCLK input frequency - 50 MHz or 66 MHz depending on POR config
  */
-unsigned long get_board_sys_clk(ulong dummy)
+unsigned long get_board_sys_clk(void)
 {
 #if defined(CONFIG_MPC85xx)
        volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
@@ -33,13 +33,13 @@ unsigned long get_board_sys_clk(ulong dummy)
  * Return DDR input clock - synchronous with SYSCLK or 66 MHz
  * Note: 86xx doesn't support asynchronous DDR clk
  */
-unsigned long get_board_ddr_clk(ulong dummy)
+unsigned long get_board_ddr_clk(void)
 {
        volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
        u32 ddr_ratio = (in_be32(&gur->porpllsr) & 0x00003e00) >> 9;
 
        if (ddr_ratio == 0x7)
-               return get_board_sys_clk(dummy);
+               return get_board_sys_clk();
 
 #ifdef CONFIG_ARCH_P2020
        if (in_be32(&gur->gpporcr) & 0x20000)
index c5cefd47410fcc4fcefe53f7a01ee607ef4329ab..5c1d9b522eb798f615e6a38f2a34093d92c50119 100644 (file)
@@ -24,9 +24,9 @@
 
 #ifndef __ASSEMBLY__
 #include <linux/stringify.h>
-extern unsigned long get_clock_freq(void);
+extern unsigned long get_board_sys_clk(void);
 #endif
-#define CONFIG_SYS_CLK_FREQ    get_clock_freq() /* sysclk for MPC85xx */
+#define CONFIG_SYS_CLK_FREQ    get_board_sys_clk() /* sysclk for MPC85xx */
 
 /*
  * These can be toggled for performance analysis, otherwise use default.
index d5f1ffe371b60f9f368204668f4142cbe630fa09..424dd72d2e6d34e79a8474f7623481e74bc32c7d 100644 (file)
 #endif
 
 #ifndef __ASSEMBLY__
-unsigned long get_board_sys_clk(unsigned long dummy);
+unsigned long get_board_sys_clk(void);
 #include <linux/stringify.h>
 #endif
-#define CONFIG_SYS_CLK_FREQ    get_board_sys_clk(0)
+#define CONFIG_SYS_CLK_FREQ    get_board_sys_clk()
 
 /*
  * These can be toggled for performance analysis, otherwise use default.
index 7bd46c41dfc84d2cfadac574ebaed1ff7cc132f3..aecf2452ad489357ebb9758c46807b34ee40aaf4 100644 (file)
 #define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc
 #endif
 
-#ifndef __ASSEMBLY__
-unsigned long get_board_sys_clk(void);
-#endif
-
 #define CONFIG_SYS_CLK_FREQ    100000000
 
 /*
index 5815bd4c367ab7279367775142d1fa183c2da85e..e90b30db52667b011a492abb07c7bfb60f780833 100644 (file)
 #define CONFIG_MEM_INIT_VALUE          0xdeadbeef
 #endif
 
-#ifndef __ASSEMBLY__
-unsigned long get_board_sys_clk(void);
-#endif
-
 #define CONFIG_SYS_CLK_FREQ    66660000
 
 /*
index fc8c33ac57134de10b6788818d8d40d7363ec83b..037425bba1dbc73e200e67432717615feee435e0 100644 (file)
 
 #define CONFIG_SYS_CLK_FREQ    66666666
 
-#ifndef __ASSEMBLY__
-unsigned long get_board_sys_clk(void);
-#endif
-
 /*
  * DDR Setup
  */
index 8456a6b2c331cb9e1d10ff29d24ae3ac3548def6..079d2d719401d4e9e0bfcc2532949defa0999b0f 100644 (file)
@@ -34,8 +34,7 @@
 #define CONFIG_BITBANGMII_MULTI
 
 /* Board Clock */
-#define RMOBILE_XTAL_CLK       20000000u
-#define CONFIG_SYS_CLK_FREQ    RMOBILE_XTAL_CLK
+#define CONFIG_SYS_CLK_FREQ    20000000
 
 #define CONFIG_EXTRA_ENV_SETTINGS      \
        "bootm_size=0x10000000\0"       \
index f048f158ed2ac70ef9300d11f0ab96d7c77ca91a..f2cc765b96a67dca81a15f93e0b8958387f26a40 100644 (file)
@@ -45,8 +45,7 @@
 #endif
 
 /* Board Clock */
-#define RMOBILE_XTAL_CLK       20000000u
-#define CONFIG_SYS_CLK_FREQ    RMOBILE_XTAL_CLK
+#define CONFIG_SYS_CLK_FREQ    20000000
 
 /* ENV setting */
 
index 36466f0f500d8d03a3ec961bce3585715bc9a987..429047b1129300f972ff5a64138009df72b81efc 100644 (file)
@@ -27,7 +27,7 @@
 
 /* Board Clock */
 /* XTAL_CLK : 33.33MHz */
-#define CONFIG_SYS_CLK_FREQ    33333333u
+#define CONFIG_SYS_CLK_FREQ    33333333
 
 /* Generic Timer Definitions (use in assembler source) */
 #define COUNTER_FREQUENCY      0xFE502A        /* 16.66MHz from CPclk */
index 9d27e502298e4be9a70fe75efd5f8eb19e5ae4d2..d1c0cc2363d1f3e3fb0151d719d81524d7284fd9 100644 (file)
 /*
  * SoC Configuration
  */
+#ifndef __ASSEMBLY__
+unsigned long get_board_sys_clk(void);
+#endif
 #define CONFIG_SYS_EXCEPTION_VECTORS_HIGH
-#define CONFIG_SYS_CLK_FREQ            clk_get(DAVINCI_ARM_CLKID)
+#define CONFIG_SYS_CLK_FREQ            get_board_sys_clk()
 #define CONFIG_SYS_OSCIN_FREQ          24000000
 #define CONFIG_SYS_TIMERBASE           DAVINCI_TIMER0_BASE
 #define CONFIG_SYS_HZ_CLOCK            clk_get(DAVINCI_AUXCLK_CLKID)
index ee5350425096cf9e2b781335f32f55863549d08e..6d17b065fe7d90e39a77886928cfefdce8a6f397 100644 (file)
@@ -18,7 +18,7 @@
 
 /* Board Clock */
 /* XTAL_CLK : 33.33MHz */
-#define CONFIG_SYS_CLK_FREQ    33333333u
+#define CONFIG_SYS_CLK_FREQ    33333333
 
 /* Generic Timer Definitions (use in assembler source) */
 #define COUNTER_FREQUENCY      0xFE502A        /* 16.66MHz from CPclk */
index d783faf180e5ceb23e9e64a3572cc4059654e5ae..f9c3c2b9c76bfe0172b9142db13c9426493add12 100644 (file)
@@ -26,7 +26,7 @@
 
 /* Board Clock */
 /* XTAL_CLK : 16.66MHz */
-#define CONFIG_SYS_CLK_FREQ    16666666u
+#define CONFIG_SYS_CLK_FREQ    16666666
 
 /* Generic Timer Definitions (use in assembler source) */
 #define COUNTER_FREQUENCY      0xFE502A        /* 16.66MHz from CPclk */
index 60a89e00236123c4015a500ee55aefd1df94e5eb..2e35752664b0811eea8eb7d12aecca4fd7e3468e 100644 (file)
@@ -30,8 +30,7 @@
 #define CONFIG_BITBANGMII_MULTI
 
 /* Board Clock */
-#define RMOBILE_XTAL_CLK       20000000u
-#define CONFIG_SYS_CLK_FREQ    RMOBILE_XTAL_CLK
+#define CONFIG_SYS_CLK_FREQ    20000000
 
 #define CONFIG_EXTRA_ENV_SETTINGS      \
        "bootm_size=0x10000000\0"
index 65a38c5757b46e94fa9d06ddd3f00c8e9ec90f6f..18a1ebd45632dd0e3a8b2c05a75cd53da691e599 100644 (file)
@@ -30,8 +30,7 @@
 #define CONFIG_BITBANGMII_MULTI
 
 /* Board Clock */
-#define RMOBILE_XTAL_CLK       20000000u
-#define CONFIG_SYS_CLK_FREQ    RMOBILE_XTAL_CLK
+#define CONFIG_SYS_CLK_FREQ    20000000
 
 #define CONFIG_EXTRA_ENV_SETTINGS      \
        "bootm_size=0x10000000\0"
index c5001e3ec7516af0928f09788339fc7b3f121078..6e003e846620eaa23a60ff7ccf45d76874ee6b86 100644 (file)
@@ -31,8 +31,7 @@
 #define CONFIG_BITBANGMII_MULTI
 
 /* Board Clock */
-#define RMOBILE_XTAL_CLK       20000000u
-#define CONFIG_SYS_CLK_FREQ    RMOBILE_XTAL_CLK
+#define CONFIG_SYS_CLK_FREQ    20000000
 
 #define CONFIG_EXTRA_ENV_SETTINGS      \
        "bootm_size=0x10000000\0"
index 0e4d134dbdc2b39f8005dcb78a2dee5a1658b7fe..21ba9b8da8c46f89b0dc61bfe971c13d01330001 100644 (file)
 /*
  * SoC Configuration
  */
+#ifndef __ASSEMBLY__
+unsigned long get_board_sys_clk(void);
+#endif
 #define CONFIG_SYS_EXCEPTION_VECTORS_HIGH
-#define CONFIG_SYS_CLK_FREQ            clk_get(DAVINCI_ARM_CLKID)
+#define CONFIG_SYS_CLK_FREQ            get_board_sys_clk()
 #define CONFIG_SYS_OSCIN_FREQ          24000000
 #define CONFIG_SYS_TIMERBASE           DAVINCI_TIMER0_BASE
 #define CONFIG_SYS_HZ_CLOCK            clk_get(DAVINCI_AUXCLK_CLKID)
index bc707ebfdc8327f154c83c8081ab1165721ac0a0..1036a05a29087ef4860217ff1b51b77b4b1dd177 100644 (file)
 /*
  * SoC Configuration
  */
-#define CONFIG_SYS_CLK_FREQ            clk_get(DAVINCI_ARM_CLKID)
+#ifndef __ASSEMBLY__
+unsigned long get_board_sys_clk(void);
+#endif
+#define CONFIG_SYS_CLK_FREQ            get_board_sys_clk()
 #define CONFIG_SYS_OSCIN_FREQ          24000000
 #define CONFIG_SYS_TIMERBASE           DAVINCI_TIMER0_BASE
 #define CONFIG_SYS_HZ_CLOCK            clk_get(DAVINCI_AUXCLK_CLKID)
index 7ffcf5fc38aec477098184210322cef30d5355f2..da2e171e002bce8b39a4bf4f2dc097147d9cf1e5 100644 (file)
@@ -35,8 +35,7 @@
 #define CONFIG_BITBANGMII_MULTI
 
 /* Board Clock */
-#define RMOBILE_XTAL_CLK       20000000u
-#define CONFIG_SYS_CLK_FREQ    RMOBILE_XTAL_CLK
+#define CONFIG_SYS_CLK_FREQ    20000000
 
 #define CONFIG_EXTRA_ENV_SETTINGS      \
        "bootm_size=0x10000000\0"
index eee60fdfabd2ffe04e8a5bd905e129ab4882a7f5..785caa7b89af147f3e675909b42fdc7445e6b5d6 100644 (file)
@@ -35,8 +35,7 @@
 #define CONFIG_BITBANGMII_MULTI
 
 /* Board Clock */
-#define RMOBILE_XTAL_CLK       20000000u
-#define CONFIG_SYS_CLK_FREQ    RMOBILE_XTAL_CLK
+#define CONFIG_SYS_CLK_FREQ    20000000
 
 #define CONFIG_EXTRA_ENV_SETTINGS      \
        "bootm_size=0x10000000\0"
index a1e7e86f39ab16b8aa3c786ccb4c86dce42e7070..0d077ea031b11a70ca5f24a5943a36a9bb9bfcd5 100644 (file)
@@ -39,8 +39,7 @@
 #define CONFIG_BITBANGMII_MULTI
 
 /* Board Clock */
-#define RMOBILE_XTAL_CLK       20000000u
-#define CONFIG_SYS_CLK_FREQ    RMOBILE_XTAL_CLK
+#define CONFIG_SYS_CLK_FREQ    20000000
 
 #define CONFIG_EXTRA_ENV_SETTINGS      \
        "bootm_size=0x10000000\0"
index ccc90a66f7d1b7e47b19de6bbb62b32809470883..d1ba78a0309980298d590c2927be06e7d68cb7da 100644 (file)
 #define CONFIG_XTFPGA
 
 /* FPGA CPU freq after init */
-#define CONFIG_SYS_CLK_FREQ            (gd->cpu_clk)
+#ifndef __ASSEMBLY__
+unsigned long get_board_sys_clk(void);
+#endif
+#define CONFIG_SYS_CLK_FREQ            get_board_sys_clk()
 
 /*===================*/
 /* RAM Layout        */