diff options
Diffstat (limited to 'c/src/lib/libbsp/sparc')
-rw-r--r-- | c/src/lib/libbsp/sparc/leon2/startup/bsppredriver.c | 13 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/startup/bsppredriver.c | 27 |
2 files changed, 10 insertions, 30 deletions
diff --git a/c/src/lib/libbsp/sparc/leon2/startup/bsppredriver.c b/c/src/lib/libbsp/sparc/leon2/startup/bsppredriver.c index 218ed80774..b11ad4cb59 100644 --- a/c/src/lib/libbsp/sparc/leon2/startup/bsppredriver.c +++ b/c/src/lib/libbsp/sparc/leon2/startup/bsppredriver.c @@ -65,18 +65,7 @@ struct drvmgr_bus_res leon2_amba_res __attribute__((weak)) = DRVMGR_RES_EMPTY }, }; - -/* - * bsp_driver_level_hook - * - * BSP driver level hook. Called just after drivers have reached initialization - * level 'level' (1,2,3,4). See exinit.c for meaning of the every level. - */ -void bsp_driver_level_hook( int level ) -{ -} - -#endif +#endif /* RTEMS_DRVMGR_STARTUP */ /* * bsp_predriver_hook diff --git a/c/src/lib/libbsp/sparc/leon3/startup/bsppredriver.c b/c/src/lib/libbsp/sparc/leon3/startup/bsppredriver.c index 84edb73091..ba35624d33 100644 --- a/c/src/lib/libbsp/sparc/leon3/startup/bsppredriver.c +++ b/c/src/lib/libbsp/sparc/leon3/startup/bsppredriver.c @@ -18,6 +18,8 @@ #include <drvmgr/drvmgr.h> +#include <rtems/sysinit.h> + static void leon3_interrupt_common_init( void ) { /* Initialize shared interrupt handling, must be done after IRQ @@ -43,23 +45,12 @@ void bsp_predriver_hook( void ) #ifdef RTEMS_DRVMGR_STARTUP /* - * bsp_driver_level_hook - * - * BSP driver level hook. Called just after drivers have reached initialization - * level 'level' (1,2,3,4). See exinit.c for meaning of the every level. - * - * Initializes the BSP Interrupt layer - * After Level 1 we can trust that interrupt controller and system - * clock timer drivers now have been initialized. + * Initialize shared interrupt handling, must be done after IRQ controller has + * been found and initialized. */ -void bsp_driver_level_hook( int level ) -{ - /* Initialize shared interrupt handling, must be done after IRQ - * controller has been found and initialized. - */ - if (level != 1) - return; - - leon3_interrupt_common_init(); -} +RTEMS_SYSINIT_ITEM( + leon3_interrupt_common_init, + RTEMS_SYSINIT_DRVMGR_LEVEL_1, + RTEMS_SYSINIT_ORDER_LAST +); #endif |