aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <iwamatsu@nigauri.org>2007-05-03 05:56:56 -0400
committerJeff Garzik <jeff@garzik.org>2007-05-08 01:15:35 -0400
commit5125ed914d238cf22783038393ea1e75bc470925 (patch)
treecf676025f6be467d8b8a76de4ad982f7189fdffd
parent9fd9f9b669ca71f7b3a7709d02d305c3d428d2fe (diff)
smc91x SuperH support
This patch supports SuperH of smc91x. smc91x installed on the board of SuperH comes to work by applying this patch. Please apply this patch . Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/net/smc91x.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index 7053026d6c76..111f23d05764 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -279,6 +279,40 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg)
279#define SMC_insw(a, r, p, l) insw((a) + (r), p, l) 279#define SMC_insw(a, r, p, l) insw((a) + (r), p, l)
280#define SMC_outsw(a, r, p, l) outsw((a) + (r), p, l) 280#define SMC_outsw(a, r, p, l) outsw((a) + (r), p, l)
281 281
282#elif defined(CONFIG_SUPERH)
283
284#if defined(CONFIG_SH_7780_SOLUTION_ENGINE) || defined(CONFIG_SH_7722_SOLUTION_ENGINE)
285#define SMC_CAN_USE_8BIT 0
286#define SMC_CAN_USE_16BIT 1
287#define SMC_CAN_USE_32BIT 0
288#define SMC_IO_SHIFT 0
289#define SMC_NOWAIT 1
290
291#define SMC_inb(a, r) (inw((a) + ((r)&~1)) >> (8*(r%2)))&0xff
292#define SMC_inw(a, r) inw((a) + (r))
293#define SMC_outb(v, a, r) outw(((inw((a)+((r)&~1))*(0xff<<8*(r%2)))) | ((v)<<(8*(r&2)))), (a) + ((r)&~1))
294
295#define SMC_outw(v, a, r) outw(v, (a) + (r))
296#define SMC_insw(a, r, p, l) insw((a) + (r), p, l)
297#define SMC_outsw(a, r, p, l) outsw((a) + (r), p, l)
298
299#else /* BOARDS */
300
301#define SMC_CAN_USE_8BIT 1
302#define SMC_CAN_USE_16BIT 1
303#define SMC_CAN_USE_32BIT 1
304
305#define SMC_inb(a, r) inb((a) + (r))
306#define SMC_inw(a, r) inw((a) + (r))
307#define SMC_outb(v, a, r) outb(v, (a) + (r))
308#define SMC_outw(v, a, r) outw(v, (a) + (r))
309#define SMC_insw(a, r, p, l) insw((a) + (r), p, l)
310#define SMC_outsw(a, r, p, l) outsw((a) + (r), p, l)
311
312#endif /* BOARDS */
313
314#define set_irq_type(irq, type) do {} while (0)
315
282#elif defined(CONFIG_M32R) 316#elif defined(CONFIG_M32R)
283 317
284#define SMC_CAN_USE_8BIT 0 318#define SMC_CAN_USE_8BIT 0