Hello all,

I am trying to add usb_ethernet (smsc) driver for raspberry pi for both USB
and Ethernet support.

Now I have added the required files. But the USB device is not getting
power. To get the compilation error-less, I have applied a hack.


if_smsc.c is using the function “usbd_m_copy_in” which is present in the
file sys/dev/usb/usb_busdma.c. But due to this macro #if USB_HAVE_MBUF the
function was not getting compiled. So I have commented out the macro and
let the function compile.


Now ideally I should have used the DMA controller. Here I don't know the
status of DMA's functions and their usage. Any pointers on that ?

I believe the problem is secondary for the USB to function. Anyhow the USB
devices should get the power if the code is added. I suspect there is no
proper linking between the drivers. (i.e. dwcotg, bcm283x_dwcotg, ushub,
smsc, uhub, usb.) I would like some insights on how these interact.


I have added following lines in the nexus-devices.h file under
Raspberry-pi-BSP.


SYSINIT_DRIVER_REFERENCE(bcm283x_dwcotg, nexus);

SYSINIT_DRIVER_REFERENCE(smsc, uhub);

SYSINIT_DRIVER_REFERENCE(smsc, uether);

SYSINIT_DRIVER_REFERENCE(smsc, usb);

SYSINIT_DRIVER_REFERENCE(smsc, ether);

SYSINIT_DRIVER_REFERENCE(smsc, miibus);


I am also attaching the log of INIT01 Test.


I need help at this point. I am kind of stuck here.


Thank you in advance.

Deval Shah
*** LIBBSD INIT 1 TEST ***
VERBOSE_SYSINIT: DDB not enabled, symbol lookups disabled.
subsystem 880000
   0xa7fb0(0)... done.
subsystem 1000000
   0x8fd74(0)... done.
   0x1ba34(0)... done.
   0x8de24(0)... done.
subsystem 1800000
   0x8f1f8(0x112678)... done.
   0x8f1f8(0x112798)... done.
   0x8f1f8(0x112788)... done.
   0x8f1f8(0x1128fc)... done.
   0x8f1f8(0x11292c)... done.
   0x8f1f8(0x1129d0)... done.
   0x8f1f8(0x112a50)... done.
   0x8f1f8(0x112a70)... done.
   0x8f1f8(0x112b6c)... done.
   0x8f1f8(0x112534)... done.
   0x8f1f8(0x112b8c)... done.
   0x8f1f8(0x112bac)... done.
   0x8f1f8(0x1131c0)... done.
   0x8f1f8(0x113380)... done.
   0x8f1f8(0x113350)... done.
   0x8f1f8(0x113340)... done.
   0x8f1f8(0x113330)... done.
   0x8f1f8(0x113534)... done.
   0x8f1f8(0x113554)... done.
   0x8f1f8(0x11387c)... done.
   0x8f1f8(0x113d48)... done.
   0x8f1f8(0x114274)... done.
   0x8f1f8(0x114264)... done.
   0x8f1f8(0x114254)... done.
   0x8f1f8(0x114244)... done.
   0x8f1f8(0x114d44)... done.
   0x8f1f8(0x115b60)... done.
   0x8f1f8(0x115e68)... done.
   0x8f1f8(0x116690)... done.
   0x8f1f8(0x116680)... done.
   0x8f1f8(0x116670)... done.
   0x8f1f8(0x116660)... done.
   0x8f1f8(0x117728)... done.
   0x8f1f8(0x112524)... done.
   0x8f1f8(0x117ac8)... done.
   0x8f1f8(0x11838c)... done.
   0x8f1f8(0x1183ac)... done.
   0x8f1f8(0x1183cc)... done.
   0x8f1f8(0x1183ec)... done.
   0x8f1f8(0x11836c)... done.
   0x8f1f8(0x112514)... done.
   0x8f1f8(0x1186f4)... done.
   0x8f1f8(0x1186e4)... done.
   0x8f1f8(0x11877c)... done.
   0x8f1f8(0x1188ec)... done.
   0x8f1f8(0x118938)... done.
   0x8f1f8(0x1189ac)... done.
   0x8f1f8(0x118a0c)... done.
   0x8f1f8(0x118a5c)... done.
   0x8f1f8(0x118a8c)... done.
   0x8f1f8(0x118c44)... done.
   0x8f1f8(0x118ec4)... done.
   0x8f1f8(0x1191f8)... done.
   0x8f1f8(0x1192c8)... done.
   0x8f1f8(0x119498)... done.
   0x8f1f8(0x1124cc)... done.
   0x8f1f8(0x1194f8)... done.
   0x19188(0)... done.
   0x1a9ac(0)... done.
