i2c initialization MVME3100

Joel Sherrill joel at rtems.org
Mon Feb 7 18:25:28 UTC 2022


Glad you figured it out. Are you going to file a ticket or at least
post a patch? :)

--joel

On Mon, Feb 7, 2022 at 12:20 PM Heinz Junkes <junkes at fhi-berlin.mpg.de> wrote:
>
> I'll answer my question myself ;-)
>
> I changed
>
> > RTEMS_SYSINIT_ITEM{
> >  mvme3100_i2c_initialize,
> >  RTEMS_SYSINIT_BSP_PRE_DRIVERS,
> >  RTEMS_SYSINIT_ORDER_MIDDLE
> > );
>
> to
>
> RTEMS_SYSINIT_ITEM{
>    mvme3100_i2c_initialize,
>    RTEMS_SYSINIT_BSP_DRVMGR_LEVEL_2,
>    RTEMS_SYSINIT_ORDER_MIDDLE
> );
>
> Heinz
>
> > On 7. Feb 2022, at 14:42, Heinz Junkes <junkes at fhi-berlin.mpg.de> wrote:
> >
> > in bsps/powerpc/mvme3100/start/bspstart.c I can find
> >
> > RTEMS_SYSINIT_ITEM{
> >  mvme3100_i2c_initialize,
> >  RTEMS_SYSINIT_BSP_PRE_DRIVERS,
> >  RTEMS_SYSINIT_ORDER_MIDDLE
> > );
> >
> > mvme3100_i2c_initialize calls BSP_i2c_initialize
> >
> > This can be found in bsps/powerpc/mvme3100/i2c/i2c_init.c
> > This function calls rtems_libi2c_initialize() from cpukit/libi2c/libi2c.c
> >
> > and here rtems_io_register_driver gets called:
> >
> > sc = rtems_io_register_driver (0, &rtems_libi2c_io_ops, &rtems_libi2c_major);
> >
> > But in cpukit/sapi/src/ioregisterdriver.c
> >
> > in rtems_io_register_driver () the call of the associated init routine gets postponed to
> > a later stage because _IO_All_drivers_initializes is not true in this early of bspstart.
> > so
> > } else {
> >  /* The driver will be initialized together with all other drivers
> >   * in a later stage by _IO_Initialize_all_drivers();
> >   */
> >  return RTEMS_SUCCESSFUL;
> > }
> >
> > Now in
> > bsps/powerpc/mvme3100/i2c/i2c_init.c
> >
> > the following calls e.g.
> > busno=rtems_libi2c_register_bus(
> >                                             BSP_I2C_BUS0_NAME,
> > …
> > must fail?
> >
> > I hope I have analysed this correctly. I may be wrong, but the output of the mvme3100 looks like this:
> >
> > Registering mpc8540 i2c bus driver :No such file or directory
> > Registering /dev/console as minor 0 (==/dev/ttyS0)
> > ds1375_probe (open): No such file or directory
> >
> > This happens during initialization in EPICS. The test suite programmes do not produce this output.
> >
> > In the test programmes, however, the initialisation probably fails because the MAXIMUM_DRIVER is default 4.
> > e.g. TEST I2C 1
> >
> > libi2c: Claiming driver slot failed (rtems status code 10)
> > Initializing I2C library failed
> >
> > Danke Heinz
> >
> >
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list