At Wed, 22 May 2002 09:29:57 -0400, Paul Davis wrote: > > >> >anyway... after looking at the hdsp code again, i found that these > >> >endian conversions are not necessary at all! > >> >IIRC, readX/writeX already convert the endianess in itself. thus, the > >> > >> absolutely not. readl/writel on most architectures translate to: > >> > >> *addr = val; > >> > > > >really? for example, ppc uses in_le32() for readl(), which implies > >byte swapping. > > what does CONFIG_APUS do? thats the conditional on which in_le32 is > used or not. AFAIK, readl is not supposed to have > endian-characteristics, but if true, that would make the non-APUS ppc > version totally wrong.
CONFIG_APUS is for amiga. it's not set usually. i have no idea about APUS, but it looks like the BE interface. basically PCI bus is accessed as LE. that's why in_le32 is used there. we can access to io without considration of endianess as long as using readX/writeX. (for direct access, you can use __raw_readX() macros.) > on x86: > > #define __io_virt(x) ((void *)(x)) > #define readl(addr) (*(volatile unsigned int *) __io_virt(addr)) > #define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) yep, on LE architectures, no conversion is necessary. Takashi _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel