common: Move get_tbclk() to time.h
authorSimon Glass <sjg@chromium.org>
Sat, 28 Dec 2019 17:44:59 +0000 (10:44 -0700)
committerJagan Teki <jagan@amarulasolutions.com>
Fri, 24 Jan 2020 17:36:49 +0000 (23:06 +0530)
This function related to timer and most of the timer functions are in
time.h, so move this function there.

Signed-off-by: Simon Glass <sjg@chromium.org>
27 files changed:
arch/arm/cpu/arm920t/imx/timer.c
arch/arm/cpu/arm926ejs/armada100/timer.c
arch/arm/cpu/sa1100/timer.c
arch/arm/mach-at91/arm926ejs/timer.c
arch/arm/mach-at91/armv7/timer.c
arch/arm/mach-orion5x/timer.c
arch/arm/mach-versal/clk.c
arch/arm/mach-zynq/timer.c
arch/arm/mach-zynqmp/clk.c
arch/arm/mach-zynqmp/cpu.c
arch/mips/cpu/time.c
arch/powerpc/cpu/mpc83xx/cpu.c
arch/powerpc/cpu/mpc83xx/spd_sdram.c
arch/powerpc/cpu/mpc83xx/spl_minimal.c
arch/powerpc/cpu/mpc85xx/cpu.c
arch/powerpc/cpu/mpc85xx/fdt.c
arch/powerpc/cpu/mpc85xx/interrupts.c
arch/powerpc/cpu/mpc86xx/cpu.c
arch/powerpc/cpu/mpc86xx/interrupts.c
arch/powerpc/cpu/mpc8xx/cpu.c
arch/powerpc/cpu/mpc8xx/fdt.c
arch/powerpc/cpu/mpc8xx/interrupts.c
board/armltd/integrator/timer.c
board/freescale/qemu-ppce500/qemu-ppce500.c
drivers/clk/clk_pic32.c
include/common.h
include/time.h

index 17081ddb6d8d5f7e7d40860b78670662e3239e33..403cd8ae57568569e2f8e80531553d40b6dfbf90 100644 (file)
@@ -71,7 +71,7 @@ unsigned long long get_ticks(void)
  * This function is derived from PowerPC code (timebase clock frequency).
  * On ARM it returns the number of timer ticks per second.
  */
-ulong get_tbclk (void)
+ulong get_tbclk(void)
 {
        return CONFIG_SYS_HZ;
 }
index 6c6948a8ef4cee45b12a58ee0452ed765df19601..a11a4f3a5b007fc9b057bad8e8e0fc3710eefcba 100644 (file)
@@ -188,7 +188,7 @@ unsigned long long get_ticks(void)
  * This function is derived from PowerPC code (timebase clock frequency).
  * On ARM it returns the number of timer ticks per second.
  */
-ulong get_tbclk (void)
+ulong get_tbclk(void)
 {
        return (ulong)CONFIG_SYS_HZ;
 }
index c6b1b2c177512b68b2ec9e2e1f3c951284712bc0..8e20c96bcda1dfb7b4850534f5be0caf4b1cea66 100644 (file)
@@ -59,7 +59,7 @@ unsigned long long get_ticks(void)
  * This function is derived from PowerPC code (timebase clock frequency).
  * On ARM it returns the number of timer ticks per second.
  */
-ulong get_tbclk (void)
+ulong get_tbclk(void)
 {
        return CONFIG_SYS_HZ;
 }
index f81e8455937cd18b271f09296b41c8fe52267bd4..31ad0bf7026f99354a203c4bad821d21ed3b34fb 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <time.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_pit.h>
index 9f08806fb127003236d9215983786f813d7b7b54..15c036cc27edf0787d5de6cc565e2c814dbd84d1 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <time.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_pit.h>
index 9da978382206bcb0087e3f3caaaa54b489f0b1d9..077eb63e74e974313db97fa6525f0a4a330d0ff3 100644 (file)
@@ -165,7 +165,7 @@ unsigned long long get_ticks(void)
  * This function is derived from PowerPC code (timebase clock frequency).
  * On ARM it returns the number of timer ticks per second.
  */
-ulong get_tbclk (void)
+ulong get_tbclk(void)
 {
        return (ulong)CONFIG_SYS_HZ;
 }
index b82cea4ccb6d643f5558fad1647bffca4f5dbb77..9184714e4756d0705f3477676d7a7a00b675d3d9 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <time.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 8658abb457532732869fe7139975551962cdab12..211ea15884cee0201b9cd14f61ae482ea699b2bf 100644 (file)
@@ -31,6 +31,7 @@
 #include <common.h>
 #include <div64.h>
 #include <dm.h>
+#include <time.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/clk.h>
index 0593b6310fd5b1ea2e37a657e08d5f57f5d90fe5..db2b4a8be2e3734a736c5481c420cf4a2341d5bb 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <time.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
index b90d08bbdd4eacdb72c1a2f1040da6b0fd87f2f9..442427bc1106be57cee58b46c8f476fc58744de0 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <time.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/armv8/mmu.h>
index af324f77cefd22e6a2763309ce2595eb647f7d9c..a1508e3b8867d3cc9119386166779aa5ee662755 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <time.h>
 #include <asm/mipsregs.h>
 
 unsigned long notrace timer_read_counter(void)
