mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 14:41:31 +00:00
sparc: leon3: Clear all unused GPTIMER registers.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
This commit is contained in:
parent
574be25ea1
commit
cb31eaa4b3
1 changed files with 9 additions and 1 deletions
|
@ -90,7 +90,7 @@ int arch_cpu_init(void)
|
||||||
int cpu_init_r(void)
|
int cpu_init_r(void)
|
||||||
{
|
{
|
||||||
ambapp_apbdev apbdev;
|
ambapp_apbdev apbdev;
|
||||||
int index, cpu;
|
int index, cpu, ntimers, i;
|
||||||
ambapp_dev_gptimer *timer = NULL;
|
ambapp_dev_gptimer *timer = NULL;
|
||||||
unsigned int bus_freq;
|
unsigned int bus_freq;
|
||||||
|
|
||||||
|
@ -135,6 +135,14 @@ int cpu_init_r(void)
|
||||||
timer->scalar = timer->scalar_reload =
|
timer->scalar = timer->scalar_reload =
|
||||||
(((bus_freq / 1000) + 500) / 1000) - 1;
|
(((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++;
|
index++;
|
||||||
}
|
}
|
||||||
if (!gptimer) {
|
if (!gptimer) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue