* Porting Au1x000 USB host controller on u-boot
@ 2006-05-04 9:53 Rodolfo Giometti
2006-05-04 17:06 ` Sergei Shtylyov
0 siblings, 1 reply; 7+ messages in thread
From: Rodolfo Giometti @ 2006-05-04 9:53 UTC (permalink / raw)
To: linux-mips
Hello,
I'm trying to implement support for USB host into u-boot. I
initialized the USB controller just as linux does, the EDs and the TDs
look like good in memory but the controller seems not well reading
them and on the bus I see random USB messages...
I think that there could be some problem on memory coherency... some
suggestion?
Thanks,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@enneenne.com
Linux Device Driver giometti@gnudd.com
Embedded Systems giometti@linux.it
UNIX programming phone: +39 349 2432127
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Porting Au1x000 USB host controller on u-boot
2006-05-04 9:53 Porting Au1x000 USB host controller on u-boot Rodolfo Giometti
@ 2006-05-04 17:06 ` Sergei Shtylyov
2006-05-04 17:10 ` Sergei Shtylyov
2006-05-04 17:16 ` Sergei Shtylyov
0 siblings, 2 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2006-05-04 17:06 UTC (permalink / raw)
To: Rodolfo Giometti; +Cc: Linux-MIPS
Hello,
Rodolfo Giometti wrote:
> I'm trying to implement support for USB host into u-boot. I
> initialized the USB controller just as linux does, the EDs and the TDs
> look like good in memory but the controller seems not well reading
> them and on the bus I see random USB messages...
>
> I think that there could be some problem on memory coherency... some
> suggestion?
Be sure to set Config0.OD (bit 19), it's proven to fix the USB-related
lockups on Au1500 at least. See arch/mips/common/cputable.c for the CPU
steppings where it must be set to mask various errata. Also, try to disable
USB controller's DMA coherency in the USB enable register (there's a related
errata in all Au1xx0 family) -- the Linux driver doesn't do this though, and
this shouldn't matter unless you're modifying USB buffers on the fly. :-)
Also, note that this magic bit may be write only, so make sure it's set on
every write to CP0 Config0 reg. See this patch:
http://www.linux-mips.org/archives/linux-mips/2006-03/msg00243.html
> Thanks,
>
> Rodolfo
WBR, Sergei
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Porting Au1x000 USB host controller on u-boot
2006-05-04 17:06 ` Sergei Shtylyov
@ 2006-05-04 17:10 ` Sergei Shtylyov
2006-05-04 17:16 ` Sergei Shtylyov
1 sibling, 0 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2006-05-04 17:10 UTC (permalink / raw)
To: Rodolfo Giometti; +Cc: Linux-MIPS
Hello,
Sergei Shtylyov wrote:
>> I'm trying to implement support for USB host into u-boot. I
>> initialized the USB controller just as linux does, the EDs and the TDs
>> look like good in memory but the controller seems not well reading
>> them and on the bus I see random USB messages...
>> I think that there could be some problem on memory coherency... some
>> suggestion?
> Be sure to set Config0.OD (bit 19), it's proven to fix the
> USB-related lockups on Au1500 at least. See arch/mips/common/cputable.c
arch/mips/au1000/common/cputable.c, I mean... :-)
WBR, Sergei
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Porting Au1x000 USB host controller on u-boot
2006-05-04 17:06 ` Sergei Shtylyov
2006-05-04 17:10 ` Sergei Shtylyov
@ 2006-05-04 17:16 ` Sergei Shtylyov
2006-05-04 17:16 ` Sergei Shtylyov
2006-05-04 17:21 ` Rodolfo Giometti
1 sibling, 2 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2006-05-04 17:16 UTC (permalink / raw)
Cc: Rodolfo Giometti, Linux-MIPS
Hello, I wrote:
>> I'm trying to implement support for USB host into u-boot. I
>> initialized the USB controller just as linux does, the EDs and the TDs
>> look like good in memory but the controller seems not well reading
>> them and on the bus I see random USB messages...
>> I think that there could be some problem on memory coherency... some
>> suggestion?
> try to disable USB controller's DMA coherency in the USB enable register
> (there's a related errata in all Au1xx0 family) -- the Linux driver
> doesn't do this though, and this shouldn't matter unless you're
> modifying USB buffers on the fly. :-)
AND make sure every buffer/TD/ED is written back / invalidated from cache
before the OHCI accesses them since the cache coherency on Au1xx0 is b0rken!
WBR, Sergei
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Porting Au1x000 USB host controller on u-boot
2006-05-04 17:16 ` Sergei Shtylyov
@ 2006-05-04 17:16 ` Sergei Shtylyov
2006-05-04 17:21 ` Rodolfo Giometti
1 sibling, 0 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2006-05-04 17:16 UTC (permalink / raw)
Cc: Rodolfo Giometti, Linux-MIPS
Hello, I wrote:
>> I'm trying to implement support for USB host into u-boot. I
>> initialized the USB controller just as linux does, the EDs and the TDs
>> look like good in memory but the controller seems not well reading
>> them and on the bus I see random USB messages...
>> I think that there could be some problem on memory coherency... some
>> suggestion?
> try to disable USB controller's DMA coherency in the USB enable register
> (there's a related errata in all Au1xx0 family) -- the Linux driver
> doesn't do this though, and this shouldn't matter unless you're
> modifying USB buffers on the fly. :-)
AND make sure every buffer/TD/ED is written back / invalidated from cache
before the OHCI accesses them since the cache coherency on Au1xx0 is b0rken!
WBR, Sergei
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Porting Au1x000 USB host controller on u-boot
2006-05-04 17:16 ` Sergei Shtylyov
2006-05-04 17:16 ` Sergei Shtylyov
@ 2006-05-04 17:21 ` Rodolfo Giometti
2006-05-04 17:26 ` Sergei Shtylyov
1 sibling, 1 reply; 7+ messages in thread
From: Rodolfo Giometti @ 2006-05-04 17:21 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Linux-MIPS
[-- Attachment #1: Type: text/plain, Size: 645 bytes --]
On Thu, May 04, 2006 at 09:16:19PM +0400, Sergei Shtylyov wrote:
>
> AND make sure every buffer/TD/ED is written back / invalidated from
> cache before the OHCI accesses them since the cache coherency on Au1xx0 is
> b0rken!
Mmm... good suggestion! :) How can I invalidated the cache? Can you
please show me some example code?
Thanks _a lot_!
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@enneenne.com
Linux Device Driver giometti@gnudd.com
Embedded Systems giometti@linux.it
UNIX programming phone: +39 349 2432127
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Porting Au1x000 USB host controller on u-boot
2006-05-04 17:21 ` Rodolfo Giometti
@ 2006-05-04 17:26 ` Sergei Shtylyov
0 siblings, 0 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2006-05-04 17:26 UTC (permalink / raw)
To: Rodolfo Giometti; +Cc: Linux-MIPS
Hello.
Rodolfo Giometti wrote:
>> AND make sure every buffer/TD/ED is written back / invalidated from
>> cache before the OHCI accesses them since the cache coherency on Au1xx0 is
>>b0rken!
Or, better yet, access TD/ED (and, if possible, the buffers) via uncached
KSEG1 only.
> Mmm... good suggestion! :) How can I invalidated the cache? Can you
> please show me some example code?
Dig in arch/mips/mm/c-r4k.c...
> Thanks _a lot_!
>
> Rodolfo
WBR, Sergei
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-05-04 17:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-04 9:53 Porting Au1x000 USB host controller on u-boot Rodolfo Giometti
2006-05-04 17:06 ` Sergei Shtylyov
2006-05-04 17:10 ` Sergei Shtylyov
2006-05-04 17:16 ` Sergei Shtylyov
2006-05-04 17:16 ` Sergei Shtylyov
2006-05-04 17:21 ` Rodolfo Giometti
2006-05-04 17:26 ` Sergei Shtylyov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox