diff options
author | Tom Rini <trini@konsulko.com> | 2021-08-21 13:50:17 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-08-31 17:46:37 -0400 |
commit | efb5dab7ba8a9a6f89e44c4e60b0adb768c77e84 (patch) | |
tree | 3e7132dcd7e90d3ca7f0a4564517b3b11dd6bed9 /board | |
parent | 222d22a39a459f8982778bc28fad6fc4acc2e3a7 (diff) | |
download | u-boot-efb5dab7ba8a9a6f89e44c4e60b0adb768c77e84.tar.gz |
nxp: Migrate CONFIG_DDR_CLK_FREQ to Kconfig
As this symbol can either be a fixed value or the function
get_board_ddr_clk, migration is tricky. Introduce a choice of DYNAMIC
or STATIC_DDR_CLK_FREQ. If DYNAMIC, we continue to use the board
defined get_board_ddr_clk function. If STATIC, set CONFIG_DDR_CLK_FREQ
to that value and now include/clock_legacy.h contains the function
prototype or defines get_board_ddr_clk() to that static value. Update
callers to test for DYNAMIC or STATIC.
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/freescale/common/ics307_clk.h | 1 | ||||
-rw-r--r-- | board/freescale/ls1021aqds/ls1021aqds.c | 2 | ||||
-rw-r--r-- | board/freescale/t102xrdb/spl.c | 5 | ||||
-rw-r--r-- | board/freescale/t102xrdb/t102xrdb.c | 5 | ||||
-rw-r--r-- | board/freescale/t104xrdb/spl.c | 5 | ||||
-rw-r--r-- | board/freescale/t208xrdb/spl.c | 5 | ||||
-rw-r--r-- | board/freescale/t208xrdb/t208xrdb.c | 5 | ||||
-rw-r--r-- | board/freescale/t4rdb/spl.c | 5 |
8 files changed, 2 insertions, 31 deletions
diff --git a/board/freescale/common/ics307_clk.h b/board/freescale/common/ics307_clk.h index 81d1aa715d..163496930c 100644 --- a/board/freescale/common/ics307_clk.h +++ b/board/freescale/common/ics307_clk.h @@ -8,7 +8,6 @@ #ifndef __ASSEMBLY__ extern unsigned long get_board_sys_clk(void); -extern unsigned long get_board_ddr_clk(void); extern unsigned long ics307_sysclk_calculator(unsigned long out_freq); #endif diff --git a/board/freescale/ls1021aqds/ls1021aqds.c b/board/freescale/ls1021aqds/ls1021aqds.c index 711d8c2906..fbbd27d9d7 100644 --- a/board/freescale/ls1021aqds/ls1021aqds.c +++ b/board/freescale/ls1021aqds/ls1021aqds.c @@ -127,6 +127,7 @@ unsigned long get_board_sys_clk(void) return 66666666; } +#ifdef CONFIG_DYNAMIC_DDR_CLK_FREQ unsigned long get_board_ddr_clk(void) { u8 ddrclk_conf = QIXIS_READ(brdcfg[1]); @@ -141,6 +142,7 @@ unsigned long get_board_ddr_clk(void) } return 66666666; } +#endif int dram_init(void) { diff --git a/board/freescale/t102xrdb/spl.c b/board/freescale/t102xrdb/spl.c index 71566851d0..ac373d7724 100644 --- a/board/freescale/t102xrdb/spl.c +++ b/board/freescale/t102xrdb/spl.c @@ -30,11 +30,6 @@ unsigned long get_board_sys_clk(void) return CONFIG_SYS_CLK_FREQ; } -unsigned long get_board_ddr_clk(void) -{ - return CONFIG_DDR_CLK_FREQ; -} - #if defined(CONFIG_SPL_MMC_BOOT) #define GPIO1_SD_SEL 0x00020000 int board_mmc_getcd(struct mmc *mmc) diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c index 51a36abe36..ab7675e209 100644 --- a/board/freescale/t102xrdb/t102xrdb.c +++ b/board/freescale/t102xrdb/t102xrdb.c @@ -167,11 +167,6 @@ unsigned long get_board_sys_clk(void) return CONFIG_SYS_CLK_FREQ; } -unsigned long get_board_ddr_clk(void) -{ - return CONFIG_DDR_CLK_FREQ; -} - #ifdef CONFIG_TARGET_T1024RDB void board_reset(void) { diff --git a/board/freescale/t104xrdb/spl.c b/board/freescale/t104xrdb/spl.c index f5fe73e62d..c7df11100e 100644 --- a/board/freescale/t104xrdb/spl.c +++ b/board/freescale/t104xrdb/spl.c @@ -30,11 +30,6 @@ unsigned long get_board_sys_clk(void) return CONFIG_SYS_CLK_FREQ; } -unsigned long get_board_ddr_clk(void) -{ - return CONFIG_DDR_CLK_FREQ; -} - #define FSL_CORENET_CCSR_PORSR1_RCW_MASK 0xFF800000 void board_init_f(ulong bootflag) { diff --git a/board/freescale/t208xrdb/spl.c b/board/freescale/t208xrdb/spl.c index b0ce9af000..2204a98ac8 100644 --- a/board/freescale/t208xrdb/spl.c +++ b/board/freescale/t208xrdb/spl.c @@ -29,11 +29,6 @@ unsigned long get_board_sys_clk(void) return CONFIG_SYS_CLK_FREQ; } -unsigned long get_board_ddr_clk(void) -{ - return CONFIG_DDR_CLK_FREQ; -} - void board_init_f(ulong bootflag) { u32 plat_ratio, sys_clk, ccb_clk; diff --git a/board/freescale/t208xrdb/t208xrdb.c b/board/freescale/t208xrdb/t208xrdb.c index 73ebb4a55b..3611dbbf32 100644 --- a/board/freescale/t208xrdb/t208xrdb.c +++ b/board/freescale/t208xrdb/t208xrdb.c @@ -114,11 +114,6 @@ unsigned long get_board_sys_clk(void) return CONFIG_SYS_CLK_FREQ; } -unsigned long get_board_ddr_clk(void) -{ - return CONFIG_DDR_CLK_FREQ; -} - int misc_init_r(void) { u8 reg; diff --git a/board/freescale/t4rdb/spl.c b/board/freescale/t4rdb/spl.c index e2f9c9b3de..69d1449b07 100644 --- a/board/freescale/t4rdb/spl.c +++ b/board/freescale/t4rdb/spl.c @@ -35,11 +35,6 @@ unsigned long get_board_sys_clk(void) return CONFIG_SYS_CLK_FREQ; } -unsigned long get_board_ddr_clk(void) -{ - return CONFIG_DDR_CLK_FREQ; -} - void board_init_f(ulong bootflag) { u32 plat_ratio, sys_clk, ccb_clk; |