common: Move clock functions into a new file
authorSimon Glass <sjg@chromium.org>
Sat, 28 Dec 2019 17:44:58 +0000 (10:44 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 17 Jan 2020 18:27:29 +0000 (13:27 -0500)
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>
71 files changed:
arch/arm/cpu/arm1136/mx35/generic.c
arch/arm/cpu/arm926ejs/lpc32xx/clk.c
arch/arm/cpu/arm926ejs/mx25/generic.c
arch/arm/cpu/armv7/ls102xa/clock.c
arch/arm/cpu/armv7/ls102xa/fdt.c
arch/arm/cpu/armv7/vf610/generic.c
arch/arm/cpu/armv8/fsl-layerscape/fdt.c
arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c
arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c
arch/arm/cpu/armv8/fsl-layerscape/soc.c
arch/arm/cpu/armv8/fsl-layerscape/spl.c
arch/arm/cpu/armv8/s32v234/generic.c
arch/arm/mach-imx/mx7/clock.c
arch/arm/mach-imx/mx7ulp/clock.c
arch/arm/mach-imx/speed.c
arch/m68k/cpu/mcf5227x/speed.c
arch/m68k/cpu/mcf523x/speed.c
arch/m68k/cpu/mcf52x2/speed.c
arch/m68k/cpu/mcf530x/speed.c
arch/m68k/cpu/mcf532x/speed.c
arch/m68k/cpu/mcf5445x/speed.c
arch/m68k/cpu/mcf547x_8x/speed.c
arch/mips/mach-ath79/ar933x/clk.c
arch/mips/mach-ath79/ar934x/clk.c
arch/mips/mach-ath79/qca953x/clk.c
arch/mips/mach-ath79/qca956x/clk.c
arch/powerpc/cpu/mpc83xx/fdt.c
arch/powerpc/cpu/mpc83xx/speed.c
arch/powerpc/cpu/mpc83xx/spl_minimal.c
arch/powerpc/cpu/mpc85xx/fdt.c
arch/powerpc/cpu/mpc85xx/speed.c
arch/powerpc/cpu/mpc86xx/speed.c
arch/powerpc/cpu/mpc8xx/speed.c
board/Arcturus/ucp1020/spl.c
board/compulab/cm_fx6/spl.c
board/freescale/b4860qds/spl.c
board/freescale/c29xpcie/spl.c
board/freescale/ls1021aiot/ls1021aiot.c
board/freescale/ls1021aqds/ls1021aqds.c
board/freescale/ls1021atsn/ls1021atsn.c
board/freescale/ls1021atwr/ls1021atwr.c
board/freescale/lx2160a/lx2160a.c
board/freescale/mpc8313erdb/mpc8313erdb.c
board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
board/freescale/p1010rdb/spl.c
board/freescale/p1022ds/diu.c
board/freescale/p1022ds/spl.c
board/freescale/p1_p2_rdb_pc/spl.c
board/freescale/qemu-ppce500/qemu-ppce500.c
board/freescale/t102xqds/spl.c
board/freescale/t102xrdb/spl.c
board/freescale/t1040qds/diu.c
board/freescale/t104xrdb/diu.c
board/freescale/t104xrdb/spl.c
board/freescale/t208xqds/spl.c
board/freescale/t208xrdb/spl.c
board/freescale/t4qds/spl.c
board/freescale/t4rdb/spl.c
board/gdsys/p1022/diu.c
board/kosagi/novena/novena_spl.c
board/socrates/socrates.c
common/board_f.c
drivers/clk/mpc83xx_clk.c
drivers/net/ag7xxx.c
drivers/serial/lpc32xx_hsuart.c
drivers/serial/ns16550.c
drivers/serial/serial_ar933x.c
drivers/serial/serial_ns16550.c
drivers/spi/ath79_spi.c
include/clock_legacy.h [new file with mode: 0644]
include/common.h

index a651b8c..45bf49b 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <div64.h>
 #include <asm/io.h>
 #include <linux/errno.h>
index 5eb630d..cb2344d 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <div64.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/clk.h>
index eeb61d0..09bda0e 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <div64.h>
 #include <netdev.h>
 #include <vsprintf.h>
index 7a1053c..f3bdb14 100644 (file)
@@ -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>
index 1aadfff..16ab867 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <asm/io.h>
index 806c6ad..6698b82 100644 (file)
@@ -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>
index 1e7e46e..87c3e05 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <efi_loader.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
index fec2318..c566890 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <cpu_func.h>
 #include <linux/compiler.h>
 #include <asm/io.h>
index bd8b9cb..7f8178f 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <cpu_func.h>
 #include <linux/compiler.h>
 #include <fsl_ifc.h>
index 578f8d1..2175266 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <env.h>
 #include <fsl_immap.h>
 #include <fsl_ifc.h>
index ed3a605..8a6eeca 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <cpu_func.h>
 #include <env.h>
 #include <spl.h>
index 2c4ea36..50ca419 100644 (file)
@@ -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>
index 0e08cab..75be4f8 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <div64.h>
 #include <asm/io.h>
 #include <linux/errno.h>
index d3365dd..3c0bccc 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <div64.h>
 #include <asm/io.h>
 #include <errno.h>
index f9e486c..e78b1fd 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
 
index f4e53bc..207f453 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <asm/processor.h>
 
 #include <asm/immap.h>
index a0c1d53..2f65ac2 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <asm/processor.h>
 
 #include <asm/immap.h>
index 0f274ad..02ef5d8 100644 (file)
@@ -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;
index ae26047..cf53dfe 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <asm/processor.h>
 #include <asm/immap.h>
 
index 661abfa..0f54ea4 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <asm/processor.h>
 
 #include <asm/immap.h>
index e15e32e..eaa3b39 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <asm/processor.h>
 
 #include <asm/immap.h>
index 5ba6426..bc22560 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <asm/processor.h>
 
 #include <asm/immap.h>
index 7c15c21..3feb25c 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
index a5dace7..fc4625d 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
index 7447ade..d450ad8 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
index 33a44cf..d71c94e 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
index b487e31..5c68535 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <asm/processor.h>
index 93af7f4..e2fc0b1 100644 (file)
@@ -9,6 +9,7 @@
 #ifndef CONFIG_CLK_MPC83XX
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <mpc83xx.h>
 #include <command.h>
 #include <vsprintf.h>
index 133f7ab..75b03f3 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <mpc83xx.h>
 
 #include "lblaw/lblaw.h"
index db12aef..4c3693e 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <env.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
index 0c5252e..773ae08 100644 (file)
@@ -574,8 +574,7 @@ void get_sys_info(sys_info_t *sys_info)
 #endif
 }
 