subsystem 1b00000
   0x90368(0x115064)... done.
   0x8f638(0x11892c)... done.
   0x8f638(0x1142e0)... done.
   0x8f638(0x118970)... done.
   0x8f638(0x118360)... done.
   0x90368(0x118994)... done.
   0x8f638(0x112c20)... done.
   0x8f638(0x1166fc)... done.
   0x8f638(0x112c0c)... done.
   0x90844(0x1133f8)... done.
   0x8f638(0x118abc)... done.
   0x8f638(0x118b58)... done.
   0x90368(0x118c84)... done.
   0x8f638(0x113e84)... done.
   0x8f638(0x118cac)... done.
   0x8f638(0x118dbc)... done.
   0x8f638(0x114d74)... done.
   0x8f638(0x11922c)... done.
   0x90368(0x1176dc)... done.
   0x8f638(0x112aa0)... done.
   0x8f638(0x118814)... done.
   0x8f638(0x118830)... done.
   0x8f638(0x118824)... done.
   0x9e73c(0)... done.
   0x1fbc0(0)... done.
   0x9af88(0)... done.
subsystem 1c00000
   0x1f0c4(0)... done.
subsystem 2000000
   0x19d38(0)... done.
   0x9aefc(0)... done.
subsystem 2200000
   0x98fd8(0)... done.
   0x90c80(0)... done.
subsystem 2300000
   0x8bd50(0)... done.
subsystem 2700000
   0x99db0(0)... done.
   0x196c0(0)... done.
subsystem 2800001
   0x3ce80(0)... done.
   0x1b598(0)... done.
subsystem 3000000
   0x30940(0)... done.
   0x308bc(0)... done.
   0x19de8(0x1135d4)... done.
   0x35f18(0)... done.
subsystem 3100000
   0x19de8(0x112830)... make_device:1743: root at no device as unit 0
devclass_find_internal:950: looking for root
devclass_find_internal:960: creating root
devclass_add_device:1672: (null) in devclass root
devclass_alloc_unit:1586: unit 0 in devclass root
devclass_alloc_unit:1645: now: unit 0 in devclass root
devclass_find_internal:950: looking for root
done.
   0x19de8(0x118518)... devclass_find_internal:950: looking for root
_bsd_driver_module_handler:4575: Loading module: driver nexus on bus root (pass 2147483647)
_bsd_devclass_add_driver:1083: nexus
devclass_find_internal:950: looking for nexus
devclass_find_internal:960: creating nexus
done.
   0x19de8(0x111864)... devclass_find_internal:950: looking for octusb
devclass_find_internal:960: creating octusb
_bsd_driver_module_handler:4575: Loading module: driver usbus on bus octusb (pass 2147483647)
_bsd_devclass_add_driver:1083: usbus
devclass_find_internal:950: looking for usbus
devclass_find_internal:960: creating usbus
done.
   0x19de8(0x1118f4)... devclass_find_internal:950: looking for uss820dci
