diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2015-02-19 09:20:13 +0100 |
---|---|---|
committer | Daniel Hellstrom <daniel@gaisler.com> | 2015-04-17 01:10:15 +0200 |
commit | 60b0fd511f1b9067ae7797a97d659f7bb73047b1 (patch) | |
tree | 133cc8a1fd9d5b98893546379bfba97edb6511e6 /c | |
parent | LEON3: GPTIMER timer watchdog driver (diff) | |
download | rtems-60b0fd511f1b9067ae7797a97d659f7bb73047b1.tar.bz2 |
leon3: clock driver rely on previous found timer
No point in scanning for the same GPTIMER twice. Rely on
amba.c AMBA PnP scanning.
Diffstat (limited to 'c')
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/clock/ckinit.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c index f382f1abc6..15050eb310 100644 --- a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c +++ b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c @@ -87,15 +87,8 @@ static void leon3_clock_profiling_interrupt_delay(void) #define Clock_driver_support_find_timer() \ do { \ - struct ambapp_dev *adev; \ - \ - /* Find first LEON3 GP Timer */ \ - adev = (void *)ambapp_for_each(&ambapp_plb, (OPTIONS_ALL|OPTIONS_APB_SLVS),\ - VENDOR_GAISLER, GAISLER_GPTIMER, ambapp_find_by_idx, NULL); \ - if (adev) { \ - /* Found APB GPTIMER Timer */ \ - LEON3_Timer_Regs = (volatile struct gptimer_regs *) \ - DEV_TO_APB(adev)->start; \ + /* Assume timer found during BSP initialization */ \ + if (LEON3_Timer_Regs) { \ clkirq = (LEON3_Timer_Regs->cfg & 0xf8) >> 3; \ \ Adjust_clkirq_for_node(); \ |