common: Move get_tbclk() to time.h

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>
This commit is contained in:
Simon Glass 2019-12-28 10:44:59 -07:00 committed by Tom Rini
parent d96c26040e
commit 049f8d6f4a
27 changed files with 29 additions and 8 deletions

View 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;
}

View 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;
}

View 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;
}

View 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>

View 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>

View 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;
}

View File

@ -5,6 +5,7 @@
*/
#include <common.h>
#include <time.h>
DECLARE_GLOBAL_DATA_PTR;

View 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>

View 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>

View 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>

View File

@ -5,6 +5,7 @@
*/
#include <common.h>
#include <time.h>
#include <asm/mipsregs.h>
unsigned long notrace timer_read_counter(void)

View 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>

View 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>

View 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"

View 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;

View 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>

View 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>

View File

@ -7,6 +7,7 @@
#include <common.h>
#include <cpu_func.h>
#include <time.h>
#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>

View 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>

View File

@ -18,6 +18,7 @@
#include <common.h>
#include <cpu_func.h>
#include <time.h>
#include <vsprintf.h>
#include <watchdog.h>
#include <command.h>

View File

@ -6,6 +6,7 @@
*/
#include <common.h>
#include <time.h>
#include <linux/libfdt.h>
#include <fdt_support.h>

View 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>

View 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;

View 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");

View 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>

View 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);

View File

@ -6,6 +6,8 @@
#include <linux/typecheck.h>
#include <linux/types.h>
ulong get_tbclk(void);
unsigned long get_timer(unsigned long base);
/*