<div dir="ltr"><div>Hi again,</div><div><br></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"><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>    <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">"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"><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>                        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><br></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">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>