-
-int get_clocks (void)
+int get_clocks(void)
 {
        sys_info_t sys_info;
 #ifdef CONFIG_ARCH_MPC8544
@@ -653,7 +652,7 @@ int get_clocks (void)
  * 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;
 }
index 434c4f3..5001445 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <mpc86xx.h>
 #include <asm/processor.h>
 #include <asm/io.h>
index 5a8fc1f..77d4f8e 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <mpc8xx.h>
 #include <asm/processor.h>
 #include <asm/io.h>
index ca02e9e..6a17aeb 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <console.h>
 #include <env.h>
 #include <env_internal.h>
index 66186ec..a406d00 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
index a16db9d..fe5ce35 100644 (file)
@@ -3,6 +3,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <console.h>
 #include <env.h>
 #include <env_internal.h>
index 9abbfb5..421c2d4 100644 (file)
@@ -3,6 +3,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <console.h>
 #include <env_internal.h>
 #include <init.h>
index 8de13c8..b4201e7 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <fdt_support.h>
 #include <init.h>
 #include <asm/arch/immap_ls102xa.h>
index 377f4b7..b7f8f1d 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
index 532ca89..3876910 100644 (file)
@@ -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>
index 3f09c51..497dce5 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <fdt_support.h>
 #include <i2c.h>
 #include <init.h>
