Changeset e7fade3 in rtems for cpukit/sapi


Ignore:
Timestamp:
Nov 28, 2011, 8:52:03 AM (8 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, master
Children:
1c5a7e5
Parents:
02550220
git-author:
Daniel Hellstrom <daniel@…> (11/28/11 08:52:03)
git-committer:
Daniel Hellstrom <daniel@…> (04/16/15 23:10:16)
Message:

DRVMGR: added driver manager to cpukit/libdrvmgr

Location:
cpukit/sapi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/include/confdefs.h

    r02550220 re7fade3  
    161161 */
    162162#define CONFIGURE_LIBIO_POSIX_KEYS 1
     163
     164/**
     165 *  Driver Manager Configuration
     166 */
     167#ifdef RTEMS_DRVMGR_STARTUP
     168  #define CONFIGURE_DRVMGR_SEMAPHORES 1
     169#else
     170  #define CONFIGURE_DRVMGR_SEMAPHORES 0
     171#endif
    163172
    164173#ifdef CONFIGURE_INIT
     
    21712180      CONFIGURE_TERMIOS_SEMAPHORES + CONFIGURE_LIBBLOCK_SEMAPHORES + \
    21722181      CONFIGURE_SEMAPHORES_FOR_FILE_SYSTEMS + \
    2173       CONFIGURE_NETWORKING_SEMAPHORES)
     2182      CONFIGURE_NETWORKING_SEMAPHORES + CONFIGURE_DRVMGR_SEMAPHORES)
    21742183
    21752184  /**
  • cpukit/sapi/src/exinit.c

    r02550220 re7fade3  
    5757#include <rtems/posix/posixapi.h>
    5858
     59#ifdef RTEMS_DRVMGR_STARTUP
     60  #include <drvmgr/drvmgr.h>
     61#endif
     62
    5963Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
    6064
     
    162166void rtems_initialize_before_drivers(void)
    163167{
     168  #ifdef RTEMS_DRVMGR_STARTUP
     169  _DRV_Manager_initialization();
     170  #endif
    164171
    165172  #if defined(RTEMS_MULTIPROCESSING)
     
    183190   */
    184191
     192  #ifdef RTEMS_DRVMGR_STARTUP
     193  /* BSPs has already registered their "root bus" driver in the
     194   * bsp_predriver hook or so.
     195   *
     196   * Init Drivers to Level 1, constraints:
     197   *   - Interrupts and system clock timer does not work.
     198   *   - malloc() work, however other memory services may not
     199   *     have been initialized yet.
     200   *   - initializes most basic stuff
     201   *
     202   * Typical setup in Level 1:
     203   *   - Find most devices in system, do PCI scan and configuration.
     204   *   - Reset hardware if needed.
     205   *   - Install IRQ driver
     206   *   - Install Timer driver
     207   *   - Install console driver and debug printk()
     208   *   - Install extra memory.
     209   */
     210  _DRV_Manager_init_level(1);
     211  bsp_driver_level_hook(1);
     212  #endif
     213
     214  /* Initialize I/O drivers.
     215   *
     216   * Driver Manager note:
     217   * All drivers may not be registered yet. Drivers will dynamically
     218   * be initialized when registered in level 2,3 and 4.
     219   */
    185220  _IO_Initialize_all_drivers();
     221
     222  #ifdef RTEMS_DRVMGR_STARTUP
     223  /* Init Drivers to Level 2, constraints:
     224   *  - Interrupts can be registered and enabled.
     225   *  - System Clock is running
     226   *  - Console may be used.
     227   *
     228   * This is typically where drivers are initialized
     229   * for the first time.
     230   */
     231  _DRV_Manager_init_level(2);
     232  bsp_driver_level_hook(2);
     233
     234  /* Init Drivers to Level 3
     235   *
     236   * This is typically where normal drivers are initialized
     237   * for the second time, they may depend on other drivers
     238   * API inited in level 2
     239   */
     240  _DRV_Manager_init_level(3);
     241  bsp_driver_level_hook(3);
     242
     243  /* Init Drivers to Level 4,
     244   * Init drivers that depend on services initialized in Level 3
     245   */
     246  _DRV_Manager_init_level(4);
     247  bsp_driver_level_hook(4);
     248  #endif
    186249
    187250  #if defined(RTEMS_MULTIPROCESSING)
Note: See TracChangeset for help on using the changeset viewer.