]> git.baikalelectronics.ru Git - uboot.git/commitdiff
nxp: ics307_clk: Guard get_board_ddr_clk function correctly
authorTom Rini <trini@konsulko.com>
Tue, 14 Dec 2021 18:36:38 +0000 (13:36 -0500)
committerTom Rini <trini@konsulko.com>
Mon, 27 Dec 2021 21:20:18 +0000 (16:20 -0500)
When we have CONFIG_DYNAMIC_DDR_CLK_FREQ set is the only time we should
have this function, so guard it so that we can include <clock_legacy.h>
in this file later on.

Signed-off-by: Tom Rini <trini@konsulko.com>
board/freescale/common/ics307_clk.c

index 2143395781a19b5fd778b1d5f76ed2d9677877f3..03be8be303477411b2e79bac8e145dd59ee85159 100644 (file)
@@ -137,6 +137,7 @@ unsigned long get_board_sys_clk(void)
                        in_8(&fpga_reg->sclk[2]));
 }
 
+#ifdef CONFIG_DYNAMIC_DDR_CLK_FREQ
 unsigned long get_board_ddr_clk(void)
 {
        return ics307_clk_freq(
@@ -144,3 +145,4 @@ unsigned long get_board_ddr_clk(void)
                        in_8(&fpga_reg->dclk[1]),
                        in_8(&fpga_reg->dclk[2]));
 }
+#endif