index e5b7fec..7536153 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <dm.h>
 #include <dm/platform_data/serial_pl01x.h>
 #include <i2c.h>
index 1445d29..e5cc824 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <fdt_support.h>
 #include <init.h>
 #if defined(CONFIG_OF_LIBFDT)
index b4776c5..42b8cab 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <command.h>
 #include <asm/io.h>
 #include <fsl_diu_fb.h>
index 240194a..159d14b 100644 (file)
@@ -3,6 +3,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <console.h>
 #include <env.h>
 #include <env_internal.h>
index c6514cf..7f72510 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <command.h>
 #include <linux/ctype.h>
 #include <asm/io.h>
index 81c5bf0..39e1bee 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <console.h>
 #include <env.h>
 #include <env_internal.h>
index 4ac4756..6ed0a81 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <console.h>
 #include <env.h>
 #include <env_internal.h>
index 381d40d..b9c7146 100644 (file)
@@ -323,7 +323,7 @@ void get_sys_info(sys_info_t *sys_info)
        sys_info->freq_processor[0] = freq;
 }
 
-int get_clocks (void)
+int get_clocks(void)
 {
        sys_info_t sys_info;
 
@@ -350,7 +350,7 @@ unsigned long get_tbclk (void)
  * 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);
index d1dc9f8..9f4a43e 100644 (file)
@@ -3,6 +3,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <console.h>
 #include <env_internal.h>
 #include <init.h>
index 0936f28..aed0721 100644 (file)
@@ -3,6 +3,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <console.h>
 #include <env_internal.h>
 #include <init.h>
index 8049667..ab9e922 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <command.h>
 #include <linux/ctype.h>
 #include <asm/io.h>
index aa56b8e..25c8597 100644 (file)
@@ -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>
index a1c8a47..2306d03 100644 (file)
@@ -3,6 +3,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <console.h>
 #include <env_internal.h>
 #include <init.h>
index fa843ef..40eb5d3 100644 (file)
@@ -3,6 +3,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <console.h>
 #include <env_internal.h>
 #include <init.h>
index f4d68b6..27e87da 100644 (file)
@@ -3,6 +3,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <console.h>
 #include <env_internal.h>
 #include <init.h>
index 4cf7c09..d72d207 100644 (file)
@@ -3,6 +3,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <console.h>
 #include <env_internal.h>
 #include <init.h>
index 28b78f3..5d018c3 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <console.h>
 #include <env_internal.h>
 #include <init.h>
index dfccbed..7e1e6ce 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <command.h>
 #include <linux/ctype.h>
 #include <asm/io.h>
index 7521cac..bc52b91 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <init.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
index f1dec6c..b0ddee7 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <env.h>
 #include <pci.h>
 #include <asm/processor.h>
index d66afb3..3c6877d 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <bloblist.h>
+#include <clock_legacy.h>
 #include <console.h>
 #include <cpu.h>
 #include <cpu_func.h>
index 69c6207..4183db2 100644 (file)
@@ -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>
index 804d5c2..e3a7222 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
index 8b0fd25..7d31c6d 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <dm.h>
 #include <serial.h>
 #include <dm/platform_data/lpc32xx_hsuart.h>
index 754b6e9..a92d2b1 100644 (file)
@@ -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>
index 5249c55..897ea5d 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <dm.h>
 #include <div64.h>
 #include <errno.h>
index a1069f9..ef394b7 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <ns16550.h>
 #include <serial.h>
 #include <linux/compiler.h>
index 0b8ebaa..f64a28c 100644 (file)
@@ -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 (file)
index 0000000..b0a8333
--- /dev/null
@@ -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
index 1f87070..cc3d212 100644 (file)
@@ -78,11 +78,6 @@ ulong        get_tbclk     (void);
 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>