USB Storage Device(s) not found
Hello,
I'm just working on USB support for mips au1100 based board.
The problem is that when I do:
WWPC # usb start
I get:
...
DEBUG: RET(rh) URB:[ 0] dev: 1,ep: 0-I,type:CTRL,len:4/4 stat:0x0
au1x00_usb_ohci.c: cmd(8): a3 00 00 00 02 00 04 00 au1x00_usb_ohci.c: data(4/4): 01 01 12 00
cannot reset port 2!?
1 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
An USB pen is into the USB host port and if I do:
WWPC # usb tree
I get:
Device Tree:
1 Hub (12MBit/s, 0mA)
OHCI Root Hub
Since I have an au1100 I also modified the initialization code as follow:
cpu/mips/au1x00_usb_ohci.c +22 -0
@@ -1581,6 +1582,7 @@ int usb_lowlevel_init(void)au_writel (sys_freqctrl,SYS_FREQCTRL0 );/* zero and disable USBH/USBD clocks */ +#if 0 sys_clksrc =au_readl (SYS_CLKSRC ); sys_clksrc &= ~0x00007FE0 ;au_writel (sys_clksrc,SYS_CLKSRC );
@@ -1590,6 +1592,17 @@ int usb_lowlevel_init(void) sys_clksrc =au_readl (SYS_CLKSRC ); sys_clksrc &= ~0x00007FE0 ; +#else + sys_clksrc =au_readl (SYS_CLKSRC ); + sys_clksrc &= ~0x0000001F ; +au_writel (sys_clksrc,SYS_CLKSRC ); + + sys_freqctrl =au_readl (SYS_FREQCTRL0 ); + sys_freqctrl &= ~0xFFF00000 ; + + sys_clksrc =au_readl (SYS_CLKSRC ); + sys_clksrc &= ~0x0000001F ; +#endif switch (prid &0x000000FF ) {case 0x00 :/* DA */
@@ -1621,6 +1634,7 @@ int usb_lowlevel_init(void)/* * Route 48MHz FREQ2 into USB Host and/or Device */ +#if 0 sys_clksrc |= ((4 <<12 ) | (0 <<11 ) | (0 <<10 ));au_writel (sys_clksrc,SYS_CLKSRC );
@@ -1630,6 +1644,15 @@ int usb_lowlevel_init(void)au_writel (pin_func,SYS_PINFUNC );au_writel (0x2800 ,SYS_TRIOUTCLR );au_writel (0x0030 ,SYS_OUTPUTCLR ); +#else + sys_clksrc |= ((4 <<2 ) | (0 <<1 ) |0 ); +au_writel (sys_clksrc,SYS_CLKSRC ); + +/* Set USB functionality pin state as device */ + pin_func =au_readl (SYS_PINFUNC ) & (u32)(~0x8000 ); + pin_func &= ~0x8000 ; +au_writel (pin_func,SYS_PINFUNC ); +#endif dbg ("OHCI board setup complete\n" );
This code is the same that I use into Linux and it works correctly!
Someone have some suggestions? Have someone already used the USB support for mips boards? :-o
Thanks in advance,
Rodolfo
Signature · 4 lines
GNU/Linux Solutions e-mail: giometti at enneenne.com Linux Device Driver giometti at gnudd.com Embedded Systems [email protected] UNIX programming phone: +39 349 2432127
Quoted 2 lines · Rodolfo Giometti
I'm just working on USB support for mips au1100 based board.
After looking better at the code I found that file "cpu/mips/au1x00_usb_ohci.c" is derived from "cpu/arm920t/at91rm9200/usb_ohci.c". The differences are very minimal so I think the problem is during USB controller setup...
Doing:
(Re)start USB...
USB: scanning bus for devices...
USB device not responding, giving up (status=20)
2 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
so I think that the system found the USB key but cannot connect with it. In fact removing the USB pen the system say "1 USB Device(s) found".
May someone help me in understanding why this happens? I'm not a OpenHCI guru :) and perhaps some good suggestions may help me in finding the solution!
Thanks in advance,
Rodolfo
Signature · 11 lines
GNU/Linux Solutions e-mail: giometti at enneenne.com Linux Device Driver giometti at gnudd.com Embedded Systems giometti at linux.it UNIX programming phone: +39 349 2432127 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://lists.denx.de/pipermail/u-boot/attachments/20060412/89af7fdf/attachment.pgp