mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
sparc: Update cpu_init.c to use generic timer infrastructure
Introduce the CONFIG_SYS_TIMER_* macros in include/asm/config.h to make use of the generic timer infrastructure in lib/time.c. Created a timer_init() function to initialize the timer hardware and update the #ifdef in board_init_f to allow this function to be called during the start-up sequence. Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
This commit is contained in:
parent
c837901bf1
commit
c97088c3cf
6 changed files with 106 additions and 75 deletions
|
@ -14,4 +14,8 @@
|
|||
#define CONFIG_LMB
|
||||
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
|
||||
|
||||
#define CONFIG_SYS_TIMER_RATE 1000000 /* 1MHz */
|
||||
#define CONFIG_SYS_TIMER_COUNTER gd->arch.timer
|
||||
#define CONFIG_SYS_TIMER_COUNTS_DOWN
|
||||
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
/* Architecture-specific global data */
|
||||
struct arch_global_data {
|
||||
void *timer;
|
||||
void *uart;
|
||||
unsigned int uart_freq;
|
||||
#ifdef CONFIG_LEON3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue