aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smc91x.h
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2010-03-10 10:37:06 -0500
committerDavid S. Miller <davem@davemloft.net>2010-03-10 10:37:06 -0500
commit717ea4b3474852057b1ce2c639ce219f4f8d3a8d (patch)
tree487c597b8cff1a8697daca04cc2da7559332c3fa /drivers/net/smc91x.h
parent7f29a3baa825725d29db399663790d15c78cddcf (diff)
net: add ColdFire support to the smc91x driver
Some embedded ColdFire based boards use the SMC 91x family of ethernet devices. (For example the Freescale M5249C3 and MoretonBay NETtel). Add IO access support to the SMC91x driver, and allow this driver to be configured for ColdFire platforms. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/smc91x.h')
-rw-r--r--drivers/net/smc91x.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index a6ee883d1b0e..8d2772cc42f2 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -344,6 +344,34 @@ static inline void LPD7_SMC_outsw (unsigned char* a, int r,
344 344
345#define SMC_IRQ_FLAGS IRQF_TRIGGER_HIGH 345#define SMC_IRQ_FLAGS IRQF_TRIGGER_HIGH
346 346
347#elif defined(CONFIG_COLDFIRE)
348
349#define SMC_CAN_USE_8BIT 0
350#define SMC_CAN_USE_16BIT 1
351#define SMC_CAN_USE_32BIT 0
352#define SMC_NOWAIT 1
353
354static inline void mcf_insw(void *a, unsigned char *p, int l)
355{
356 u16 *wp = (u16 *) p;
357 while (l-- > 0)
358 *wp++ = readw(a);
359}
360
361static inline void mcf_outsw(void *a, unsigned char *p, int l)
362{
363 u16 *wp = (u16 *) p;
364 while (l-- > 0)
365 writew(*wp++, a);
366}
367
368#define SMC_inw(a, r) _swapw(readw((a) + (r)))
369#define SMC_outw(v, a, r) writew(_swapw(v), (a) + (r))
370#define SMC_insw(a, r, p, l) mcf_insw(a + r, p, l)
371#define SMC_outsw(a, r, p, l) mcf_outsw(a + r, p, l)
372
373#define SMC_IRQ_FLAGS (IRQF_DISABLED)
374
347#else 375#else
348 376
349/* 377/*