leon3: clock driver rely on previous found timer

No point in scanning for the same GPTIMER twice. Rely on
amba.c AMBA PnP scanning.
This commit is contained in:
Daniel Hellstrom
2015-02-19 09:20:13 +01:00
parent 31e4e25dfe
commit 60b0fd511f

View File

@@ -87,15 +87,8 @@ static void leon3_clock_profiling_interrupt_delay(void)
#define Clock_driver_support_find_timer() \ #define Clock_driver_support_find_timer() \
do { \ do { \
struct ambapp_dev *adev; \ /* Assume timer found during BSP initialization */ \
\ if (LEON3_Timer_Regs) { \
/* 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; \
clkirq = (LEON3_Timer_Regs->cfg & 0xf8) >> 3; \ clkirq = (LEON3_Timer_Regs->cfg & 0xf8) >> 3; \
\ \
Adjust_clkirq_for_node(); \ Adjust_clkirq_for_node(); \