diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/smc91x.h | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/smc91x.h')
-rw-r--r-- | drivers/net/smc91x.h | 67 |
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 | |||
354 | static 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 | |||
361 | static 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 | /* |