aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/fs_enet/mac-fcc.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c
index 1e1024a4d432..e990f728d51b 100644
--- a/drivers/net/fs_enet/mac-fcc.c
+++ b/drivers/net/fs_enet/mac-fcc.c
@@ -48,28 +48,19 @@
48 48
49/* FCC access macros */ 49/* FCC access macros */
50 50
51#define __fcc_out32(addr, x) out_be32((unsigned *)addr, x)
52#define __fcc_out16(addr, x) out_be16((unsigned short *)addr, x)
53#define __fcc_out8(addr, x) out_8((unsigned char *)addr, x)
54#define __fcc_in32(addr) in_be32((unsigned *)addr)
55#define __fcc_in16(addr) in_be16((unsigned short *)addr)
56#define __fcc_in8(addr) in_8((unsigned char *)addr)
57
58/* parameter space */
59
60/* write, read, set bits, clear bits */ 51/* write, read, set bits, clear bits */
61#define W32(_p, _m, _v) __fcc_out32(&(_p)->_m, (_v)) 52#define W32(_p, _m, _v) out_be32(&(_p)->_m, (_v))
62#define R32(_p, _m) __fcc_in32(&(_p)->_m) 53#define R32(_p, _m) in_be32(&(_p)->_m)
63#define S32(_p, _m, _v) W32(_p, _m, R32(_p, _m) | (_v)) 54#define S32(_p, _m, _v) W32(_p, _m, R32(_p, _m) | (_v))
64#define C32(_p, _m, _v) W32(_p, _m, R32(_p, _m) & ~(_v)) 55#define C32(_p, _m, _v) W32(_p, _m, R32(_p, _m) & ~(_v))
65 56
66#define W16(_p, _m, _v) __fcc_out16(&(_p)->_m, (_v)) 57#define W16(_p, _m, _v) out_be16(&(_p)->_m, (_v))
67#define R16(_p, _m) __fcc_in16(&(_p)->_m) 58#define R16(_p, _m) in_be16(&(_p)->_m)
68#define S16(_p, _m, _v) W16(_p, _m, R16(_p, _m) | (_v)) 59#define S16(_p, _m, _v) W16(_p, _m, R16(_p, _m) | (_v))
69#define C16(_p, _m, _v) W16(_p, _m, R16(_p, _m) & ~(_v)) 60#define C16(_p, _m, _v) W16(_p, _m, R16(_p, _m) & ~(_v))
70 61
71#define W8(_p, _m, _v) __fcc_out8(&(_p)->_m, (_v)) 62#define W8(_p, _m, _v) out_8(&(_p)->_m, (_v))
72#define R8(_p, _m) __fcc_in8(&(_p)->_m) 63#define R8(_p, _m) in_8(&(_p)->_m)
73#define S8(_p, _m, _v) W8(_p, _m, R8(_p, _m) | (_v)) 64#define S8(_p, _m, _v) W8(_p, _m, R8(_p, _m) | (_v))
74#define C8(_p, _m, _v) W8(_p, _m, R8(_p, _m) & ~(_v)) 65#define C8(_p, _m, _v) W8(_p, _m, R8(_p, _m) & ~(_v))
75 66
@@ -290,7 +281,7 @@ static void restart(struct net_device *dev)
290 281
291 /* clear everything (slow & steady does it) */ 282 /* clear everything (slow & steady does it) */
292 for (i = 0; i < sizeof(*ep); i++) 283 for (i = 0; i < sizeof(*ep); i++)
293 __fcc_out8((char *)ep + i, 0); 284 out_8((char *)ep + i, 0);
294 285
295 /* get physical address */ 286 /* get physical address */
296 rx_bd_base_phys = fep->ring_mem_addr; 287 rx_bd_base_phys = fep->ring_mem_addr;
@@ -495,7 +486,7 @@ static void tx_kickstart(struct net_device *dev)
495 struct fs_enet_private *fep = netdev_priv(dev); 486 struct fs_enet_private *fep = netdev_priv(dev);
496 fcc_t *fccp = fep->fcc.fccp; 487 fcc_t *fccp = fep->fcc.fccp;
497 488
498 S32(fccp, fcc_ftodr, 0x80); 489 S16(fccp, fcc_ftodr, 0x8000);
499} 490}
500 491
501static u32 get_int_events(struct net_device *dev) 492static u32 get_int_events(struct net_device *dev)