index c3e25978a807b3d4fa54cd2f3be10713dc6a54d7..f4e25f1f59c39472d0bd853776515617748f501f 100644 (file)
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <irq_func.h>
+#include <time.h>
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <command.h>
index a14a438b02dbff743fa57fdff943c8522edfcb58..22506a5be5048ecb51ad47d53ec779d06dcde0bf 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <time.h>
 #include <vsprintf.h>
 #include <asm/processor.h>
 #include <asm/io.h>
index 75b03f387904c85cd765711297ad8a0754e4040d..34c81872591f20915d508cc0cbcebb7dd119101d 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <mpc83xx.h>
+#include <time.h>
 
 #include "lblaw/lblaw.h"
 #include "elbc/elbc.h"
index 18556629c3d6cf925ecbe6ff62324e25b217eec8..9f9eed165bc184d45204cd9460dbead9bdc9c690 100644 (file)
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <irq_func.h>
+#include <time.h>
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <command.h>
@@ -332,7 +333,7 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #ifndef CONFIG_SYS_FSL_TBCLK_DIV
 #define CONFIG_SYS_FSL_TBCLK_DIV 8
 #endif
-__weak unsigned long get_tbclk (void)
+__weak unsigned long get_tbclk(void)
 {
        unsigned long tbclk_div = CONFIG_SYS_FSL_TBCLK_DIV;
 
index 4c3693e8403bc1195922f08e167c32283b9918df..65f909fd1e559b37f795b28c6f6361664d0e8220 100644 (file)
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <clock_legacy.h>
 #include <env.h>
+#include <time.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 #include <asm/processor.h>
index e767573193ff4e1b7f03eebe9177772ab1ec490d..6f539d26776860383d7e1450a8e67edca0866d3b 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <irq_func.h>
+#include <time.h>
 #include <watchdog.h>
 #include <command.h>
 #include <asm/processor.h>
index bb14444a2e7efa0522c3917bd5c32d5b77ab66f1..97b93f02131289c323e8120aeb6231b458de1469 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <time.h>
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <command.h>
index 0f930fcd9e147a8d4e72af3e393c737de845e8dd..eb8e73e41c6737d3adafcad2d3cf66304d0cd699 100644 (file)
@@ -18,6 +18,7 @@
 #include <irq_func.h>
 #include <mpc86xx.h>
 #include <command.h>
+#include <time.h>
 #include <asm/processor.h>
 #ifdef CONFIG_POST
 #include <post.h>
index 0604433e7265dc7f7801797126079975ae4ddc82..4a1698d3bca326c0d7473edaa61b3371ece1d63c 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <time.h>
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <command.h>
index 55c6588249c8de41ad2358f903e593f62a1931ab..4719de4d72c6e1cf88b230dfdf13a775bc6b2eb0 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <time.h>
 #include <linux/libfdt.h>
 #include <fdt_support.h>
 
index 6ee6088fa8ad77439cb0794ebb50364df5505f9f..3efe8956ec57883823eb316925e59b685e309088 100644 (file)
@@ -8,6 +8,7 @@
 #include <irq_func.h>
 #include <mpc8xx.h>
 #include <mpc8xx_irq.h>
+#include <time.h>
 #include <asm/cpm_8xx.h>
 #include <asm/processor.h>
 #include <asm/io.h>
index e65ae997fd648816459f735f24ee1cb4622dcb48..d701669be0ccbd639ffcc3f9cf2551f6bcd632a4 100644 (file)
@@ -153,7 +153,7 @@ unsigned long long get_ticks(void)
  * Return the timebase clock frequency
  * i.e. how often the timer decrements
  */
-ulong get_tbclk (void)
+ulong get_tbclk(void)
 {
        unsigned long long tmp = CONFIG_SYS_HZ_CLOCK;
 
index b9c7146466a0572c11666e7c0cb96b12afb7d711..e804cfe986be419d963ff279ddf42ea75d5d1143 100644 (file)
@@ -9,6 +9,7 @@
 #include <env.h>
 #include <init.h>
 #include <pci.h>
+#include <time.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/fsl_pci.h>
@@ -337,7 +338,7 @@ int get_clocks(void)
        return 0;
 }
 
-unsigned long get_tbclk (void)
+unsigned long get_tbclk(void)
 {
        void *fdt = get_fdt_virt();
        int cpus_node = fdt_path_offset(fdt, "/cpus");
index b3ac0d5a92aad1d63f402789711890cb7231f161..79469c454fe3afe1383a55b6f29f95c772c800da 100644 (file)
@@ -8,6 +8,7 @@
 #include <clk-uclass.h>
 #include <dm.h>
 #include <div64.h>
+#include <time.h>
 #include <wait_bit.h>
 #include <dm/lists.h>
 #include <asm/io.h>
index cc3d212a3d08087be1a651a8571d9c888c495a68..1d85e5a68c904abb4de1dec7e8414cb712b1fbd7 100644 (file)
@@ -74,7 +74,6 @@ phys_size_t get_effective_memsize(void);
 int testdram(void);
 #endif /* CONFIG_SYS_DRAM_TEST */
 
-ulong  get_tbclk     (void);
 void   reset_misc    (void);
 void   reset_cpu     (ulong addr);
 
index 71446c317148a8f521d88d5234c993acf5e4aec6..e99f9c8012701e7f0b62a37c0c71c12d2f4b8f87 100644 (file)
@@ -6,6 +6,8 @@
 #include <linux/typecheck.h>
 #include <linux/types.h>
 
+ulong get_tbclk(void);
+
 unsigned long get_timer(unsigned long base);
 
 /*