forked from Imagelibrary/rtems
bsp/leon3: Add LEON3_GPTIMER_BASE
This commit is contained in:
@@ -189,7 +189,11 @@ static inline uint32_t leon3_get_data_cache_config_register( void )
|
||||
/**
|
||||
* @brief This pointer provides the GPTIMER register block address.
|
||||
*/
|
||||
#if defined(LEON3_GPTIMER_BASE)
|
||||
#define LEON3_Timer_Regs ((gptimer *) LEON3_GPTIMER_BASE)
|
||||
#else
|
||||
extern gptimer *LEON3_Timer_Regs;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief This pointer provides the GPTIMER device information block.
|
||||
|
||||
@@ -119,8 +119,10 @@ RTEMS_SYSINIT_ITEM(
|
||||
irqamp *LEON3_IrqCtrl_Regs;
|
||||
struct ambapp_dev *LEON3_IrqCtrl_Adev;
|
||||
|
||||
#if !defined(LEON3_GPTIMER_BASE)
|
||||
gptimer *LEON3_Timer_Regs;
|
||||
struct ambapp_dev *LEON3_Timer_Adev;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* amba_initialize
|
||||
@@ -166,6 +168,7 @@ static void amba_initialize(void)
|
||||
LEON3_IrqCtrl_Regs += icsel;
|
||||
}
|
||||
|
||||
#if !defined(LEON3_GPTIMER_BASE)
|
||||
/* find GP Timer */
|
||||
adev = (void *)ambapp_for_each(plb, (OPTIONS_ALL|OPTIONS_APB_SLVS),
|
||||
VENDOR_GAISLER, GAISLER_GPTIMER,
|
||||
@@ -189,6 +192,7 @@ static void amba_initialize(void)
|
||||
if (leon3_timer_prescaler)
|
||||
grlib_store_32(&LEON3_Timer_Regs->sreload, leon3_timer_prescaler);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
RTEMS_SYSINIT_ITEM(
|
||||
|
||||
Reference in New Issue
Block a user