summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-03-28 10:27:24 -0600
committerTom Rini <trini@konsulko.com>2017-04-05 13:54:29 -0400
commit70e2aaf380ef873901684027ef1082ebd4608785 (patch)
tree90a6e2123d9c526cbd270e44912323809c3f759b
parent1793e78225f619e78b1c3ee9735948869ec7d6ec (diff)
board_f: powerpc: Use timer_init() instead of init_timebase()
There is no good reason to use a different name on PowerPC. Change it to timer_init() like the others. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <york.sun@nxp.com> Reviewed-by: Stefan Roese <sr@denx.de>
-rw-r--r--arch/powerpc/cpu/mpc5xx/cpu_init.c2
-rw-r--r--arch/powerpc/lib/time.c2
-rw-r--r--board/freescale/mpc8313erdb/mpc8313erdb.c2
-rw-r--r--board/freescale/mpc8315erdb/mpc8315erdb.c2
-rw-r--r--common/board_f.c4
-rw-r--r--include/common.h1
6 files changed, 5 insertions, 8 deletions
diff --git a/arch/powerpc/cpu/mpc5xx/cpu_init.c b/arch/powerpc/cpu/mpc5xx/cpu_init.c
index 0f62c13f86..5bae39f8c0 100644
--- a/arch/powerpc/cpu/mpc5xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc5xx/cpu_init.c
@@ -43,7 +43,7 @@ void cpu_init_f (volatile immap_t * immr)
immr->im_uimb.uimb_umcr = CONFIG_SYS_UMCR;
/* Time base and decrementer will be enables (TBE) */
- /* in init_timebase() in time.c called from board_init_f(). */
+ /* in timer_init() in time.c called from board_init_f(). */
/* Initialize the PIT. Unlock PISCRK */
immr->im_sitk.sitk_piscrk = KAPWR_KEY;
diff --git a/arch/powerpc/lib/time.c b/arch/powerpc/lib/time.c
index 62b6c72f4e..de5f0be66d 100644
--- a/arch/powerpc/lib/time.c
+++ b/arch/powerpc/lib/time.c
@@ -60,7 +60,7 @@ unsigned long ticks2usec(unsigned long ticks)
#endif
/* ------------------------------------------------------------------------- */
-int init_timebase (void)
+int timer_init(void)
{
unsigned long temp;
diff --git a/board/freescale/mpc8313erdb/mpc8313erdb.c b/board/freescale/mpc8313erdb/mpc8313erdb.c
index eac193e817..693dff651a 100644
--- a/board/freescale/mpc8313erdb/mpc8313erdb.c
+++ b/board/freescale/mpc8313erdb/mpc8313erdb.c
@@ -133,7 +133,7 @@ void board_init_f(ulong bootflag)
NS16550_init((NS16550_t)(CONFIG_SYS_IMMR + 0x4500),
CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);
puts("NAND boot... ");
- init_timebase();
+ timer_init();
initdram(0);
relocate_code(CONFIG_SYS_NAND_U_BOOT_RELOC_SP, (gd_t *)gd,
CONFIG_SYS_NAND_U_BOOT_RELOC);
diff --git a/board/freescale/mpc8315erdb/mpc8315erdb.c b/board/freescale/mpc8315erdb/mpc8315erdb.c
index 3cec09b586..1da6e2166d 100644
--- a/board/freescale/mpc8315erdb/mpc8315erdb.c
+++ b/board/freescale/mpc8315erdb/mpc8315erdb.c
@@ -221,7 +221,7 @@ void board_init_f(ulong bootflag)
NS16550_init((NS16550_t)(CONFIG_SYS_IMMR + 0x4500),
CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);
puts("NAND boot... ");
- init_timebase();
+ timer_init();
initdram(0);
relocate_code(CONFIG_SYS_NAND_U_BOOT_RELOC + 0x10000, (gd_t *)gd,
CONFIG_SYS_NAND_U_BOOT_RELOC);
diff --git a/common/board_f.c b/common/board_f.c
index a4b5df7835..eb32fca6b4 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -831,10 +831,8 @@ static const init_fnc_t init_sequence_f[] = {
#ifdef CONFIG_PPC
/* get CPU and bus clocks according to the environment variable */
get_clocks, /* get CPU and bus clocks (etc.) */
- /* TODO: can we rename this to timer_init()? */
- init_timebase,
#endif
-#if defined(CONFIG_ARM) || defined(CONFIG_MIPS) || \
+#if defined(CONFIG_ARM) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || \
defined(CONFIG_NDS32) || defined(CONFIG_SH)
timer_init, /* initialize timer */
#endif
diff --git a/include/common.h b/include/common.h
index 72f144d549..75e70ae8ea 100644
--- a/include/common.h
+++ b/include/common.h
@@ -780,7 +780,6 @@ void wait_ticks (unsigned long);
/* arch/$(ARCH)/lib/time.c */
ulong usec2ticks (unsigned long usec);
ulong ticks2usec (unsigned long ticks);
-int init_timebase (void);
/* lib/gunzip.c */
int gunzip(void *, int, unsigned char *, unsigned long *);