<div dir="ltr"><div>Dear Deval Shah,</div><div><br></div><div>I found email thread(name: GSoC 2015 RPi USB Support) which is related with my problem.</div><div><a href="https://lists.rtems.org/pipermail/devel/2015-August/012218.html">https://lists.rtems.org/pipermail/devel/2015-August/012218.html</a></div><div><br></div><div>Because rtems and libbsd version is not matched with last year version, some description is not matched. but, this email thread's problem is same with my case.</div><div><br></div><div>On referencing, I attached my modified code.</div><div>At this time, even though I changed according to GSoC 2015 RPi USB Support, my problem is not resolved.</div><div><br></div><div>Current my idea is that I should modify linkscript for resolving this as like below example.</div><div><br></div><div> .rtemsroset : ALIGN_WITH_INPUT {<br> /* Special FreeBSD linker set sections */<br> __start_set_sysctl_set = .;<br> *(set_sysctl_*);<br> __stop_set_sysctl_set = .;<br> *(set_domain_*);<br> *(set_pseudo_*);</div><div>#if 1 // Thomas added</div><div> __start_set_nexus = .;</div><div> /* some description should be added in here */</div><div><div> __stop_set_nexus = .;</div><div>#endif</div></div><div> ...<br></div><div><br></div><div>But, I don't know that which description should be addded between __start_set_nexus and __stop_set_nexus.</div><div><br></div><div>Is this right method ?</div><div><br></div><div>Please advise me.</div><div><br></div><div>Best Regards.</div><div>Thomas Kim<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-11 19:01 GMT+09:00 Thomas Kim <span dir="ltr"><<a href="mailto:thomas73.kim@gmail.com" target="_blank">thomas73.kim@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Dear Deval,</div><div><br></div><div>No problem.</div><div><br></div><div>If I find addtional something, I will let you know.</div><div><br></div><div>Best Regards,</div><div>Thomas Kim</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-11 18:57 GMT+09:00 Deval Shah <span dir="ltr"><<a href="mailto:deval.maker@gmail.com" target="_blank">deval.maker@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Thomas Kim, <div><br></div><div>I am actually going out of station for a week. I will look when I get some time. </div><div><br></div><div>Sorry for not being able to help immediately. </div><div><br></div><div>Deval Shah<br><div><br>On Thursday 11 August 2016, Thomas Kim <<a href="mailto:thomas73.kim@gmail.com" target="_blank">thomas73.kim@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Dear Deval Shah,</div><div><br></div><div>I found reason about "why dwcotg probe & attach function is not called".</div><div><br></div><div>Even though DRIVER_MODULE is declared in below, _bsd__start_set_nexus & _bsd__stop_set_nexus is not initialized.</div><div><br></div><div>DRIVER_MODULE(bcm283x_dwcotg, nexus, bcm283x_dwc_otg_driver,<br> bcm283x_dwc_otg_devclass, 0, 0);</div><div><br></div><div>I checked symbol information by arm-rtems4.12-nm command.</div><div><br></div><div><font color="#ff0000">00225fac D _bsd__start_set_nexus</font><br>00225fac D _bsd__start_set_sysctl_set<br>0022ca10 D _bsd__start_set_sysinit_set<br>0022974c D _bsd_start_softclock_sys_init<br>00225fac D _bsd__stop_set_modmetadata_set<br><font color="#ff0000">00225fac D _bsd__stop_set_nexus</font><br>002260a4 D _bsd__stop_set_sysctl_set<br>0022cb04 D _bsd__stop_set_sysinit_set<br></div><div><br></div><div>But, I was failed for finding location for initializing _bsd__start_set_nexus and _bsd__stop_set_nexus.</div><div><br></div><div>Please advise me.</div><div><br></div><div>Best Regards,</div><div>Thomas Kim.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-11 11:40 GMT+09:00 Thomas Kim <span dir="ltr"><<a>thomas73.kim@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Dear Deval Shah,</div><div><br></div><div>I found something.</div><div><br></div><div>At this time, I am analyzing libbsd subsystem call procedure.</div><div>I added additional information on verbose log file for referencing kernel.h (in rtems-libbsd/freebsd/sys/sys) and symbol file which is generated by arm-rtems4.12-nm.</div><div>I attached this log file(libbsd-verbose-log.txt).</div><div><br></div><div>As you see in this log file, my surmmary is below;</div><div><br></div><div>1) subsystem 310000 is SI_SUB_DRIVERS. also, I checked that dwcotg_nexus_mod, usbus_ehci_mod, umass_uhub_mod, uhub_uhub_mod, uhub_usbus_mod are registered by _bsd_module_register_init().</div><div> - I think that it is okay.</div><div><br></div><div>2) subsystem 3800000 is SI_SUB_CONFIGURE. I checked nexus_probe() in rtems-kernel-nexus.c is called in this phase.</div><div>but, device_add_child() is not called in below step of nexus_probe().</div><div><br></div><div> SET_FOREACH(nd, nexus) {<br> device_add_child(dev, nd->name, nd->unit);<br> }</div><div><br></div><div>Finally, I am guessing that device_add_child() for DWCOTG should be called.</div><div>At this time, I don't know why device_add_child() for DWCOTG controller is not called.</div><div><br></div><div>Please advise me.</div><div><br></div><div>Best Regards,</div><div>Thomas Kim</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-11 8:51 GMT+09:00 Thomas Kim <span dir="ltr"><<a>thomas73.kim@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Dear Deval Shah,</div><div><br></div><div>I checked my rasberry board. my board is rasberry Pi B+. (It is not RPI2 B+)</div><div>I am sorry. I returned to rtems, libbsd version for Pi B+.</div><div><br></div><div>Anyway, I guess that both bcm283x_dwc_otg_probe() and bcm283x_dwc_otg_attach() function should be called.</div><div>I don't know how to call bcm283x_dwc_otg_probe() and bcm283x_dwc_otg_attach().</div><div><br></div><div>Please advsie me.</div><div><br></div><div>Best Regards,</div><div>Thomas Kim.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-10 22:06 GMT+09:00 Deval Shah <span dir="ltr"><<a>deval.maker@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><font face="arial, helvetica, sans-serif">I saw the files which you have attached. I found one quick mistake. </font><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">In your nexus-devices.h file "<span style="color:rgb(0,0,0);font-size:14px;white-space:pre-wrap">RTEMS_BSD_DRIVER_BCM283X_DWCO<wbr>TG(0x20980000, 17);", </span><span style="color:rgb(0,0,0);font-size:14px;white-space:pre-wrap">base and irq used are wrong. I had corrected the irq in my other commit. They will be 0x3F980000 (since you are using Raspberry pi 2) and 9.</span></font></div><div><font face="arial, helvetica, sans-serif"><span style="color:rgb(0,0,0);font-size:14px;white-space:pre-wrap"><br></span></font></div><div><font face="arial, helvetica, sans-serif"><span style="color:rgb(0,0,0);font-size:14px;white-space:pre-wrap">It would be easier to use the macros. </span></font><span style="color:rgb(0,0,0);font-size:14px;white-space:pre-wrap;font-family:arial,helvetica,sans-serif">i.e.</span></div><div><span style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif;font-size:14px;white-space:pre-wrap">RTEMS_BSD_DRIVER_BCM283X_DWCOT<wbr>G(</span><span style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif;font-size:14px;white-space:pre-wrap">BCM2835_USB_BASE</span><span style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif;font-size:14px;white-space:pre-wrap">, </span><span style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif;font-size:14px;white-space:pre-wrap">BCM2835_IRQ_ID_USB</span><span style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif;font-size:14px;white-space:pre-wrap">);</span></div><div><span style="color:rgb(0,0,0);font-size:14px;white-space:pre-wrap"><font face="arial, helvetica, sans-serif"><br></font></span></div><div><span style="color:rgb(0,0,0);font-size:14px;white-space:pre-wrap"><font face="arial, helvetica, sans-serif"><br></font></span></div></div><div style="max-height:1px" hspace="streak-pt-mark"><img style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=aZGV2YWwubWFrZXJAZ21haWwuY29t&type=zerocontent&guid=c660787c-b8d9-436b-9b11-529ef9985f24"><font color="#ffffff" size="1">ᐧ</font></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 10, 2016 at 1:11 PM, Thomas Kim <span dir="ltr"><<a>thomas73.kim@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Dear Deval Shah,</div><div><br></div><div>Thank you very much for your reply.</div><div>I checked this again.</div><div>Because there is not your code in currrent git system, I patched your code in current libbsd code.</div><div>As I know in current libbsd source tree, your nexus_devices.h should be sperated into rtems-bsd-nexus-bus.h. I attached this.</div><div><br></div><div>First of all, I completed to test RTEMS testsuites/sample/ticker.exe on RPI2 B+ board.</div><div>I am tring to test rtems-libbsd/rtemsbsd/testsuit<wbr>e/usb01.</div><div>also, I try to test two cases in usb01/init.c</div><div>case 1 does not include NEED_USB_EHCI. case 2 include NEED_USB_EHCI.</div><div><br></div><div>#if defined(LIBBSP_ARM_LPC24XX_BSP<wbr>_H) || defined(LIBBSP_ARM_LPC32XX_BSP<wbr>_H)<br> #define NEED_USB_OHCI<br>(CASE1) #elif defined(__GEN83xx_BSP_h) || defined(LIBBSP_POWERPC_QORIQ_B<wbr>SP_H)<br>(CASE2) #elif defined(__GEN83xx_BSP_h) || defined(LIBBSP_ARM_RASPBERRYPI<wbr>_BSP_H)<br> #define NEED_USB_EHCI<br>#endif</div><div>SYSINIT_NEED_USB_CORE;<br>#ifdef NEED_USB_OHCI<br> SYSINIT_NEED_USB_OHCI;<br>#endif<br>#ifdef NEED_USB_EHCI<br> SYSINIT_NEED_USB_EHCI;<br>#endif</div><div><br></div><div>also, I added "#define VERBOSE_SYSINIT 1" in init_main.c for checking SYS_INIT functional call. </div><div><br></div><div>At this time, usb_quirk_init() only is called when I test two cases.</div><div>I attached serial log file, too.</div><div><br></div><div>Please let me know my missing point.</div><div><br></div><div>Best Regards,</div><div>JunBeom<br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-10 5:31 GMT+09:00 Deval Shah <span dir="ltr"><<a>deval.maker@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello <span style="font-size:12.8px">Thomas Kim, </span><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">It is the same code which you downloaded will work for the raspberry pi. You can test the libbsd version of raspberry pi by configuring waf with the following arguments. </span></div><div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">waf configure --prefix=/opt/rtems/4.12/bsps \</span></div><div><span style="font-size:12.8px">--rtems=/opt/rtems/4.12/bsps \</span></div><div><span style="font-size:12.8px">--rtems-tools=/opt/rtems/4.12/<wbr>tools \</span></div><div><span style="font-size:12.8px">--rtems-bsps=arm/raspberrypi</span></div></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">You can find more at this link. <a href="https://git.rtems.org/rtems-libbsd/tree/README.waf" target="_blank">https://git.rtems.org/rt<wbr>ems-libbsd/tree/README.waf</a> </span></div><div><br></div><div><span style="font-size:12.8px">Deval Shah</span></div><div><span style="font-size:12.8px"><br></span></div></div><div style="max-height:1px" hspace="streak-pt-mark"><img style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=aZGV2YWwubWFrZXJAZ21haWwuY29t&type=zerocontent&guid=6005ca4b-bda3-4cf2-b7e1-b0c6e7fbfb20"><font color="#ffffff" size="1">ᐧ</font></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 9, 2016 at 11:48 AM, Thomas Kim <span dir="ltr"><<a>thomas73.kim@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Dear Sir,</div><div><br></div><div>I am sorry.</div><div><br></div><div>I want to test this libbsd version for Rasberry Pi.</div><div>When I check "git://<a href="http://git.rtems.org/rtems-libbsd.git" target="_blank">git.rtems.org/rtems-lib<wbr>bsd.git</a>", there is not any code for Rasberry pi.</div><div><br></div><div>Please could you let me know git URL for downloading this libbsd version ?</div><div><br></div><div>Best Regards,</div><div>Thomas Kim<br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>2016-08-09 14:52 GMT+09:00 Sebastian Huber <span dir="ltr"><<a>sebastian.huber@embedded-brai<wbr>ns.de</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>From which FreeBSD version are these files?<br>
<br>
On 05/08/16 18:32, Deval Shah wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
freebsd/sys/arm/broadcom/bcm28<wbr>35/bcm283x_dwc_fdt.c | 127 ++++++++++++<br>
freebsd/sys/dev/usb/controller<wbr>/dwc_otg_fdt.c | 228 +++++++++++++++++++++<br>
freebsd/sys/dev/usb/controller<wbr>/dwc_otg_fdt.h | 39 ++++<br>
libbsd.py | 3 +<br>
libbsd_waf.py | 4 +-<br>
rtemsbsd/include/bsp/nexus-dev<wbr>ices.h | 21 ++<br>
6 files changed, 421 insertions(+), 1 deletion(-)<br>
create mode 100644 freebsd/sys/arm/broadcom/bcm28<wbr>35/bcm283x_dwc_fdt.c<br>
create mode 100644 freebsd/sys/dev/usb/controller<wbr>/dwc_otg_fdt.c<br>
create mode 100644 freebsd/sys/dev/usb/controller<wbr>/dwc_otg_fdt.h<br>
</blockquote>
<br>
-- <br>
Sebastian Huber, embedded brains GmbH<br>
<br>
Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
Phone : +49 89 189 47 41-16<br>
Fax : +49 89 189 47 41-09<br>
E-Mail : <a>sebastian.huber@embedded-brain<wbr>s.de</a><br>
PGP : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
<br></div></div>
______________________________<wbr>_________________<br>
devel mailing list<br>
<a>devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" target="_blank" rel="noreferrer">http://lists.rtems.org/mailman<wbr>/listinfo/devel</a><br>
</blockquote></div><br></div><span><font color="#888888">
</font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><span><font color="#888888"><span><font color="#888888"><span><font color="#888888"><div><br></div>-- <br><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Deval Shah</div><div>Graduate Student,</div><div><div style="font-size:12.8px">B.E. (Hons.) Electrical and Electronics Engineering<br></div><div style="font-size:12.8px"><a style="color:rgb(17,85,204);font-size:12.8px" href="http://www.bits-pilani.ac.in/hyderabad/" target="_blank">BITS Pilani Hyderabad Campus</a></div></div><img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcQrfqfQ2BeDwbmyqDm6xXZtDzweCXlsUaVTjJkCOsZ3eyztVIs8dg"><br></div><div><a href="https://github.com/deval-maker" target="_blank">Github Profile</a></div></div></div></div>
</font></span></font></span></font></span></font></span></div><span><font color="#888888"><span><font color="#888888"><span><font color="#888888">
</font></span></font></span></font></span></blockquote></div><span><font color="#888888"><span><font color="#888888"><span><font color="#888888"><br></font></span></font></span></font></span></div><span><font color="#888888"><span><font color="#888888"><span><font color="#888888">
</font></span></font></span></font></span></div></div></blockquote></div><span><font color="#888888"><span><font color="#888888"><span><font color="#888888"><br><br clear="all"><span class="HOEnZb"><font color="#888888"><span><font color="#888888"><div><br></div>-- <br><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Deval Shah</div><div>Graduate Student,</div><div><div style="font-size:12.8px">B.E. (Hons.) Electrical and Electronics Engineering<br></div><div style="font-size:12.8px"><a style="color:rgb(17,85,204);font-size:12.8px" href="http://www.bits-pilani.ac.in/hyderabad/" target="_blank">BITS Pilani Hyderabad Campus</a></div></div><img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcQrfqfQ2BeDwbmyqDm6xXZtDzweCXlsUaVTjJkCOsZ3eyztVIs8dg"><br></div><div><a href="https://github.com/deval-maker" target="_blank">Github Profile</a></div></div></div></div>
</font></span></font></span></font></span></font></span></font></span></div><span class="HOEnZb"><font color="#888888"><span><font color="#888888"><span><font color="#888888">
</font></span></font></span></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><span><font color="#888888"><span><font color="#888888"><br></font></span></font></span></font></span></div><span class="HOEnZb"><font color="#888888"><span><font color="#888888">
</font></span></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><span><font color="#888888"><br></font></span></font></span></div><span class="HOEnZb"><font color="#888888"><span><font color="#888888">
</font></span></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><span><font color="#888888"><br></font></span></font></span></div></div><span class="HOEnZb"><font color="#888888"><span><font color="#888888">
</font></span></font></span></blockquote></div></div><span class="HOEnZb"><font color="#888888"><span><font color="#888888"><br><br>-- <br><div dir="ltr"><div><div dir="ltr"><div>Deval Shah</div><div>Graduate Student,</div><div><div style="font-size:12.8px">B.E. (Hons.) Electrical and Electronics Engineering<br></div><div style="font-size:12.8px"><a style="color:rgb(17,85,204);font-size:12.8px" href="http://www.bits-pilani.ac.in/hyderabad/" target="_blank">BITS Pilani Hyderabad Campus</a></div></div><img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcQrfqfQ2BeDwbmyqDm6xXZtDzweCXlsUaVTjJkCOsZ3eyztVIs8dg"><br></div><div><a href="https://github.com/deval-maker" target="_blank">Github Profile</a></div></div></div><br>
</font></span></font></span></blockquote></div><br></div>
</blockquote></div><br></div>