diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-04-17 06:31:30 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-04-20 09:49:35 +0200 |
commit | 6d21a3f230baefd0134ac7c09fb02b303386e243 (patch) | |
tree | 9a801df005b9afb1b87272a67084396b926165ba /c/src/lib | |
parent | bsps: Move bspstart.c to bsps (diff) | |
download | rtems-6d21a3f230baefd0134ac7c09fb02b303386e243.tar.bz2 |
drvmgr: Remove bsp_driver_level_hook()
Use RTEMS_SYSINIT_ITEM() instead.
Update #2408.
Diffstat (limited to 'c/src/lib')
-rw-r--r-- | c/src/lib/libbsp/shared/bspdriverlevelhook.c | 16 | ||||
-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 |
3 files changed, 10 insertions, 46 deletions
diff --git a/c/src/lib/libbsp/shared/bspdriverlevelhook.c b/c/src/lib/libbsp/shared/bspdriverlevelhook.c deleted file mode 100644 index e506ea73be..0000000000 --- a/c/src/lib/libbsp/shared/bspdriverlevelhook.c +++ /dev/null @@ -1,16 +0,0 @@ -/* - * This is a dummy bsp_driver_level_hook routine. - * - * COPYRIGHT (c) 2015. - * Cobham Gaisler. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#include <drvmgr/drvmgr.h> - -void bsp_driver_level_hook( int level ) -{ -} 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 |