devclass_find_internal:960: creating uss820dci
_bsd_driver_module_handler:4575: Loading module: driver usbus on bus uss820dci (pass 2147483647)
_bsd_devclass_add_driver:1083: usbus
devclass_find_internal:950: looking for usbus
done.
   0x19de8(0x111840)... devclass_find_internal:950: looking for musbotg
devclass_find_internal:960: creating musbotg
_bsd_driver_module_handler:4575: Loading module: driver usbus on bus musbotg (pass 2147483647)
_bsd_devclass_add_driver:1083: usbus
devclass_find_internal:950: looking for usbus
done.
   0x19de8(0x1117d4)... devclass_find_internal:950: looking for at91_udp
devclass_find_internal:960: creating at91_udp
_bsd_driver_module_handler:4575: Loading module: driver usbus on bus at91_udp (pass 2147483647)
_bsd_devclass_add_driver:1083: usbus
devclass_find_internal:950: looking for usbus
done.
   0x19de8(0x111918)... devclass_find_internal:950: looking for xhci
devclass_find_internal:960: creating xhci
_bsd_driver_module_handler:4575: Loading module: driver usbus on bus xhci (pass 2147483647)
_bsd_devclass_add_driver:1083: usbus
devclass_find_internal:950: looking for usbus
done.
   0x19de8(0x11181c)... devclass_find_internal:950: looking for ehci
devclass_find_internal:960: creating ehci
_bsd_driver_module_handler:4575: Loading module: driver usbus on bus ehci (pass 2147483647)
_bsd_devclass_add_driver:1083: usbus
devclass_find_internal:950: looking for usbus
done.
   0x19de8(0x1118d0)... devclass_find_internal:950: looking for uhci
devclass_find_internal:960: creating uhci
_bsd_driver_module_handler:4575: Loading module: driver usbus on bus uhci (pass 2147483647)
_bsd_devclass_add_driver:1083: usbus
devclass_find_internal:950: looking for usbus
done.
   0x19de8(0x111888)... devclass_find_internal:950: looking for ohci
devclass_find_internal:960: creating ohci
_bsd_driver_module_handler:4575: Loading module: driver usbus on bus ohci (pass 2147483647)
_bsd_devclass_add_driver:1083: usbus
devclass_find_internal:950: looking for usbus
done.
   0x2d008(0)... done.
   0x19de8(0x111a38)... devclass_find_internal:950: looking for smsc
devclass_find_internal:960: creating smsc
_bsd_driver_module_handler:4575: Loading module: driver miibus on bus smsc (pass 2147483647)
_bsd_devclass_add_driver:1083: miibus
devclass_find_internal:950: looking for miibus
devclass_find_internal:960: creating miibus
done.
   0x19de8(0x111abc)... devclass_find_internal:950: looking for uhub
devclass_find_internal:960: creating uhub
_bsd_driver_module_handler:4575: Loading module: driver smsc on bus uhub (pass 2147483647)
_bsd_devclass_add_driver:1083: smsc
devclass_find_internal:950: looking for smsc
done.
   0x19de8(0x112028)... devclass_find_internal:950: looking for uhub
_bsd_driver_module_handler:4575: Loading module: driver uhub on bus uhub (pass 2147483647)
_bsd_devclass_add_driver:1083: uhub
devclass_find_internal:950: looking for uhub
done.
   0x19de8(0x11204c)... devclass_find_internal:950: looking for usbus
_bsd_driver_module_handler:4575: Loading module: driver uhub on bus usbus (pass 2147483647)
_bsd_devclass_add_driver:1083: uhub
devclass_find_internal:950: looking for uhub
done.
   0x19de8(0x1113dc)... devclass_find_internal:950: looking for nexus
_bsd_driver_module_handler:4575: Loading module: driver bcm283x_dwcotg on bus nexus (pass 2147483647)
_bsd_devclass_add_driver:1083: bcm283x_dwcotg
devclass_find_internal:950: looking for bcm283x_dwcotg
devclass_find_internal:960: creating bcm283x_dwcotg
devclass_find_internal:950: looking for dwcotg
devclass_find_internal:960: creating dwcotg
done.
   0x19de8(0x1114a8)... devclass_find_internal:950: looking for simplebus
