[U-Boot] u-boot-usb for avr32 ap7000

Marcel korgull at home.nl
Mon Feb 8 21:13:01 CET 2010


Hi,

I'm trying to port the USB device controller stuff for the AP7000 to u-boot.
Last week I found some items being checked into u-boot-usb so I gave it a go 
to port things. Some code is used from the at91_udc driver and some parts I 
used from the atmel_usba_udc linux driver.
I've come to a point where some parts seem functional but when I connect the 
USB host it results in an immediate crash. When I do not connect the host, u-
boot works well.
Somehow I can't really figure out what is happening when I connect my USB 
cable. I do see that the host asks for a device descriptor and I do see it 
gets acknowledged (but wrongly) by the device (by USB analyzer). 
The main issue is that I can't figure out what gets called first when the host 
asks for the device descriptor.

Since the full code is a bit long, I just included some debug messaging below 
which shows which parts are handled (probably correctly by my code). 

If someone has some ideas to what I can do to debug this or has some pointers 
to what happens when the hosts asks for the descriptor that would be great. I 
have the feeling I'm nearly there making this to work but probably missed out 
a tiny item along the way and been staring at the code for the past two days.

Best regards,
Marcel

U-Boot code: (null) -> 00011cf8  data: 000192e0 -> 0004f3b0
DMA: Using memory from 0x13f6c000 to 0x13f70000
Flash:  8 MB at address 0x00000000
DRAM Configuration:
Bank #0: 10000000 64 MB
In:    serial
Out:   serial
Err:   serial
Net:   USBA : Probing USB controller
USBA : int requests
Initialized EP 0
Initialized EP 1
Initialized EP 2
Initialized EP 3
Initialized EP 4
Initialized EP 5
Initialized EP 6
USB disabled
ETHUSB : INIT !
ETHUSB : addr valid 
ETHUSB : addr valid 
USBA : registering driver
Binding ethernet
Ethernet number 24
Setting IN/OUT bulk stuff
AutoEP :autoconfig reset
Doing autoconfig
AutoEP : EP autoconfig
AutoEP : EP matches
AutoEP : EP autoconfig
AutoEP : EP matches
AutoEP : EP matches
AutoEP : EP autoconfig
AutoEP : EP matches
AutoEP : EP matches
AutoEP : EP matches
AutoEP : EP matches
USBA : Set self powered
ETHUSB : get address 00:1F:E5:00:12:5D
ETHUSB : get address 0a:fa:63:8b:e8:0a
using atmel_usba_udc, OUT ep2 IN ep1 STATUS ep4
MAC 00:1f:e5:00:12:5d
HOST MAC 0a:fa:63:8b:e8:0a
USBA : EP alloc request
USBA : alloc request
USBA : EP alloc request
USBA : alloc request
USBA : Enabled UDC 1
USBA : Enabled UDC 2
USBA : Enabled controller
macb0, usb0
Press SPACE to abort autoboot in 3 seconds

 *** Unhandled exception 0 at PC=0x00000000
   pc: 00000000    lr: 13fb6384    sp: 13f6bed4   r12: 00801a1a
  r11: 00000000   r10: 051b3c56    r9: 00000000    r8: ffe00c14
   r7: 00000001    r6: 13fca4c8    r5: 13f6bfa8    r4: 13f6bf3c
   r3: 13f6bf3c    r2: 00000000    r1: 00000000    r0: 13f6bf0c
Flags: qvnzc
Mode bits: hrje....g
CPU Mode: Application

Stack: (0x13f6bed4 to 0x13f6bfa8)
bec0:                                              13fb658e 00000001 13fca4c8 
bee0: 13f6bfa8 13f6bf3c 13fb7aa8 00000001 13fca4c8 13f6bfa8 13f6bf3c 00000000 
bf00: 1a03f127 13f74087 13fc61a8 00000001 00000001 00000000 00000000 00000001 
bf20: 13fc26ac 00000001 00000000 00000000 00000000 00000000 13f84100 13fb0c28 
bf40: 13fcb4c4 13fca4c8 13f6bfa8 13f84100 00000000 00006438 13fb072e 13f6bfd4 
bf60: 13fca4c8 13f6bfa8 00000000 13f6bfd4 13fcb4b4 00000000 13fc92e0 13fb01cc 
bf80: 04000000 13fca4c8 24007fb4 13fc1ef8 cde3089c 13fb0000 00000000 13fc92e0 
bfa0: 00000000 00000000                                                       
Unhandled exception


More information about the U-Boot mailing list