<div dir="ltr">Hi,<br><div><br></div><div>I just found out that the Module Dependencies don't have any influence on the initialization process.</div><div>I have to look at SYSINIT and am currently reading their docs.</div><div><br></div><div>If anyone could point me to the rtems part of this, it would be great.</div><div><br></div><div>Best,</div><div>Nils</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 24 Jul 2019 at 16:53, Nils Hölscher <<a href="mailto:nilhoel1@gmail.com">nilhoel1@gmail.com</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"><div dir="ltr">Hi,<div><br></div><div><a class="gmail_plusreply" id="gmail-m_8363489486291006451plusReplyChip-0" href="mailto:vijaykumar9597@gmail.com" target="_blank">@Vijay Kumar Banerjee</a> thanks for the dtb file.<br></div><div>I build my file from FreeBSD master.</div><div><br></div><div>Prcm attaches now but still after the pruss driver...:</div><div>"</div><div>nexus0: <RTEMS Nexus device><br>ofwbus0: <Open Firmware Device Tree> on nexus0<br>simplebus0: <Flattened device tree simple bus> on ofwbus0<br><b>ti_pruss0: <TI Programmable Realtime Unit Subsystem> mem 0x4a300000-0x4a37ffff irq 20,21,22,23,24,25,26,27 on simplebus0<br>ti_pruss0: could not enable PRUSS clock<br>device_attach: ti_pruss0 attach returned 6</b><br>simplebus1: <Flattened device tree simple bus> on simplebus0<b><br>am335x_prcm0: <AM335x Power and Clock Management> mem 0x200000-0x203fff on simplebus1</b><br><b>====am335x_prcm_attach====</b><br></div><div>"</div><div><br></div><div>Is there anything else I can do besides using MODULE_DEPENDENCY, which I already use.</div><div>The prcm module is also a EARLY_DRIVER_MODULE.</div><div><br></div><div>Best,</div><div>Nils</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 24 Jul 2019 at 16:04, Vijay Kumar Banerjee <<a href="mailto:vijaykumar9597@gmail.com" target="_blank">vijaykumar9597@gmail.com</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"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 24, 2019 at 7:03 PM Nils Hölscher <<a href="mailto:nilhoel1@gmail.com" target="_blank">nilhoel1@gmail.com</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"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 24 Jul 2019 at 15:14, Vijay Kumar Banerjee <<a href="mailto:vijaykumar9597@gmail.com" target="_blank">vijaykumar9597@gmail.com</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"><div dir="ltr"><div dir="ltr"><br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 24, 2019 at 6:36 PM Nils Hölscher <<a href="mailto:nilhoel1@gmail.com" target="_blank">nilhoel1@gmail.com</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"><div dir="ltr"><div>Hi again,</div><div><br></div></div></blockquote><div>Hi Nils </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div>I just decompiled my device tree and checked.<div>The probe code of the prcm driver is as follows:</div><div>"</div><div><div style="color:rgb(0,0,0);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;line-height:19px;white-space:pre-wrap"><div><span style="color:rgb(0,0,255)">static</span> <span style="color:rgb(0,0,255)">int</span></div><div><span style="color:rgb(121,94,38)">am335x_prcm_probe</span>(<span style="color:rgb(38,127,153)">device_t</span> <span style="color:rgb(0,16,128)">dev</span>)</div><div>{</div><div> <span style="color:rgb(121,94,38)">printk</span>(<span style="color:rgb(163,21,21)">"am335x_prcm_probe</span><span style="color:rgb(255,0,0)">\n</span><span style="color:rgb(163,21,21)">"</span>);</div><br><div> <span style="color:rgb(175,0,219)">if</span> (!<span style="color:rgb(121,94,38)">ofw_bus_status_okay</span>(dev)){</div><div> <span style="color:rgb(121,94,38)">printk</span>(<span style="color:rgb(163,21,21)">"ofw_bus_status_not_okay</span><span style="color:rgb(255,0,0)">\n</span><span style="color:rgb(163,21,21)">"</span>);</div><div> <span style="color:rgb(175,0,219)">return</span> (ENXIO);</div><div> }</div><br></div></div></div></blockquote><div>Do you get the "ofw_bus_status_not_okay" print ? </div></div></div></blockquote><div>Yes. But I also see the other print. except the success one. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div style="color:rgb(0,0,0);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;line-height:19px;white-space:pre-wrap"><div> <span style="color:rgb(175,0,219)">if</span> (<span style="color:rgb(121,94,38)">ofw_bus_is_compatible</span>(dev, <span style="color:rgb(163,21,21)">"ti,am3-prcm"</span>)) {</div><div> <span style="color:rgb(121,94,38)">device_set_desc</span>(dev, <span style="color:rgb(163,21,21)">"AM335x Power and Clock Management"</span>);</div><div> <span style="color:rgb(121,94,38)">printk</span>(<span style="color:rgb(163,21,21)">"PROBE SUCESSFULL</span><span style="color:rgb(255,0,0)">\n</span><span style="color:rgb(163,21,21)">"</span>);</div><div> <span style="color:rgb(175,0,219)">return</span>(BUS_PROBE_DEFAULT);</div><div> }</div><div> <span style="color:rgb(121,94,38)">printk</span>(<span style="color:rgb(163,21,21)">"ofw_bus incompatible</span><span style="color:rgb(255,0,0)">\n</span><span style="color:rgb(163,21,21)">"</span>);</div><div> <span style="color:rgb(175,0,219)">return</span> (ENXIO);</div><div>}</div></div></div><div>"</div><div>So it seems the prcm part in the device tree has to be compatible to <span style="color:rgb(163,21,21);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;white-space:pre-wrap">"ti,am3-prcm"</span>.</div><div>The thing is the decompiled device tree states just that:</div><div>"</div><div><div style="color:rgb(0,0,0);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;line-height:19px;white-space:pre-wrap"><div><span style="color:rgb(121,94,38)">prcm@0</span> {</div><div> compatible = <span style="color:rgb(163,21,21)">"ti,am3-prcm\0simple-bus"</span>;</div></div></div></div></blockquote><div>In my device tree, it runs successfully and the decompiled compatible looks like :</div><div>```<br> prcm@200000 {<br> compatible = "ti,am3-prcm";<br> reg = < 0x200000 0x4000 >;<br> linux,phandle = < 0x4a >;<br> phandle = < 0x4a >;<br>```</div></div></div></blockquote><div>OK, this is awkward, cause we both should have used the same sources.</div></div></div></blockquote><div>Have you checked that your source is from the tree matching the libBSD HEAD</div><div>commit? </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div style="color:rgb(0,0,0);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;line-height:19px;white-space:pre-wrap"><div> reg = <<span style="color:rgb(9,136,90)">0x00</span> <span style="color:rgb(9,136,90)">0x2000</span>>;</div><div> #address-cells = <<span style="color:rgb(9,136,90)">0x01</span>>;</div><div> #size-cells = <<span style="color:rgb(9,136,90)">0x01</span>>;</div><div> ranges = <<span style="color:rgb(9,136,90)">0x00</span> <span style="color:rgb(9,136,90)">0x00</span> <span style="color:rgb(9,136,90)">0x2000</span>>;</div><div> phandle = <<span style="color:rgb(9,136,90)">0x5a</span>>;</div><div>[...]</div></div></div><div>"</div><div>Any ideas would help, cause I am currently not able to understand this behaviour.</div><div>Also without this driver even the dev_usb_bbb driver shouldn't work.</div><div>However it attaches because it doesn't check for the clocks error code.</div><div></div></div></blockquote><div>I remember testing this a few days ago for my fb drivers and it was attaching alright,</div><div>if I remember correctly. If changing the dtb doesn't work for you, I won't mind checking</div><div>again, this will give me a hint for the display issue as well. </div></div></div></blockquote><div>I will keep you updated on this.</div>Would you be so kind and send me your compiled device tree? </div></div></blockquote><div>Please find it attached in this mail. </div><div><br></div><div>Note: I have removed the devel from the cc because the attachment might be</div><div>big for the list. Please continue the discussion in the mailing list and maybe note</div><div>it somewhere that you already received the dtb from me in private mail.</div><div><br></div><div>Regards,</div><div>Vijay</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div> <br></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>Best,</div><div>Nils</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 24 Jul 2019 at 14:43, Nils Hölscher <<a href="mailto:nilhoel1@gmail.com" target="_blank">nilhoel1@gmail.com</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"><div dir="ltr"><div>Hi,</div><div><br></div>I just found out that the prcm driver fails to probe on the simplebus and therefore cannot apply itself.<div>Seems like I am back to checking dtb.</div><div><br></div><div>Best,</div><div>Nils</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 23 Jul 2019 at 14:26, Nils Hölscher <<a href="mailto:nilhoel1@gmail.com" target="_blank">nilhoel1@gmail.com</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"><div dir="ltr">Hi,<div><br></div><div>After debugging with printk, didn't get the module loading working as suggested by Sebastian.</div><div>I just found out that my PRU driver can't be attached, cause the AM35xx clock driver isn't loaded.</div><div>The driver can be found her:</div><div><a href="https://github.com/RTEMS/rtems-libbsd/blob/610349693dd31d8b0efd33776516b7187cc5cda2/freebsd/sys/arm/ti/am335x/am335x_prcm.c" target="_blank">https://github.com/RTEMS/rtems-libbsd/blob/610349693dd31d8b0efd33776516b7187cc5cda2/freebsd/sys/arm/ti/am335x/am335x_prcm.c</a><br></div><div><br></div><div>Can anyone tell me how to load this driver and obisouly before I initialize my BSD modules?</div><div><br></div><div>FYI: The code line that fails is this one, cause the driver hasn't been initialized.</div><div><a href="https://github.com/RTEMS/rtems-libbsd/blob/610349693dd31d8b0efd33776516b7187cc5cda2/freebsd/sys/arm/ti/am335x/am335x_prcm.c#L854" target="_blank">https://github.com/RTEMS/rtems-libbsd/blob/610349693dd31d8b0efd33776516b7187cc5cda2/freebsd/sys/arm/ti/am335x/am335x_prcm.c#L854</a><br></div><div><br></div><div>Thanks,</div><div>Nils</div></div>
</blockquote></div>
</blockquote></div>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div></div>
</blockquote></div></div>
</blockquote></div></div>
</blockquote></div>
</blockquote></div>