aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smc91x.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/smc91x.h')
-rw-r--r--drivers/net/smc91x.h67
1 files changed, 47 insertions, 20 deletions
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index 3911be7c0cba..8d2772cc42f2 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -158,8 +158,8 @@ static inline void SMC_outw(u16 val, void __iomem *ioaddr, int reg)
158#define SMC_outsb(a, r, p, l) writesb((a) + (r), p, (l)) 158#define SMC_outsb(a, r, p, l) writesb((a) + (r), p, (l))
159#define SMC_IRQ_FLAGS (-1) /* from resource */ 159#define SMC_IRQ_FLAGS (-1) /* from resource */
160 160
161#elif defined(CONFIG_MACH_LOGICPD_PXA270) \ 161#elif defined(CONFIG_MACH_LOGICPD_PXA270) || \
162 || defined(CONFIG_MACH_NOMADIK_8815NHK) 162 defined(CONFIG_MACH_NOMADIK_8815NHK)
163 163
164#define SMC_CAN_USE_8BIT 0 164#define SMC_CAN_USE_8BIT 0
165#define SMC_CAN_USE_16BIT 1 165#define SMC_CAN_USE_16BIT 1
@@ -206,21 +206,6 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg)
206 } 206 }
207} 207}
208 208
209#elif defined(CONFIG_ARCH_OMAP)
210
211/* We can only do 16-bit reads and writes in the static memory space. */
212#define SMC_CAN_USE_8BIT 0
213#define SMC_CAN_USE_16BIT 1
214#define SMC_CAN_USE_32BIT 0
215#define SMC_IO_SHIFT 0
216#define SMC_NOWAIT 1
217
218#define SMC_inw(a, r) readw((a) + (r))
219#define SMC_outw(v, a, r) writew(v, (a) + (r))
220#define SMC_insw(a, r, p, l) readsw((a) + (r), p, l)
221#define SMC_outsw(a, r, p, l) writesw((a) + (r), p, l)
222#define SMC_IRQ_FLAGS (-1) /* from resource */
223
224#elif defined(CONFIG_SH_SH4202_MICRODEV) 209#elif defined(CONFIG_SH_SH4202_MICRODEV)
225 210
226#define SMC_CAN_USE_8BIT 0 211#define SMC_CAN_USE_8BIT 0
@@ -258,9 +243,9 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg)
258#define RPC_LSA_DEFAULT RPC_LED_TX_RX 243#define RPC_LSA_DEFAULT RPC_LED_TX_RX
259#define RPC_LSB_DEFAULT RPC_LED_100_10 244#define RPC_LSB_DEFAULT RPC_LED_100_10
260 245
261#elif defined(CONFIG_MACH_LPD79520) \ 246#elif defined(CONFIG_MACH_LPD79520) || \
262 || defined(CONFIG_MACH_LPD7A400) \ 247 defined(CONFIG_MACH_LPD7A400) || \
263 || defined(CONFIG_MACH_LPD7A404) 248 defined(CONFIG_MACH_LPD7A404)
264 249
265/* The LPD7X_IOBARRIER is necessary to overcome a mismatch between the 250/* The LPD7X_IOBARRIER is necessary to overcome a mismatch between the
266 * way that the CPU handles chip selects and the way that the SMC chip 251 * way that the CPU handles chip selects and the way that the SMC chip
@@ -345,6 +330,48 @@ static inline void LPD7_SMC_outsw (unsigned char* a, int r,
345 330
346#include <unit/smc91111.h> 331#include <unit/smc91111.h>
347 332
333#elif defined(CONFIG_ARCH_MSM)
334
335#define SMC_CAN_USE_8BIT 0
336#define SMC_CAN_USE_16BIT 1
337#define SMC_CAN_USE_32BIT 0
338#define SMC_NOWAIT 1
339
340#define SMC_inw(a, r) readw((a) + (r))
341#define SMC_outw(v, a, r) writew(v, (a) + (r))
342#define SMC_insw(a, r, p, l) readsw((a) + (r), p, l)
343#define SMC_outsw(a, r, p, l) writesw((a) + (r), p, l)
344
345#define SMC_IRQ_FLAGS IRQF_TRIGGER_HIGH
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
348#else 375#else
349 376
350/* 377/*