mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-22 06:28:13 +08:00
mvme3100: Initialize libi2c at device driver order
To use the libi2c, application needs to be configured with #define CONFIGURE_APPLICATION_NEEDS_LIBI2C_DRIVER Update #5387
This commit is contained in:
committed by
Joel Sherrill
parent
e09a580116
commit
4a513030e2
@@ -86,13 +86,12 @@ BSP_i2c_initialize(void)
|
||||
{
|
||||
int busno, succ = 0;
|
||||
|
||||
/* Initialize the library */
|
||||
if ( rtems_libi2c_initialize() ) {
|
||||
safe_printf("Initializing I2C library failed\n");
|
||||
/* Register our bus driver */
|
||||
if (!rtems_libi2c_is_initialized){
|
||||
safe_printf("LIBI2C NOT INITIALIZED\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Register our bus driver */
|
||||
if ( (busno=rtems_libi2c_register_bus(
|
||||
BSP_I2C_BUS0_NAME,
|
||||
BSP_I2C_BUS_DESCRIPTOR) ) < 0 ) {
|
||||
|
||||
@@ -448,7 +448,7 @@ static void mvme3100_i2c_initialize(void)
|
||||
|
||||
RTEMS_SYSINIT_ITEM(
|
||||
mvme3100_i2c_initialize,
|
||||
RTEMS_SYSINIT_BSP_PRE_DRIVERS,
|
||||
RTEMS_SYSINIT_DEVICE_DRIVERS,
|
||||
RTEMS_SYSINIT_ORDER_MIDDLE
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user