devclass_find_internal:960: creating simplebus
_bsd_driver_module_handler:4575: Loading module: driver dwcotg on bus simplebus (pass 2147483647)
_bsd_devclass_add_driver:1083: dwcotg
devclass_find_internal:950: looking for dwcotg
done.
   0x19de8(0x1118ac)... devclass_find_internal:950: looking for saf1761otg
devclass_find_internal:960: creating saf1761otg
_bsd_driver_module_handler:4575: Loading module: driver usbus on bus saf1761otg (pass 2147483647)
_bsd_devclass_add_driver:1083: usbus
devclass_find_internal:950: looking for usbus
done.
   0x19de8(0x1117f8)... devclass_find_internal:950: looking for dwcotg
_bsd_driver_module_handler:4575: Loading module: driver usbus on bus dwcotg (pass 2147483647)
_bsd_devclass_add_driver:1083: usbus
devclass_find_internal:950: looking for usbus
done.
subsystem 3800000
   0xa7f90(0)... _bsd_device_add_child_ordered:1858: nexus at root with order 0 as unit 0
make_device:1743: nexus at root as unit 0
devclass_find_internal:950: looking for nexus
devclass_add_device:1672: (null) in devclass nexus
devclass_alloc_unit:1586: unit 0 in devclass nexus
devclass_alloc_unit:1645: now: unit 0 in devclass nexus
done.
   0x9bfc0(0)... done.
   0x9bbb8(0)... done.
   0x991f4(0)... done.
   0x9bc2c(0)... done.
   0xa7fac(0)... _bsd_root_bus_configure:4541: .
devclass_find_driver_internal:1325: nexus in devclass root
_bsd_device_probe_child:2063: Trying nexus
_bsd_device_add_child_ordered:1858: bcm283x_dwcotg at nexus with order 0 as unit 0
make_device:1743: bcm283x_dwcotg at nexus as unit 0
devclass_find_internal:950: looking for bcm283x_dwcotg
devclass_add_device:1672: (null) in devclass bcm283x_dwcotg
devclass_alloc_unit:1586: unit 0 in devclass bcm283x_dwcotg
devclass_alloc_unit:1645: now: unit 0 in devclass bcm283x_dwcotg
nexus0: <RTEMS Nexus device>
devclass_find_driver_internal:1325: bcm283x_dwcotg in devclass nexus
_bsd_device_probe_child:2063: Trying bcm283x_dwcotg
bcm283x_dwcotg0: <DWC OTG 2.0 integrated USB controller (bcm283x)> on nexus0
_bsd_device_add_child_ordered:1858: usbus at bcm283x_dwcotg with order 0 as unit -1
make_device:1743: usbus at bcm283x_dwcotg as unit -1
devclass_find_internal:950: looking for usbus
devclass_add_device:1672: (null) in devclass usbus
devclass_alloc_unit:1586: unit -1 in devclass usbus
devclass_alloc_unit:1645: now: unit 0 in devclass usbus
devclass_find_driver_internal:1325: usbus in devclass bcm283x_dwcotg
devclass_find_driver_internal:1332: not found
devclass_find_driver_internal:1325: usbus in devclass dwcotg
_bsd_device_probe_child:2063: Trying usbus
usbus0 on bcm283x_dwcotg0
devclass_find_internal:950: looking for usbus
done.
   0xa7f8c(0)... done.
subsystem 7000000
   0xa11f8(0)... done.
   0x7dca0(0)... done.
   0xa33e8(0)... done.
   0x19de8(0x1177ac)... done.
   0x7cae8(0)... done.
   0x19de8(0x1139c8)... vlan: initialized, using hash tables with chaining
