diff options
author | Wolfgang Denk <wd@denx.de> | 2012-02-26 22:17:40 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2012-02-26 22:17:40 +0100 |
commit | 54e96680cb96fb7a4b8f43fd949c62054004d3e5 (patch) | |
tree | 136d8161c0a68034b2f08e7c488533dabfb583b5 /arch/microblaze/cpu/timer.c | |
parent | cec487a435ac106d1a611feba1a36043142c839b (diff) | |
parent | 4eb29cf043afb36b414482c117413a8ff8f00410 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-microblaze
* 'master' of git://git.denx.de/u-boot-microblaze:
microblaze: Enable TFTP put command
microblaze: avoid interrupt race conditions
microblaze: fix build failure due to undefined reference to `get_ticks'
Diffstat (limited to 'arch/microblaze/cpu/timer.c')
-rw-r--r-- | arch/microblaze/cpu/timer.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/microblaze/cpu/timer.c b/arch/microblaze/cpu/timer.c index a167755bdd..1952804eaf 100644 --- a/arch/microblaze/cpu/timer.c +++ b/arch/microblaze/cpu/timer.c @@ -62,3 +62,21 @@ int timer_init (void) } #endif #endif + +/* + * This function is derived from PowerPC code (read timebase as long long). + * On Microblaze it just returns the timer value. + */ +unsigned long long get_ticks(void) +{ + return get_timer(0); +} + +/* + * This function is derived from PowerPC code (timebase clock frequency). + * On Microblaze it returns the number of timer ticks per second. + */ +ulong get_tbclk(void) +{ + return CONFIG_SYS_HZ; +} |