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(
|
||||
|
||||
@@ -34,6 +34,8 @@ links:
|
||||
uid: objsmp
|
||||
- role: build-dependency
|
||||
uid: optapbuartbase
|
||||
- role: build-dependency
|
||||
uid: optgptimerbase
|
||||
- role: build-dependency
|
||||
uid: optconirq
|
||||
- role: build-dependency
|
||||
|
||||
20
spec/build/bsps/sparc/leon3/optgptimerbase.yml
Normal file
20
spec/build/bsps/sparc/leon3/optgptimerbase.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
|
||||
copyrights:
|
||||
- Copyright (C) 2021 embedded brains GmbH & Co. KG
|
||||
actions:
|
||||
- get-integer: null
|
||||
- format-and-define: null
|
||||
build-type: option
|
||||
default:
|
||||
- enabled-by: sparc/gr712rc
|
||||
value: 0x80000300
|
||||
- enabled-by: sparc/gr740
|
||||
value: 0xff908000
|
||||
enabled-by: true
|
||||
format: '{:#010x}'
|
||||
links: []
|
||||
name: LEON3_GPTIMER_BASE
|
||||
description: |
|
||||
This option defines the base address of the GPTIMER register block used by
|
||||
the clock driver.
|
||||
type: build
|
||||
Reference in New Issue
Block a user