I just got a few minutes free so I can follow up on my own mail a week ago:
On May 2, 10:50, I wrote about my Olivetti & 1.3.96:
>My 3c503 ethernet board works fine now, in PIO mode. There's still something
>wrong with the shared mem detection, I'll come back to that when I get time
First, I had to patch io.h a little (mismatched parentheses) in order to be
able to compile 3c503.c.
--- include/asm-mips/io.h.orig Sun Mar 24 23:45:49 1996
+++ include/asm-mips/io.h Wed May 1 14:00:01 1996
@@ -79,13 +79,13 @@
* differently. On the x86 architecture, we just read/write the
* memory location directly.
*/
-#define readb(addr) (*(volatile unsigned char *) ((isa_slot_offset + (unsigned
long)addr))
-#define readw(addr) (*(volatile unsigned short *) ((isa_slot_offset +
(unsigned long)addr))
-#define readl(addr) (*(volatile unsigned int *) ((isa_slot_offset + (unsigned
long)addr))
+#define readb(addr) (*(volatile unsigned char *) ((isa_slot_offset + (unsigned
long)addr)))
+#define readw(addr) (*(volatile unsigned short *) ((isa_slot_offset +
(unsigned long)addr)))
+#define readl(addr) (*(volatile unsigned int *) ((isa_slot_offset + (unsigned
long)addr)))
-#define writeb(b,addr) ((*(volatile unsigned char *) ((isa_slot_offset +
(unsigned long)addr)) = (b))
-#define writew(b,addr) ((*(volatile unsigned short *) ((isa_slot_offset +
(unsigned long)addr)) = (b))
-#define writel(b,addr) ((*(volatile unsigned int *) ((isa_slot_offset +
(unsigned long)addr)) = (b))
+#define writeb(b,addr) ((*(volatile unsigned char *) ((isa_slot_offset +
(unsigned long)addr)) = (b)))
+#define writew(b,addr) ((*(volatile unsigned short *) ((isa_slot_offset +
(unsigned long)addr)) = (b)))
+#define writel(b,addr) ((*(volatile unsigned int *) ((isa_slot_offset +
(unsigned long)addr)) = (b)))
#define memset_io(a,b,c) memset((void *)(isa_slot_offset + (unsigned
long)a),(b),(c))
#define memcpy_fromio(a,b,c) memcpy((a),(void *)(isa_slot_offset + (unsigned
long)b),(c))
(If that's they way it's meant to be or not is not completely clear.. see below)
Secondly, when the 3c503.c probe code tries to use readb(0xddffe) it fails
with a kernel error (right now I can't provide the exact error, but I can re-
create the error and write it down later if needed).
So what I had to do to get up and running was to disable the part of the code
in 3c503.c (el2_probe) that probes for shared memory. This is because the
3c503 code tries shared memory probing first before it falls back to ioport
probing. The code piece I'm talking about is the one that starts with
for (addr = addrs; *addr; addr++) {
int i;
unsigned int base_bits = readb(*addr);
Leaving out that things (ie ioport & irq probing) went fine.
-Tor
|