CPU Cache and busdma usage in USB
Olivier Houchard
cognet at ci0.org
Fri Jul 17 12:48:32 UTC 2009
On Fri, Jul 17, 2009 at 12:23:57PM +0200, Rafal Jaworowski wrote:
>
> >With the following patch in arm/cpufunc.c my UMASS device gets
> >detected at
> >boot time (KB9202B ARM board). Else I get a USB request timeout
> >followed by a
> >panic. But data transfers of more than 16KByte are likely to be
> >broken.
> >
> >struct cpu_functions arm9_cpufuncs = {
> >...
> >- /*XXX*/ arm9_dcache_wbinv_range, /* dcache_inv_range */
> >+ /*XXX*/ arm9_dcache_inv_range, /* dcache_inv_range */
> >
> >};
>
> Hm, this looks indeed strange, but I have no idea why both methods
> point to _wbinv_range; it seems like it was there from the beginning.
> I also looked at NetBSD code (from which FreeBSD/arm originates) and
> they still have it this way too...
>
> Olivier, any thoughts why this was done this way?
>
> (FYI: the cpu we work with fall under ARM9E/ARM10, but the situation
> with dcache_inv_range() is similar as for ARM9 case above).
>
I can't get the reason why it's this way, reading the CVS logs from
NetBSD doesn't enlight me, but I'm pretty sure we should switch to use
the proper function for _inv_range, as done in this patch. That's what we
do for Xscale/Xscale core 3 anyway, and if it breaks something, we should
jut fix it.
Olivier
More information about the freebsd-usb
mailing list