[U-Boot-Users] U-Boot help request for OHCI driver with CPU cache on

Ryan CHEN
2008-05-19T01:47:48Z

Yes, I have tried the first suggestion from Matthias Fuchs. But make it working with cache is very complex. So now I am trying the way that map one TLB entry to make USB hcca and data struct in uncached region. I think it's a easy way but not suitable for other platform.

Best Regards,
Ryan Chen

-----Original Message-----
From: Markus Klotzb?cher [mailto:mk at denx.de]
Sent: Saturday, May 17, 2008 12:25 AM
To: Matthias Fuchs
Cc: u-boot-users at lists.sourceforge.net; Ryan CHEN; ebenard at eukrea.com; weissg at vienna.at; Zhang Wei
Subject: Re: [U-Boot-Users] U-Boot help request for OHCI driver with CPU cache on

Hi Matthias,

Matthias Fuchs <matthias.fuchs@esd-electronics.com> writes:

> On Thursday 15 May 2008 10:37:04 Markus Klotzb?cher wrote:
>> > Could you suggest me how to solve the problem?
>> > Is there any specific part of USB driver that requires cache handling?
>>
>> None that I'm aware of, but I could imagine that enabling caches
>> might cause some kind of problems.
> With U-Boot's current OHCI implementation you will run into trouble at
> least with cache incoherent CPUs like the 4xx PowerPCs. The 4xx_enet
> driver has been modified to deal with this stuff when data caches are enabled.
> The USB OHCI driver will also need that kind of fixing (making the
> code very ugly). An other approach would be to put the USB DMA
> accessable memory into some non-cached memory. Perhaps this is much more simple.

Thanks for the explanation. Yes I agree that this is likely the problem.

I'm wondering if the benefits of having the cache enabled is worth the pain of fixing (= making the code uglier) this at all. I somehow doubt it.