diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2010-09-22 17:42:29 +0200 |
---|---|---|
committer | Francois Retief <fgretief@spaceteq.co.za> | 2015-12-03 13:15:49 +0200 |
commit | cb31eaa4b3e870e4520dd0ce6f9ce326dc9cf50b (patch) | |
tree | 4abf46d88c9627abcbc48d6b04098bbf7ca03234 /arch/sparc | |
parent | 574be25ea1b88ff1b7d213584b04b754f187e25d (diff) | |
download | u-boot-imx-cb31eaa4b3e870e4520dd0ce6f9ce326dc9cf50b.zip u-boot-imx-cb31eaa4b3e870e4520dd0ce6f9ce326dc9cf50b.tar.gz u-boot-imx-cb31eaa4b3e870e4520dd0ce6f9ce326dc9cf50b.tar.bz2 |
sparc: leon3: Clear all unused GPTIMER registers.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/cpu/leon3/cpu_init.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/sparc/cpu/leon3/cpu_init.c b/arch/sparc/cpu/leon3/cpu_init.c index 20a6a25..0ce2f89 100644 --- a/arch/sparc/cpu/leon3/cpu_init.c +++ b/arch/sparc/cpu/leon3/cpu_init.c @@ -90,7 +90,7 @@ int arch_cpu_init(void) int cpu_init_r(void) { ambapp_apbdev apbdev; - int index, cpu; + int index, cpu, ntimers, i; ambapp_dev_gptimer *timer = NULL; unsigned int bus_freq; @@ -135,6 +135,14 @@ int cpu_init_r(void) timer->scalar = timer->scalar_reload = (((bus_freq / 1000) + 500) / 1000) - 1; + /* Clear All Timers */ + ntimers = timer->config & 0x7; + for (i = 0; i < ntimers; i++) { + timer->e[i].ctrl = GPTIMER_CTRL_IP; + timer->e[i].rld = 0; + timer->e[i].ctrl = GPTIMER_CTRL_LD; + } + index++; } if (!gptimer) { |