From: <fh...@at...> - 2000-08-10 00:02:34
|
In <Pine.LNX.4.10.10008091645550.416-100000@cassiopeia.home>, on 08/09/00 at 04:56 PM, Geert Uytterhoeven <ge...@li...> said: >On Wed, 9 Aug 2000 hei...@at... wrote: >Ideally, readl() and friends are meant for _PCI_ memory space only, and >PCI is per definition little endian. Hmmm. So those functions are meant for folks that use PowerMacs? I was thinking today that those functions had to be OK because APUS drivers must use them. Perhaps this is not the case? >However, the MMIO 53c770 driver currently works on SPARC only. At least >on SPARC64, you can specify the endiannes of a page in the MMU page >tables. So on SPARC64, the page tables will be set up such that readl() >will be little endian on PCI memory space and big endian on SBUS memory >space. Nice for driver writers, readl() is always correct :-) I gather the '770 chip is used on an SBUS card and there is a Linux driver for it then? I have a rather old version of the 53c770 files that was made known to me by someone on the APUS list. Perhaps I should be using the SPARC version instead. >I suggest you add > #elif defined(CONFIG_APUS) > #define readl_l2b(a,b) in_be32(b,a) > ... If I define that both the PPC and and the '770 chip are big endian then I don't think that the readl_l2b is defined. But I will experiment with using the in_be32 function. >to sym53c8xx_defs.h (or use le32 if the wiring on the board turns out to >be different), for clarity. I really don't want to open my Amiga to see how the '770 chip is wired to the PPC. I'm not sure if I could tell by just looking at it anyway. It is most likely possible to find out with a logic probe, since I think the endianess is set by wiring some pins with the correct logic values. At least I thought I read that somewhere. >> 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? >m68k is big endian >PPC can be both (PPC had to run NT, sigh), but Linux/PPC is big endian >MIPS can be both: little endian on e.g. DECstation, big endian on SGI >> BTW I tried writing 0xee00ff11 to a 32 bit register on the '770 chip and got >> 0xff11 back. >And it's a register that allows reading back the same value? There are three registers, off hand, that should be able to R/W 32 bit values, they are TEMP, SCRATCHA, and SCRATCHB. Actually there are a number of SCRATCHx registers, so probably more than three. >OK, so you know at least how to access the least significant short. Now >you have to find out where the upper part went to, or where it has to go >to. Yep. >Is there any read register for which you can guess what you should read? >Some chip id or revision number register? I don't see one by looking in the programming guide, right at the moment. Fred |