Changeset 6d21a3f2 in rtems


Ignore:
Timestamp:
Apr 17, 2018, 4:31:30 AM (15 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
5a06b187
Parents:
0b93d4f8
git-author:
Sebastian Huber <sebastian.huber@…> (04/17/18 04:31:30)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/20/18 07:49:35)
Message:

drvmgr: Remove bsp_driver_level_hook()

Use RTEMS_SYSINIT_ITEM() instead.

Update #2408.

Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/leon2/startup/bsppredriver.c

    r0b93d4f8 r6d21a3f2  
    6666  },
    6767};
    68 
    69 /*
    70  *  bsp_driver_level_hook
    71  *
    72  *  BSP driver level hook. Called just after drivers have reached initialization
    73  *  level 'level' (1,2,3,4). See exinit.c for meaning of the every level.
    74  */
    75 void bsp_driver_level_hook( int level )
    76 {
    77 }
    78 
    79 #endif
     68#endif /* RTEMS_DRVMGR_STARTUP */
    8069
    8170/*
  • c/src/lib/libbsp/sparc/leon3/startup/bsppredriver.c

    r0b93d4f8 r6d21a3f2  
    1818
    1919#include <drvmgr/drvmgr.h>
     20
     21#include <rtems/sysinit.h>
    2022
    2123static void leon3_interrupt_common_init( void )
     
    4446#ifdef RTEMS_DRVMGR_STARTUP
    4547/*
    46  *  bsp_driver_level_hook
    47  *
    48  *  BSP driver level hook. Called just after drivers have reached initialization
    49  *  level 'level' (1,2,3,4). See exinit.c for meaning of the every level.
    50  *
    51  *  Initializes the BSP Interrupt layer
    52  *  After Level 1 we can trust that interrupt controller and system
    53  *  clock timer drivers now have been initialized.
     48 * Initialize shared interrupt handling, must be done after IRQ controller has
     49 * been found and initialized.
    5450 */
    55 void bsp_driver_level_hook( int level )
    56 {
    57   /* Initialize shared interrupt handling, must be done after IRQ
    58    * controller has been found and initialized.
    59    */
    60   if (level != 1)
    61         return;
    62 
    63   leon3_interrupt_common_init();
    64 }
     51RTEMS_SYSINIT_ITEM(
     52  leon3_interrupt_common_init,
     53  RTEMS_SYSINIT_DRVMGR_LEVEL_1,
     54  RTEMS_SYSINIT_ORDER_LAST
     55);
    6556#endif
  • cpukit/include/drvmgr/drvmgr.h

    r0b93d4f8 r6d21a3f2  
    351351extern void _DRV_Manager_init_level(int level);
    352352
    353 /*! This function must be defined by the BSP when the driver manager is enabled
    354  * and initialized during BSP initialization. The function is called after a
    355  * init level is reached the first time by the driver manager.
    356  */
    357 extern void bsp_driver_level_hook(int level);
    358 
    359353/*! Init driver manager all in one go, will call _DRV_Manager_initialization(),
    360354 *  then _DRV_Manager_init_level([1..DRVMGR_LEVEL_MAX]).
  • cpukit/libdrvmgr/drvmgr.c

    r0b93d4f8 r6d21a3f2  
    6767/* DRIVER MANAGER */
    6868
    69 void bsp_driver_level_hook(int level) __attribute__((weak));
    70 
    71 /* default hook does nothing, BSP may override. */
    72 void bsp_driver_level_hook(int level)
    73 {
    74 }
    75 
    7669void _DRV_Manager_init_level(int level)
    7770{
     
    8679        /* Initialize buses and devices into this new level */
    8780        drvmgr_init_update();
    88 
    89         bsp_driver_level_hook(level);
    9081}
    9182
Note: See TracChangeset for help on using the changeset viewer.