config, _IO_Initialize_all_drivers

Heinz Junkes junkes at fhi-berlin.mpg.de
Fri Feb 18 16:18:43 UTC 2022


I'm still trying to get the booting and registering and initialising of the i2c devices on the MVME3100 to work properly.

In confdefs/iodrivers.h the driver address table is built up and then 
_IO_Initialize_all_drivers() is called without registering the individual devices first.

If I now enter in already before in bspstart.c

RTEMS_SYSINIT_ITEM(
  mvme3100_i2c_initialize,
  RTEMS_SYSINIT_BSP_PRE_DRIVERS,
  RTEMS_SYSINIT_ORDER_MIDDLE
);

a device (register it and e.g. got the major number 0) this is ignored by the IO_Initialize_all_drivers().

Shouldn't initialisation be preceded by registration ( rtems_io_register_driver() )?

Heinz

rtems_driver_address_table
_IO_Driver_address_table[ CONFIGURE_MAXIMUM_DRIVERS ] = {
  #ifdef CONFIGURE_BSP_PREREQUISITE_DRIVERS
    CONFIGURE_BSP_PREREQUISITE_DRIVERS,
  #endif
  #ifdef CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS
    CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS,
  #endif
  #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
    CONSOLE_DRIVER_TABLE_ENTRY,
  #endif
  #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER
    RTC_DRIVER_TABLE_ENTRY,
  #endif
  #ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER
    WATCHDOG_DRIVER_TABLE_ENTRY,
  #endif
  #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER
    DEVNULL_DRIVER_TABLE_ENTRY,
  #endif
  #ifdef CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER
    DEVZERO_DRIVER_TABLE_ENTRY,
  #endif
  #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
    IDE_CONTROLLER_DRIVER_TABLE_ENTRY,
  #endif
  #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER
    ATA_DRIVER_TABLE_ENTRY,
  #endif
  #ifdef CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER
    FRAME_BUFFER_DRIVER_TABLE_ENTRY,
  #endif
  #ifdef CONFIGURE_APPLICATION_EXTRA_DRIVERS
    CONFIGURE_APPLICATION_EXTRA_DRIVERS,
  #endif
  #if defined(CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER) \
    || ( !defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) \
      && !defined(CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER) \
      && !defined(CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER) \
      && !defined(CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER) \
      && !defined(CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER) \
      && !defined(CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER) \
      && !defined(CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER) \
      && !defined(CONFIGURE_APPLICATION_EXTRA_DRIVERS) )
    NULL_DRIVER_TABLE_ENTRY
  #endif
};

const size_t _IO_Number_of_drivers =
  RTEMS_ARRAY_SIZE( _IO_Driver_address_table );

RTEMS_SYSINIT_ITEM(
  _IO_Initialize_all_drivers,
  RTEMS_SYSINIT_DEVICE_DRIVERS,
  RTEMS_SYSINIT_ORDER_MIDDLE
);



------------------------------------------------------------------------------
Fritz-Haber-Institut    | Phone:         (+49 30) 8413-4270
Heinz Junkes             | Fax (G3+G4):   (+49 30) 8413-5900
Faradayweg 4-6        | VC: 102220181216 at bjn.vc
D - 14195 Berlin        | E-Mail:        junkes at fhi-berlin.mpg.de
------------------------------------------------------------------------------



More information about the devel mailing list