common: Move clock functions into a new file
These three clock functions don't use driver model and should be migrated.
In the meantime, create a new file to hold them.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/arch/arm/cpu/arm1136/mx35/generic.c b/arch/arm/cpu/arm1136/mx35/generic.c
index a651b8c..45bf49b 100644
--- a/arch/arm/cpu/arm1136/mx35/generic.c
+++ b/arch/arm/cpu/arm1136/mx35/generic.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <div64.h>
#include <asm/io.h>
#include <linux/errno.h>
diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/clk.c b/arch/arm/cpu/arm926ejs/lpc32xx/clk.c
index 5eb630d..cb2344d 100644
--- a/arch/arm/cpu/arm926ejs/lpc32xx/clk.c
+++ b/arch/arm/cpu/arm926ejs/lpc32xx/clk.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <div64.h>
#include <asm/arch/cpu.h>
#include <asm/arch/clk.h>
diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c
index eeb61d0..09bda0e 100644
--- a/arch/arm/cpu/arm926ejs/mx25/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx25/generic.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <div64.h>
#include <netdev.h>
#include <vsprintf.h>
diff --git a/arch/arm/cpu/armv7/ls102xa/clock.c b/arch/arm/cpu/armv7/ls102xa/clock.c
index 7a1053c..f3bdb14 100644
--- a/arch/arm/cpu/armv7/ls102xa/clock.c
+++ b/arch/arm/cpu/armv7/ls102xa/clock.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <asm/io.h>
#include <asm/arch/immap_ls102xa.h>
#include <asm/arch/clock.h>
diff --git a/arch/arm/cpu/armv7/ls102xa/fdt.c b/arch/arm/cpu/armv7/ls102xa/fdt.c
index 1aadfff..16ab867 100644
--- a/arch/arm/cpu/armv7/ls102xa/fdt.c
+++ b/arch/arm/cpu/armv7/ls102xa/fdt.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
index 806c6ad..6698b82 100644
--- a/arch/arm/cpu/armv7/vf610/generic.c
+++ b/arch/arm/cpu/armv7/vf610/generic.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <cpu_func.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
index 1e7e46e..87c3e05 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <efi_loader.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c
index fec2318..c566890 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <cpu_func.h>
#include <linux/compiler.h>
#include <asm/io.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c
index bd8b9cb..7f8178f 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <cpu_func.h>
#include <linux/compiler.h>
#include <fsl_ifc.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
index 578f8d1..2175266 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <env.h>
#include <fsl_immap.h>
#include <fsl_ifc.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index ed3a605..8a6eeca 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <cpu_func.h>
#include <env.h>
#include <spl.h>
diff --git a/arch/arm/cpu/armv8/s32v234/generic.c b/arch/arm/cpu/armv8/s32v234/generic.c
index 2c4ea36..50ca419 100644
--- a/arch/arm/cpu/armv8/s32v234/generic.c
+++ b/arch/arm/cpu/armv8/s32v234/generic.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
diff --git a/arch/arm/mach-imx/mx7/clock.c b/arch/arm/mach-imx/mx7/clock.c
index 0e08cab..75be4f8 100644
--- a/arch/arm/mach-imx/mx7/clock.c
+++ b/arch/arm/mach-imx/mx7/clock.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <div64.h>
#include <asm/io.h>
#include <linux/errno.h>
diff --git a/arch/arm/mach-imx/mx7ulp/clock.c b/arch/arm/mach-imx/mx7ulp/clock.c
index d3365dd..3c0bccc 100644
--- a/arch/arm/mach-imx/mx7ulp/clock.c
+++ b/arch/arm/mach-imx/mx7ulp/clock.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <div64.h>
#include <asm/io.h>
#include <errno.h>
diff --git a/arch/arm/mach-imx/speed.c b/arch/arm/mach-imx/speed.c
index f9e486c..e78b1fd 100644
--- a/arch/arm/mach-imx/speed.c
+++ b/arch/arm/mach-imx/speed.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
diff --git a/arch/m68k/cpu/mcf5227x/speed.c b/arch/m68k/cpu/mcf5227x/speed.c
index f4e53bc..207f453 100644
--- a/arch/m68k/cpu/mcf5227x/speed.c
+++ b/arch/m68k/cpu/mcf5227x/speed.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <asm/processor.h>
#include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf523x/speed.c b/arch/m68k/cpu/mcf523x/speed.c
index a0c1d53..2f65ac2 100644
--- a/arch/m68k/cpu/mcf523x/speed.c
+++ b/arch/m68k/cpu/mcf523x/speed.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <asm/processor.h>
#include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf52x2/speed.c b/arch/m68k/cpu/mcf52x2/speed.c
index 0f274ad..02ef5d8 100644
--- a/arch/m68k/cpu/mcf52x2/speed.c
+++ b/arch/m68k/cpu/mcf52x2/speed.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <asm/processor.h>
#include <asm/immap.h>
#include <asm/io.h>
@@ -15,7 +16,7 @@
DECLARE_GLOBAL_DATA_PTR;
/* get_clocks() fills in gd->cpu_clock and gd->bus_clk */
-int get_clocks (void)
+int get_clocks(void)
{
#if defined(CONFIG_M5208)
pll_t *pll = (pll_t *) MMAP_PLL;
diff --git a/arch/m68k/cpu/mcf530x/speed.c b/arch/m68k/cpu/mcf530x/speed.c
index ae26047..cf53dfe 100644
--- a/arch/m68k/cpu/mcf530x/speed.c
+++ b/arch/m68k/cpu/mcf530x/speed.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <asm/processor.h>
#include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf532x/speed.c b/arch/m68k/cpu/mcf532x/speed.c
index 661abfa..0f54ea4 100644
--- a/arch/m68k/cpu/mcf532x/speed.c
+++ b/arch/m68k/cpu/mcf532x/speed.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <asm/processor.h>
#include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf5445x/speed.c b/arch/m68k/cpu/mcf5445x/speed.c
index e15e32e..eaa3b39 100644
--- a/arch/m68k/cpu/mcf5445x/speed.c
+++ b/arch/m68k/cpu/mcf5445x/speed.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <asm/processor.h>
#include <asm/immap.h>
diff --git a/arch/m68k/cpu/mcf547x_8x/speed.c b/arch/m68k/cpu/mcf547x_8x/speed.c
index 5ba6426..bc22560 100644
--- a/arch/m68k/cpu/mcf547x_8x/speed.c
+++ b/arch/m68k/cpu/mcf547x_8x/speed.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <asm/processor.h>
#include <asm/immap.h>
diff --git a/arch/mips/mach-ath79/ar933x/clk.c b/arch/mips/mach-ath79/ar933x/clk.c
index 7c15c21..3feb25c 100644
--- a/arch/mips/mach-ath79/ar933x/clk.c
+++ b/arch/mips/mach-ath79/ar933x/clk.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <asm/io.h>
#include <asm/addrspace.h>
#include <asm/types.h>
diff --git a/arch/mips/mach-ath79/ar934x/clk.c b/arch/mips/mach-ath79/ar934x/clk.c
index a5dace7..fc4625d 100644
--- a/arch/mips/mach-ath79/ar934x/clk.c
+++ b/arch/mips/mach-ath79/ar934x/clk.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <asm/io.h>
#include <asm/addrspace.h>
#include <asm/types.h>
diff --git a/arch/mips/mach-ath79/qca953x/clk.c b/arch/mips/mach-ath79/qca953x/clk.c
index 7447ade..d450ad8 100644
--- a/arch/mips/mach-ath79/qca953x/clk.c
+++ b/arch/mips/mach-ath79/qca953x/clk.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <asm/io.h>
#include <asm/addrspace.h>
#include <asm/types.h>
diff --git a/arch/mips/mach-ath79/qca956x/clk.c b/arch/mips/mach-ath79/qca956x/clk.c
index 33a44cf..d71c94e 100644
--- a/arch/mips/mach-ath79/qca956x/clk.c
+++ b/arch/mips/mach-ath79/qca956x/clk.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <asm/io.h>
#include <asm/addrspace.h>
#include <asm/types.h>
diff --git a/arch/powerpc/cpu/mpc83xx/fdt.c b/arch/powerpc/cpu/mpc83xx/fdt.c
index b487e31..5c68535 100644
--- a/arch/powerpc/cpu/mpc83xx/fdt.c
+++ b/arch/powerpc/cpu/mpc83xx/fdt.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
#include <asm/processor.h>
diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c
index 93af7f4..e2fc0b1 100644
--- a/arch/powerpc/cpu/mpc83xx/speed.c
+++ b/arch/powerpc/cpu/mpc83xx/speed.c
@@ -9,6 +9,7 @@
#ifndef CONFIG_CLK_MPC83XX
#include <common.h>
+#include <clock_legacy.h>
#include <mpc83xx.h>
#include <command.h>
#include <vsprintf.h>
diff --git a/arch/powerpc/cpu/mpc83xx/spl_minimal.c b/arch/powerpc/cpu/mpc83xx/spl_minimal.c
index 133f7ab..75b03f3 100644
--- a/arch/powerpc/cpu/mpc83xx/spl_minimal.c
+++ b/arch/powerpc/cpu/mpc83xx/spl_minimal.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <mpc83xx.h>
#include "lblaw/lblaw.h"
diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c
index db12aef..4c3693e 100644
--- a/arch/powerpc/cpu/mpc85xx/fdt.c
+++ b/arch/powerpc/cpu/mpc85xx/fdt.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <env.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
diff --git a/arch/powerpc/cpu/mpc85xx/speed.c b/arch/powerpc/cpu/mpc85xx/speed.c
index 0c5252e..773ae08 100644
--- a/arch/powerpc/cpu/mpc85xx/speed.c
+++ b/arch/powerpc/cpu/mpc85xx/speed.c
@@ -574,8 +574,7 @@
#endif
}
-
-int get_clocks (void)
+int get_clocks(void)
{
sys_info_t sys_info;
#ifdef CONFIG_ARCH_MPC8544
@@ -653,7 +652,7 @@
* get_bus_freq
* return system bus freq in Hz
*********************************************/
-ulong get_bus_freq (ulong dummy)
+ulong get_bus_freq(ulong dummy)
{
return gd->bus_clk;
}
diff --git a/arch/powerpc/cpu/mpc86xx/speed.c b/arch/powerpc/cpu/mpc86xx/speed.c
index 434c4f3..5001445 100644
--- a/arch/powerpc/cpu/mpc86xx/speed.c
+++ b/arch/powerpc/cpu/mpc86xx/speed.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <mpc86xx.h>
#include <asm/processor.h>
#include <asm/io.h>
diff --git a/arch/powerpc/cpu/mpc8xx/speed.c b/arch/powerpc/cpu/mpc8xx/speed.c
index 5a8fc1f..77d4f8e 100644
--- a/arch/powerpc/cpu/mpc8xx/speed.c
+++ b/arch/powerpc/cpu/mpc8xx/speed.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <mpc8xx.h>
#include <asm/processor.h>
#include <asm/io.h>
diff --git a/board/Arcturus/ucp1020/spl.c b/board/Arcturus/ucp1020/spl.c
index ca02e9e..6a17aeb 100644
--- a/board/Arcturus/ucp1020/spl.c
+++ b/board/Arcturus/ucp1020/spl.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <console.h>
#include <env.h>
#include <env_internal.h>
diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c
index 66186ec..a406d00 100644
--- a/board/compulab/cm_fx6/spl.c
+++ b/board/compulab/cm_fx6/spl.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <spl.h>
#include <asm/io.h>
#include <asm/gpio.h>
diff --git a/board/freescale/b4860qds/spl.c b/board/freescale/b4860qds/spl.c
index a16db9d..fe5ce35 100644
--- a/board/freescale/b4860qds/spl.c
+++ b/board/freescale/b4860qds/spl.c
@@ -3,6 +3,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <console.h>
#include <env.h>
#include <env_internal.h>
diff --git a/board/freescale/c29xpcie/spl.c b/board/freescale/c29xpcie/spl.c
index 9abbfb5..421c2d4 100644
--- a/board/freescale/c29xpcie/spl.c
+++ b/board/freescale/c29xpcie/spl.c
@@ -3,6 +3,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <console.h>
#include <env_internal.h>
#include <init.h>
diff --git a/board/freescale/ls1021aiot/ls1021aiot.c b/board/freescale/ls1021aiot/ls1021aiot.c
index 8de13c8..b4201e7 100644
--- a/board/freescale/ls1021aiot/ls1021aiot.c
+++ b/board/freescale/ls1021aiot/ls1021aiot.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <fdt_support.h>
#include <init.h>
#include <asm/arch/immap_ls102xa.h>
diff --git a/board/freescale/ls1021aqds/ls1021aqds.c b/board/freescale/ls1021aqds/ls1021aqds.c
index 377f4b7..b7f8f1d 100644
--- a/board/freescale/ls1021aqds/ls1021aqds.c
+++ b/board/freescale/ls1021aqds/ls1021aqds.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <fdt_support.h>
#include <i2c.h>
#include <init.h>
diff --git a/board/freescale/ls1021atsn/ls1021atsn.c b/board/freescale/ls1021atsn/ls1021atsn.c
index 532ca89..3876910 100644
--- a/board/freescale/ls1021atsn/ls1021atsn.c
+++ b/board/freescale/ls1021atsn/ls1021atsn.c
@@ -2,6 +2,7 @@
/* Copyright 2016-2019 NXP Semiconductors
*/
#include <common.h>
+#include <clock_legacy.h>
#include <fdt_support.h>
#include <init.h>
#include <asm/arch-ls102xa/ls102xa_soc.h>
diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c
index 3f09c51..497dce5 100644
--- a/board/freescale/ls1021atwr/ls1021atwr.c
+++ b/board/freescale/ls1021atwr/ls1021atwr.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <fdt_support.h>
#include <i2c.h>
#include <init.h>
diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c
index e5b7fec..7536153 100644
--- a/board/freescale/lx2160a/lx2160a.c
+++ b/board/freescale/lx2160a/lx2160a.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <dm.h>
#include <dm/platform_data/serial_pl01x.h>
#include <i2c.h>
diff --git a/board/freescale/mpc8313erdb/mpc8313erdb.c b/board/freescale/mpc8313erdb/mpc8313erdb.c
index 1445d29..e5cc824 100644
--- a/board/freescale/mpc8313erdb/mpc8313erdb.c
+++ b/board/freescale/mpc8313erdb/mpc8313erdb.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <fdt_support.h>
#include <init.h>
#if defined(CONFIG_OF_LIBFDT)
diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
index b4776c5..42b8cab 100644
--- a/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
+++ b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
@@ -8,6 +8,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <command.h>
#include <asm/io.h>
#include <fsl_diu_fb.h>
diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c
index 240194a..159d14b 100644
--- a/board/freescale/p1010rdb/spl.c
+++ b/board/freescale/p1010rdb/spl.c
@@ -3,6 +3,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <console.h>
#include <env.h>
#include <env_internal.h>
diff --git a/board/freescale/p1022ds/diu.c b/board/freescale/p1022ds/diu.c
index c6514cf..7f72510 100644
--- a/board/freescale/p1022ds/diu.c
+++ b/board/freescale/p1022ds/diu.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <command.h>
#include <linux/ctype.h>
#include <asm/io.h>
diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c
index 81c5bf0..39e1bee 100644
--- a/board/freescale/p1022ds/spl.c
+++ b/board/freescale/p1022ds/spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <console.h>
#include <env.h>
#include <env_internal.h>
diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c
index 4ac4756..6ed0a81 100644
--- a/board/freescale/p1_p2_rdb_pc/spl.c
+++ b/board/freescale/p1_p2_rdb_pc/spl.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <console.h>
#include <env.h>
#include <env_internal.h>
diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c
index 381d40d..b9c7146 100644
--- a/board/freescale/qemu-ppce500/qemu-ppce500.c
+++ b/board/freescale/qemu-ppce500/qemu-ppce500.c
@@ -323,7 +323,7 @@
sys_info->freq_processor[0] = freq;
}
-int get_clocks (void)
+int get_clocks(void)
{
sys_info_t sys_info;
@@ -350,7 +350,7 @@
* get_bus_freq
* return system bus freq in Hz
*********************************************/
-ulong get_bus_freq (ulong dummy)
+ulong get_bus_freq(ulong dummy)
{
sys_info_t sys_info;
get_sys_info(&sys_info);
diff --git a/board/freescale/t102xqds/spl.c b/board/freescale/t102xqds/spl.c
index d1dc9f8..9f4a43e 100644
--- a/board/freescale/t102xqds/spl.c
+++ b/board/freescale/t102xqds/spl.c
@@ -3,6 +3,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <console.h>
#include <env_internal.h>
#include <init.h>
diff --git a/board/freescale/t102xrdb/spl.c b/board/freescale/t102xrdb/spl.c
index 0936f28..aed0721 100644
--- a/board/freescale/t102xrdb/spl.c
+++ b/board/freescale/t102xrdb/spl.c
@@ -3,6 +3,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <console.h>
#include <env_internal.h>
#include <init.h>
diff --git a/board/freescale/t1040qds/diu.c b/board/freescale/t1040qds/diu.c
index 8049667..ab9e922 100644
--- a/board/freescale/t1040qds/diu.c
+++ b/board/freescale/t1040qds/diu.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <command.h>
#include <linux/ctype.h>
#include <asm/io.h>
diff --git a/board/freescale/t104xrdb/diu.c b/board/freescale/t104xrdb/diu.c
index aa56b8e..25c8597 100644
--- a/board/freescale/t104xrdb/diu.c
+++ b/board/freescale/t104xrdb/diu.c
@@ -4,6 +4,7 @@
* Author: Priyanka Jain <Priyanka.Jain@freescale.com>
*/
+#include <clock_legacy.h>
#include <asm/io.h>
#include <common.h>
#include <command.h>
diff --git a/board/freescale/t104xrdb/spl.c b/board/freescale/t104xrdb/spl.c
index a1c8a47..2306d03 100644
--- a/board/freescale/t104xrdb/spl.c
+++ b/board/freescale/t104xrdb/spl.c
@@ -3,6 +3,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <console.h>
#include <env_internal.h>
#include <init.h>
diff --git a/board/freescale/t208xqds/spl.c b/board/freescale/t208xqds/spl.c
index fa843ef..40eb5d3 100644
--- a/board/freescale/t208xqds/spl.c
+++ b/board/freescale/t208xqds/spl.c
@@ -3,6 +3,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <console.h>
#include <env_internal.h>
#include <init.h>
diff --git a/board/freescale/t208xrdb/spl.c b/board/freescale/t208xrdb/spl.c
index f4d68b6..27e87da 100644
--- a/board/freescale/t208xrdb/spl.c
+++ b/board/freescale/t208xrdb/spl.c
@@ -3,6 +3,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <console.h>
#include <env_internal.h>
#include <init.h>
diff --git a/board/freescale/t4qds/spl.c b/board/freescale/t4qds/spl.c
index 4cf7c09..d72d207 100644
--- a/board/freescale/t4qds/spl.c
+++ b/board/freescale/t4qds/spl.c
@@ -3,6 +3,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <console.h>
#include <env_internal.h>
#include <init.h>
diff --git a/board/freescale/t4rdb/spl.c b/board/freescale/t4rdb/spl.c
index 28b78f3..5d018c3 100644
--- a/board/freescale/t4rdb/spl.c
+++ b/board/freescale/t4rdb/spl.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <console.h>
#include <env_internal.h>
#include <init.h>
diff --git a/board/gdsys/p1022/diu.c b/board/gdsys/p1022/diu.c
index dfccbed..7e1e6ce 100644
--- a/board/gdsys/p1022/diu.c
+++ b/board/gdsys/p1022/diu.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <command.h>
#include <linux/ctype.h>
#include <asm/io.h>
diff --git a/board/kosagi/novena/novena_spl.c b/board/kosagi/novena/novena_spl.c
index 7521cac..bc52b91 100644
--- a/board/kosagi/novena/novena_spl.c
+++ b/board/kosagi/novena/novena_spl.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <init.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c
index f1dec6c..b0ddee7 100644
--- a/board/socrates/socrates.c
+++ b/board/socrates/socrates.c
@@ -11,6 +11,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <env.h>
#include <pci.h>
#include <asm/processor.h>
diff --git a/common/board_f.c b/common/board_f.c
index d66afb3..3c6877d 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <bloblist.h>
+#include <clock_legacy.h>
#include <console.h>
#include <cpu.h>
#include <cpu_func.h>
diff --git a/drivers/clk/mpc83xx_clk.c b/drivers/clk/mpc83xx_clk.c
index 69c6207..4183db2 100644
--- a/drivers/clk/mpc83xx_clk.c
+++ b/drivers/clk/mpc83xx_clk.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <clk-uclass.h>
+#include <clock_legacy.h>
#include <dm.h>
#include <vsprintf.h>
#include <dm/lists.h>
diff --git a/drivers/net/ag7xxx.c b/drivers/net/ag7xxx.c
index 804d5c2..e3a7222 100644
--- a/drivers/net/ag7xxx.c
+++ b/drivers/net/ag7xxx.c
@@ -7,6 +7,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/serial/lpc32xx_hsuart.c b/drivers/serial/lpc32xx_hsuart.c
index 8b0fd25..7d31c6d 100644
--- a/drivers/serial/lpc32xx_hsuart.c
+++ b/drivers/serial/lpc32xx_hsuart.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <dm.h>
#include <serial.h>
#include <dm/platform_data/lpc32xx_hsuart.h>
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 754b6e9..a92d2b1 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -4,6 +4,7 @@
* modified to use CONFIG_SYS_ISA_MEM and new defines
*/
+#include <clock_legacy.h>
#include <common.h>
#include <clk.h>
#include <dm.h>
diff --git a/drivers/serial/serial_ar933x.c b/drivers/serial/serial_ar933x.c
index 5249c55..897ea5d 100644
--- a/drivers/serial/serial_ar933x.c
+++ b/drivers/serial/serial_ar933x.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <dm.h>
#include <div64.h>
#include <errno.h>
diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index a1069f9..ef394b7 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <ns16550.h>
#include <serial.h>
#include <linux/compiler.h>
diff --git a/drivers/spi/ath79_spi.c b/drivers/spi/ath79_spi.c
index 0b8ebaa..f64a28c 100644
--- a/drivers/spi/ath79_spi.c
+++ b/drivers/spi/ath79_spi.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <clock_legacy.h>
#include <spi.h>
#include <dm.h>
#include <div64.h>
diff --git a/include/clock_legacy.h b/include/clock_legacy.h
new file mode 100644
index 0000000..b0a8333
--- /dev/null
+++ b/include/clock_legacy.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * (C) Copyright 2000-2009
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ */
+
+#ifndef __CLOCK_LEGACY_H
+#define __CLOCK_LEGACY_H
+
+int get_clocks(void);
+unsigned long get_bus_freq(unsigned long dummy);
+int get_serial_clock(void);
+
+#endif
diff --git a/include/common.h b/include/common.h
index 1f87070..cc3d212 100644
--- a/include/common.h
+++ b/include/common.h
@@ -78,11 +78,6 @@
void reset_misc (void);
void reset_cpu (ulong addr);
-/* $(CPU)/speed.c */
-int get_clocks (void);
-ulong get_bus_freq (ulong);
-int get_serial_clock(void);
-
/* lib/uuid.c */
#include <uuid.h>