<div dir="ltr"><div dir="ltr"><br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 1, 2019 at 12:46 AM Christian Mauderer <<a href="mailto:list@c-mauderer.de">list@c-mauderer.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 30/06/2019 19:57, Vijay Kumar Banerjee wrote:<br>
> <br>
> On Sun, Jun 30, 2019 at 10:17 PM Christian Mauderer <<a href="mailto:list@c-mauderer.de" target="_blank">list@c-mauderer.de</a><br>
> <mailto:<a href="mailto:list@c-mauderer.de" target="_blank">list@c-mauderer.de</a>>> wrote:<br>
> <br>
> On 30/06/2019 18:29, Vijay Kumar Banerjee wrote:<br>
> > > @@ -366,6 +374,9 @@ driver_t fbd_driver = {<br>
> > > devclass_t fbd_devclass;<br>
> > > <br>
> > > DRIVER_MODULE(fbd, fb, fbd_driver, fbd_devclass, 0, 0);<br>
> > > +#ifdef __rtems__<br>
> > > +DRIVER_MODULE(fbd, am335x_lcd, fbd_driver, fbd_devclass, 0, 0);<br>
> ><br>
> > Why is this necessary in this case? I don't see a similar<br>
> connection in<br>
> > FreeBSD.<br>
> ><br>
> > the fbd needs to be linked to the am335x_lcd which provides the<br>
> fb0 device<br>
> > and the fbd needs to attach to fb0. <br>
> <br>
> It seems that this connection (or a similar one) hasn't been there on<br>
> FreeBSD. So I wonder why it should be necessary on RTEMS.<br>
> <br>
> Note that the situation is a bit different from the one of the i2c bus.<br>
> There your driver implemented a base for a bus system. Therefore the<br>
> generic bus had been connected to a device specific driver. I'm not sure<br>
> that's the case here.<br>
> <br>
> It's quite possible that you just have to link the fbd with a line like<br>
> the following in nexus-devices.h:<br>
> <br>
> SYSINIT_MODULE_REFERENCE(fbd);<br>
> <br>
> This is not working :<br>
> ```<br>
> fb0: failed to attach fbd device<br>
> ``` <br>
> <br>
> Best regards<br>
> <br>
> Christian<br>
> <br>
<br>
OK. I had a more detailed look: In FreeBSD it's the following connection:<br>
<br>
fbd->fb->fb_mod<br>
<br>
For some devices (like freescale/imx/imx51_ipuv3_fbd.c) a specialized fb<br>
is connected to simplebus. So one of the following should work and<br>
should be most likely more correct:<br>
<br>
Either<br>
<br>
SYSINIT_DRIVER_REFERENCE(fbd, fb);<br>
SYSINIT_DRIVER_REFERENCE(fb, fb_mod);<br>
SYSINIT_MODULE_REFERENCE(fb_mod);<br>
<br></blockquote><div>This worked! </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
or<br>
<br>
SYSINIT_DRIVER_REFERENCE(fbd, fb);<br>
SYSINIT_DRIVER_REFERENCE(fb, simplebus);<br>
<br>
For the second one the following line will be necessary in fbd.c<br>
<br>
DRIVER_MODULE(fbd, simplebus, fbd_driver, fbd_devclass, 0, 0);<br>
<br>
Can you try whether one of these two works? It's just odd to connect the<br>
frame buffer device driver to a specialized device instead of the<br>
general frame buffer where it is connected in FreeBSD. I would expect<br>
problems later with the current construction.<br>
</blockquote></div></div>