[PATCH 24/44] libdrvmgr: added default BSP init level hook

Daniel Hellstrom daniel at gaisler.com
Fri Mar 3 14:56:57 UTC 2017


---
 cpukit/libdrvmgr/drvmgr.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/cpukit/libdrvmgr/drvmgr.c b/cpukit/libdrvmgr/drvmgr.c
index 03af390..0771c35 100644
--- a/cpukit/libdrvmgr/drvmgr.c
+++ b/cpukit/libdrvmgr/drvmgr.c
@@ -66,6 +66,13 @@ static int do_dev_init(
 
 /* DRIVER MANAGER */
 
+void bsp_driver_level_hook(int level) __attribute__((weak));
+
+/* default hook does nothing, BSP may override. */
+void bsp_driver_level_hook(int level)
+{
+}
+
 void _DRV_Manager_init_level(int level)
 {
 	struct drvmgr *mgr = &drvmgr;
@@ -78,6 +85,8 @@ void _DRV_Manager_init_level(int level)
 
 	/* Initialize buses and devices into this new level */
 	drvmgr_init_update();
+
+	bsp_driver_level_hook(level);
 }
 
 /* Initialize Data structures of the driver manager and call driver
-- 
2.7.4




More information about the devel mailing list