[PATCH 01/02] USB driver bcm283x_dwcotg added.
Thomas Kim
thomas73.kim at gmail.com
Thu Aug 11 02:40:15 UTC 2016
Dear Deval Shah,
I found something.
At this time, I am analyzing libbsd subsystem call procedure.
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.
I attached this log file(libbsd-verbose-log.txt).
As you see in this log file, my surmmary is below;
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().
- I think that it is okay.
2) subsystem 3800000 is SI_SUB_CONFIGURE. I checked nexus_probe() in
rtems-kernel-nexus.c is called in this phase.
but, device_add_child() is not called in below step of nexus_probe().
SET_FOREACH(nd, nexus) {
device_add_child(dev, nd->name, nd->unit);
}
Finally, I am guessing that device_add_child() for DWCOTG should be called.
At this time, I don't know why device_add_child() for DWCOTG controller is
not called.
Please advise me.
Best Regards,
Thomas Kim
2016-08-11 8:51 GMT+09:00 Thomas Kim <thomas73.kim at gmail.com>:
> Dear Deval Shah,
>
> I checked my rasberry board. my board is rasberry Pi B+. (It is not RPI2
> B+)
> I am sorry. I returned to rtems, libbsd version for Pi B+.
>
> Anyway, I guess that both bcm283x_dwc_otg_probe() and
> bcm283x_dwc_otg_attach() function should be called.
> I don't know how to call bcm283x_dwc_otg_probe() and
> bcm283x_dwc_otg_attach().
>
> Please advsie me.
>
> Best Regards,
> Thomas Kim.
>
> 2016-08-10 22:06 GMT+09:00 Deval Shah <deval.maker at gmail.com>:
>
>> I saw the files which you have attached. I found one quick mistake.
>>
>> In your nexus-devices.h file "RTEMS_BSD_DRIVER_BCM283X_DWCOTG(0x20980000,
>> 17);", 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.
>>
>> It would be easier to use the macros. i.e.
>> RTEMS_BSD_DRIVER_BCM283X_DWCOTG(BCM2835_USB_BASE, BCM2835_IRQ_ID_USB);
>>
>>
>> ᐧ
>>
>> On Wed, Aug 10, 2016 at 1:11 PM, Thomas Kim <thomas73.kim at gmail.com>
>> wrote:
>>
>>> Dear Deval Shah,
>>>
>>> Thank you very much for your reply.
>>> I checked this again.
>>> Because there is not your code in currrent git system, I patched your
>>> code in current libbsd code.
>>> As I know in current libbsd source tree, your nexus_devices.h should be
>>> sperated into rtems-bsd-nexus-bus.h. I attached this.
>>>
>>> First of all, I completed to test RTEMS testsuites/sample/ticker.exe on
>>> RPI2 B+ board.
>>> I am tring to test rtems-libbsd/rtemsbsd/testsuite/usb01.
>>> also, I try to test two cases in usb01/init.c
>>> case 1 does not include NEED_USB_EHCI. case 2 include NEED_USB_EHCI.
>>>
>>> #if defined(LIBBSP_ARM_LPC24XX_BSP_H) || defined(LIBBSP_ARM_LPC32XX_BSP
>>> _H)
>>> #define NEED_USB_OHCI
>>> (CASE1) #elif defined(__GEN83xx_BSP_h) || defined(LIBBSP_POWERPC_QORIQ_B
>>> SP_H)
>>> (CASE2) #elif defined(__GEN83xx_BSP_h) || defined(LIBBSP_ARM_RASPBERRYPI
>>> _BSP_H)
>>> #define NEED_USB_EHCI
>>> #endif
>>> SYSINIT_NEED_USB_CORE;
>>> #ifdef NEED_USB_OHCI
>>> SYSINIT_NEED_USB_OHCI;
>>> #endif
>>> #ifdef NEED_USB_EHCI
>>> SYSINIT_NEED_USB_EHCI;
>>> #endif
>>>
>>> also, I added "#define VERBOSE_SYSINIT 1" in init_main.c for checking
>>> SYS_INIT functional call.
>>>
>>> At this time, usb_quirk_init() only is called when I test two cases.
>>> I attached serial log file, too.
>>>
>>> Please let me know my missing point.
>>>
>>> Best Regards,
>>> JunBeom
>>>
>>> 2016-08-10 5:31 GMT+09:00 Deval Shah <deval.maker at gmail.com>:
>>>
>>>> Hello Thomas Kim,
>>>>
>>>> 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.
>>>>
>>>> waf configure --prefix=/opt/rtems/4.12/bsps \
>>>> --rtems=/opt/rtems/4.12/bsps \
>>>> --rtems-tools=/opt/rtems/4.12/tools \
>>>> --rtems-bsps=arm/raspberrypi
>>>>
>>>> You can find more at this link. https://git.rtems.org/rt
>>>> ems-libbsd/tree/README.waf
>>>>
>>>> Deval Shah
>>>>
>>>> ᐧ
>>>>
>>>> On Tue, Aug 9, 2016 at 11:48 AM, Thomas Kim <thomas73.kim at gmail.com>
>>>> wrote:
>>>>
>>>>> Dear Sir,
>>>>>
>>>>> I am sorry.
>>>>>
>>>>> I want to test this libbsd version for Rasberry Pi.
>>>>> When I check "git://git.rtems.org/rtems-libbsd.git", there is not any
>>>>> code for Rasberry pi.
>>>>>
>>>>> Please could you let me know git URL for downloading this libbsd
>>>>> version ?
>>>>>
>>>>> Best Regards,
>>>>> Thomas Kim
>>>>>
>>>>> 2016-08-09 14:52 GMT+09:00 Sebastian Huber <
>>>>> sebastian.huber at embedded-brains.de>:
>>>>>
>>>>>> From which FreeBSD version are these files?
>>>>>>
>>>>>> On 05/08/16 18:32, Deval Shah wrote:
>>>>>>
>>>>>>> ---
>>>>>>> freebsd/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c | 127
>>>>>>> ++++++++++++
>>>>>>> freebsd/sys/dev/usb/controller/dwc_otg_fdt.c | 228
>>>>>>> +++++++++++++++++++++
>>>>>>> freebsd/sys/dev/usb/controller/dwc_otg_fdt.h | 39 ++++
>>>>>>> libbsd.py | 3 +
>>>>>>> libbsd_waf.py | 4 +-
>>>>>>> rtemsbsd/include/bsp/nexus-devices.h | 21 ++
>>>>>>> 6 files changed, 421 insertions(+), 1 deletion(-)
>>>>>>> create mode 100644 freebsd/sys/arm/broadcom/bcm28
>>>>>>> 35/bcm283x_dwc_fdt.c
>>>>>>> create mode 100644 freebsd/sys/dev/usb/controller/dwc_otg_fdt.c
>>>>>>> create mode 100644 freebsd/sys/dev/usb/controller/dwc_otg_fdt.h
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sebastian Huber, embedded brains GmbH
>>>>>>
>>>>>> Address : Dornierstr. 4, D-82178 Puchheim, Germany
>>>>>> Phone : +49 89 189 47 41-16
>>>>>> Fax : +49 89 189 47 41-09
>>>>>> E-Mail : sebastian.huber at embedded-brains.de
>>>>>> PGP : Public key available on request.
>>>>>>
>>>>>> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>>>>>>
>>>>>> _______________________________________________
>>>>>> devel mailing list
>>>>>> devel at rtems.org
>>>>>> http://lists.rtems.org/mailman/listinfo/devel
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Deval Shah
>>>> Graduate Student,
>>>> B.E. (Hons.) Electrical and Electronics Engineering
>>>> BITS Pilani Hyderabad Campus <http://www.bits-pilani.ac.in/hyderabad/>
>>>>
>>>> Github Profile <https://github.com/deval-maker>
>>>>
>>>
>>>
>>
>>
>> --
>> Deval Shah
>> Graduate Student,
>> B.E. (Hons.) Electrical and Electronics Engineering
>> BITS Pilani Hyderabad Campus <http://www.bits-pilani.ac.in/hyderabad/>
>>
>> Github Profile <https://github.com/deval-maker>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20160811/d2083f0f/attachment-0002.html>
-------------- next part --------------
subsystem 880000 // SI_SUB_SETTINGS - check and recheck settings
0x312cc(0)... done.
subsystem 1000000 // SI_SUB_VM - virtual memory system init
0x282b4(0)... done.
0x1d1b4(0)... done.
0x25e70(0)... done.
subsystem 1800000 // SI_SUB_KMEM - kernel memory
0x27814(0x229560)... done.
0x27814(0x22970c)... done.
0x27814(0x22982c)... done.
0x27814(0x22981c)... done.
0x27814(0x229990)... done.
0x27814(0x2299c0)... done.
0x27814(0x229a64)... done.
0x27814(0x229ae4)... done.
0x27814(0x2295c8)... done.
0x27814(0x229b04)... done.
0x27814(0x229da4)... done.
0x27814(0x22a388)... done.
0x27814(0x22a3a8)... done.
0x27814(0x22a3c8)... done.
0x27814(0x22a3e8)... done.
0x27814(0x22a368)... done.
0x27814(0x2295b8)... done.
0x27814(0x22a6fc)... done.
0x27814(0x22a6ec)... done.
0x27814(0x22a750)... done.
0x27814(0x22a7a4)... done.
0x27814(0x2295a8)... done.
0x27814(0x22a8b8)... done.
0x1c2dc(0)... done.
subsystem 1b00000 // SI_SUB_LOCK - various locks
0xa400(0)... usb_quirk_init()
done.
0x27b7c(0x22a35c)... done.
0x27b7c(0x22a788)... done.
0x204e4(0)... done.
subsystem 1c00000 // SI_SUB_EVENTHANDLER - eventhandler init
0x20234(0)... done.
subsystem 2000000 // SI_SUB_KLD - KLD and module setup
0x1b694(0)... done.
0x310e0(0)... done.
subsystem 2200000 // SI_SUB_INTRINSIC - proc 0
0x30500(0)... done.
0x28c5c(0)... done.
subsystem 2300000 // SI_SUB_VM_CONF - config VM, set limits
0x23d9c(0)... done.
subsystem 2800001 // SI_SUB_SOFTINTR - start soft interrupt thread
0x1cd18(0)... done.
subsystem 3100000 // SI_SUB_DRIVERS - Let Drivers initialize
0x1b744(0x2298c4)... done. // _bsd_module_register_init(root_bus_mod)
0x1b744(0x2264ac)... done. // _bsd_module_register_init(usbus_dwcotg_mod)
0x1b744(0x226518)... done. // _bsd_module_register_init(usbus_octusb_mod)
0x1b744(0x22a514)... done. // _bsd_module_register_init(nexus_root_mod)
0x1b744(0x2265a8)... done. // _bsd_module_register_init(usbus_uss820dci_mod)
0x1b744(0x2264f4)... done. // _bsd_module_register_init(usbus_musbotg_mod)
0x1b744(0x22a650)... done. // _bsd_module_register_init(dwcotg_nexus_mod)
0x1b744(0x226488)... done. // _bsd_module_register_init(usbus_at91_udp_mod)
0x1b744(0x2265cc)... done. // _bsd_module_register_init(usbus_xhci_mod)
0x1b744(0x2264d0)... done. // _bsd_module_register_init(usbus_ehci_mod)
0x1b744(0x226584)... done. // _bsd_module_register_init(usbus_uhci_mod)
0x1b744(0x22653c)... done. // _bsd_module_register_init(usbus_ohci_mod)
0x1b744(0x226560)... done. // _bsd_module_register_init(usbus_saf1761otg_mod)
0x1b744(0x228de0)... done. // _bsd_module_register_init(umass_uhub_mod)
0x1b744(0x22922c)... done. // _bsd_module_register_init(uhub_uhub_mod)
0x1b744(0x229250)... done. // _bsd_module_register_init(uhub_usbus_mod)
subsystem 3800000 // SI_SUB_CONFIGURE - Configure devices
0x312ac(0)... done. // configure_first(NULL)
0x312c8(0)... nexus0: <RTEMS Nexus device> // configure(NULL)
done.
0x312a8(0)... done.
subsystem d800000 // SI_SUB_SYSCALLS - register system calls
0x3116c(0)... done.
subsystem fffffff // SI_SUB_LAST - final initialization
0x1d12c(0)... done.
0x28bac(0)... done.
More information about the devel
mailing list