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:
Vijay Banerjee
2026-06-25 09:51:58 -05:00
committed by Joel Sherrill
parent e09a580116
commit 4a513030e2
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -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 ) {
+1 -1
View File
@@ -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
);