bsps: Avoid unused argument in clock interrupt

Pass the parameter of the clock interrupt handler to
Clock_driver_support_at_tick() and Clock_driver_timecounter_tick().  This makes
it possible to use the interrupt handler argument in clock drivers.

Use the interrupt handler provided by Clock_driver_support_install_isr() to
avoid local delarations of Clock_isr().

Update #4862.
This commit is contained in:
Sebastian Huber
2023-03-23 16:53:30 +01:00
parent d62f299b34
commit 1eed6f8bfc
42 changed files with 137 additions and 181 deletions

View File

@@ -51,12 +51,10 @@ uint32_t _CPU_Counter_frequency( void )
return ERC32_REAL_TIME_CLOCK_FREQUENCY;
}
static void erc32_clock_at_tick( void )
static void erc32_clock_at_tick( SPARC_Counter *counter )
{
SPARC_Counter *counter;
rtems_interrupt_level level;
counter = &_SPARC_Counter;
rtems_interrupt_local_disable(level);
ERC32_Clear_interrupt( ERC32_INTERRUPT_REAL_TIME_CLOCK );
@@ -110,7 +108,7 @@ RTEMS_SYSINIT_ITEM(
"Clock", \
RTEMS_INTERRUPT_SHARED, \
_new, \
NULL \
&_SPARC_Counter \
)
#define Clock_driver_support_set_interrupt_affinity( _online_processors ) \
@@ -118,7 +116,7 @@ RTEMS_SYSINIT_ITEM(
(void) _online_processors; \
} while (0)
#define Clock_driver_support_at_tick() erc32_clock_at_tick()
#define Clock_driver_support_at_tick(arg) erc32_clock_at_tick(arg)
#define Clock_driver_support_initialize_hardware() erc32_clock_init()