done.
   0x19de8(0x118f4c)... done.
   0xa24b4(0)... done.
   0x19de8(0x111be0)... done.
   0x9949c(0)... done.
   0x19de8(0x113730)... done.
subsystem 8000000
   0xa1998(0)... done.
subsystem 8600000
   0x26b78(0)... done.
   0x9cd48(0)... done.
subsystem 8800000
   0x9d178(0x112d4c)... done.
   0x9d178(0x114674)... done.
   0x9d178(0x113e14)... done.
   0x9d178(0x11682c)... done.
   0x9d0e0(0x112d4c)... done.
   0x9d0e0(0x113e14)... done.
   0x9d0e0(0x11682c)... done.
   0x9d0e0(0x114674)... done.
   0x409d8(0)... done.
   0x3ec04(0)... done.
   0x3ec68(0)... done.
   0x4a3b4(0)... done.
   0x76d8c(0)... done.
   0x42ba0(0)... done.
subsystem 8800001
   0xa1f28(0)... done.
   0x9cdc4(0)... done.
   0x30d10(0)... done.
   0x19de8(0x113870)... done.
   0x19de8(0x118eb8)... done.
   0x3a24c(0)... lo0: bpf attached
done.
subsystem d800000
   0x9c148(0)... done.
subsystem fffffff
   0x1b9ac(0)... done.
usbus0: 480Mbps High Speed USB v2.0
   0x90bd0(0)... done.
_bsd_device_add_child_ordered:1858: (null) at usbus with order 0 as unit -1
make_device:1743: (null) at usbus as unit -1
_bsd_device_probe_child:2063: Trying uhub
devclass_find_internal:950: looking for uhub
devclass_add_device:1672: (null) in devclass uhub
devclass_alloc_unit:1586: unit -1 in devclass uhub
devclass_alloc_unit:1645: now: unit 0 in devclass uhub
devclass_delete_device:1711: uhub in devclass uhub
devclass_find_internal:950: looking for uhub
devclass_add_device:1672: (null) in devclass uhub
devclass_alloc_unit:1586: unit -1 in devclass uhub
devclass_alloc_unit:1645: now: unit 0 in devclass uhub
uhub0: <DWCOTG OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
Sleeping to see what happens
uhub0: 1 port with 1 removable, self powered
Stack usage by thread
    ID      NAME    LOW          HIGH     CURRENT     AVAILABLE     USED
0x09010001  IDLE 0x130c00 - 0x131bff 0x131b98      4080        128
0x0a010001  UI1  0x131e18 - 0x139e17 0x139a40     32752       1008
0x0a010002  TIME 0x13a568 - 0x142567 0x1424a8     32752        332
0x0a010003  IRQS 0x142570 - 0x14a56f 0x14a4b0     32752        308
0x0a010004  _BSD 0x15ce48 - 0x164e47 0x164d80     32752        240
0x0a010005  _BSD 0x164fa0 - 0x16cf9f 0x16ced8     32752        336
0x0a010006  _BSD 0x16fd68 - 0x177d67 0x177ca8     32752        232
0x0a010007  _BSD 0x177f08 - 0x17ff07 0x17fe40     32752        240
0x0a010008  _BSD 0x17ffc8 - 0x187fc7 0x187f08     32752        232
0x0a010009  _BSD 0x188168 - 0x190167 0x1900a0     32752        240
0x0a01000a  _BSD 0x191388 - 0x199387 0x1992c8     32752        232
0x0a01000b  _BSD 0x1993f0 - 0x1a13ef 0x1a1330     32752        232
0x0a01000c  _BSD 0x1a1458 - 0x1a9457 0x1a9398     32752        232
0x0a01000d  _BSD 0x1a94c0 - 0x1b14bf 0x1b1400     32752        936
0x0a01000e  _BSD 0x1b1528 - 0x1b9527 0x1b9468     32752        232
*** END OF TEST LIBBSD INIT 1 ***

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to