aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smc91x.h
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-12-07 16:35:17 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-12-07 16:35:17 -0500
commit21b4e736922f546e0f1aa7b9d6c442f309a2444a (patch)
treee1be8645297f8ebe87445251743ebcc52081a20d /drivers/net/smc91x.h
parent34161db6b14d984fb9b06c735b7b42f8803f6851 (diff)
parent68380b581383c028830f79ec2670f4a193854aa6 (diff)
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/ into merge_linus
Diffstat (limited to 'drivers/net/smc91x.h')
-rw-r--r--drivers/net/smc91x.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index a8640169fc77..9367c574477a 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -238,7 +238,7 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg)
238#define SMC_CAN_USE_16BIT 1 238#define SMC_CAN_USE_16BIT 1
239#define SMC_CAN_USE_32BIT 0 239#define SMC_CAN_USE_32BIT 0
240 240
241#define SMC_inb(a, r) inb((u32)a) + (r)) 241#define SMC_inb(a, r) inb(((u32)a) + (r))
242#define SMC_inw(a, r) inw(((u32)a) + (r)) 242#define SMC_inw(a, r) inw(((u32)a) + (r))
243#define SMC_outb(v, a, r) outb(v, ((u32)a) + (r)) 243#define SMC_outb(v, a, r) outb(v, ((u32)a) + (r))
244#define SMC_outw(v, a, r) outw(v, ((u32)a) + (r)) 244#define SMC_outw(v, a, r) outw(v, ((u32)a) + (r))
@@ -434,6 +434,24 @@ static inline void LPD7_SMC_outsw (unsigned char* a, int r,
434 434
435#define SMC_IRQ_FLAGS (0) 435#define SMC_IRQ_FLAGS (0)
436 436
437#elif defined(CONFIG_ARCH_VERSATILE)
438
439#define SMC_CAN_USE_8BIT 1
440#define SMC_CAN_USE_16BIT 1
441#define SMC_CAN_USE_32BIT 1
442#define SMC_NOWAIT 1
443
444#define SMC_inb(a, r) readb((a) + (r))
445#define SMC_inw(a, r) readw((a) + (r))
446#define SMC_inl(a, r) readl((a) + (r))
447#define SMC_outb(v, a, r) writeb(v, (a) + (r))
448#define SMC_outw(v, a, r) writew(v, (a) + (r))
449#define SMC_outl(v, a, r) writel(v, (a) + (r))
450#define SMC_insl(a, r, p, l) readsl((a) + (r), p, l)
451#define SMC_outsl(a, r, p, l) writesl((a) + (r), p, l)
452
453#define SMC_IRQ_FLAGS (0)
454
437#else 455#else
438 456
439#define SMC_CAN_USE_8BIT 1 457#define SMC_CAN_USE_8BIT 1
@@ -1216,7 +1234,7 @@ static const char * chip_ids[ 16 ] = {
1216 if (SMC_CAN_USE_32BIT) { \ 1234 if (SMC_CAN_USE_32BIT) { \
1217 void *__ptr = (p); \ 1235 void *__ptr = (p); \
1218 int __len = (l); \ 1236 int __len = (l); \
1219 void *__ioaddr = ioaddr; \ 1237 void __iomem *__ioaddr = ioaddr; \
1220 if (__len >= 2 && (unsigned long)__ptr & 2) { \ 1238 if (__len >= 2 && (unsigned long)__ptr & 2) { \
1221 __len -= 2; \ 1239 __len -= 2; \
1222 SMC_outw(*(u16 *)__ptr, ioaddr, DATA_REG); \ 1240 SMC_outw(*(u16 *)__ptr, ioaddr, DATA_REG); \
@@ -1240,7 +1258,7 @@ static const char * chip_ids[ 16 ] = {
1240 if (SMC_CAN_USE_32BIT) { \ 1258 if (SMC_CAN_USE_32BIT) { \
1241 void *__ptr = (p); \ 1259 void *__ptr = (p); \
1242 int __len = (l); \ 1260 int __len = (l); \
1243 void *__ioaddr = ioaddr; \ 1261 void __iomem *__ioaddr = ioaddr; \
1244 if ((unsigned long)__ptr & 2) { \ 1262 if ((unsigned long)__ptr & 2) { \
1245 /* \ 1263 /* \
1246 * We want 32bit alignment here. \ 1264 * We want 32bit alignment here. \