From: <hei...@at...> - 2000-08-09 11:49:10
|
----- Original Message ----- From: "Geert Uytterhoeven" <ge...@li...> To: "Arno Griffioen" <gri...@ps...> Cc: <fh...@at...>; <lin...@li...> Sent: Tuesday, July 18, 2000 2:18 PM Subject: Re: APUS bus access > On Tue, 18 Jul 2000, Arno Griffioen wrote: > BTW, I see some things in <asm/io.h> that shouldn't be there: > > #if defined(CONFIG_APUS) > #define inw(port) in_be16((u16 *)((port)+_IO_BASE)) > #define outw(val, port) out_be16((u16 *)((port)+_IO_BASE), (val)) > #define inl(port) in_be32((u32 *)((port)+_IO_BASE)) > #define outl(val, port) out_be32((u32 *)((port)+_IO_BASE), (val)) > #else > > Since APUS doesn't have I/O space, these should not be defined at all. > > [ Hmm, they are defined to in_be16() and friends. Why??? ] > In the MMIO 53c770 driver readw, readl, writew, writel are used when both the driver and SCSI chip are in big endian mode. I was just looking in asm-ppc and in io.h it has #define readw(addr) in_le16((volatile unsigned short *)addr)) and #define readl(addr) in_le32((volatile unsigned *)addr)). Why is the "le"? Shouldn't this be "be". The writel is also defined as out_le32(). Is APUS big endian or little endian. Is M68K Linux big endian or little endian? Am I so confused about this? Can someone explain it to me? I always think big endian == m68k, sparc; little endian == intel, alpha. Is the Amiga different? What is Power Macintosh Linux? BTW I tried writing 0xee00ff11 to a 32 bit register on the '770 chip and got 0xff11 back. Fred |