X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fcom20020.h;h=ac6d9a43e0853b672aed7b34ea46a6a2eeea9e19;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=c88d530bf637288fe67e6c99de6c460dbfc8a2ac;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/linux/com20020.h b/include/linux/com20020.h index c88d530bf..ac6d9a43e 100644 --- a/include/linux/com20020.h +++ b/include/linux/com20020.h @@ -34,17 +34,24 @@ int com20020_found(struct net_device *dev, int shared); #define ARCNET_TOTAL_SIZE 8 /* various register addresses */ -#define _INTMASK (ioaddr+0) /* writable */ -#define _STATUS (ioaddr+0) /* readable */ -#define _COMMAND (ioaddr+1) /* standard arcnet commands */ -#define _DIAGSTAT (ioaddr+1) /* diagnostic status register */ -#define _ADDR_HI (ioaddr+2) /* control registers for IO-mapped memory */ -#define _ADDR_LO (ioaddr+3) -#define _MEMDATA (ioaddr+4) /* data port for IO-mapped memory */ -#define _SUBADR (ioaddr+5) /* the extended port _XREG refers to */ -#define _CONFIG (ioaddr+6) /* configuration register */ -#define _XREG (ioaddr+7) /* extra registers (indexed by _CONFIG - or _SUBADR) */ +#ifdef CONFIG_SA1100_CT6001 +#define BUS_ALIGN 2 /* 8 bit device on a 16 bit bus - needs padding */ +#else +#define BUS_ALIGN 1 +#endif + + +#define _INTMASK (ioaddr+BUS_ALIGN*0) /* writable */ +#define _STATUS (ioaddr+BUS_ALIGN*0) /* readable */ +#define _COMMAND (ioaddr+BUS_ALIGN*1) /* standard arcnet commands */ +#define _DIAGSTAT (ioaddr+BUS_ALIGN*1) /* diagnostic status register */ +#define _ADDR_HI (ioaddr+BUS_ALIGN*2) /* control registers for IO-mapped memory */ +#define _ADDR_LO (ioaddr+BUS_ALIGN*3) +#define _MEMDATA (ioaddr+BUS_ALIGN*4) /* data port for IO-mapped memory */ +#define _SUBADR (ioaddr+BUS_ALIGN*5) /* the extended port _XREG refers to */ +#define _CONFIG (ioaddr+BUS_ALIGN*6) /* configuration register */ +#define _XREG (ioaddr+BUS_ALIGN*7) /* extra registers (indexed by _CONFIG + or _SUBADR) */ /* in the ADDR_HI register */ #define RDDATAflag 0x80 /* next access is a read (not a write) */ @@ -99,6 +106,7 @@ int com20020_found(struct net_device *dev, int shared); } #define ASTATUS() inb(_STATUS) +#define ADIAGSTATUS() inb(_DIAGSTAT) #define ACOMMAND(cmd) outb((cmd),_COMMAND) #define AINTMASK(msk) outb((msk),_INTMASK)