aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/alchemy/devboards/pb1200/platform.c10
-rw-r--r--drivers/net/smc91x.h32
2 files changed, 10 insertions, 32 deletions
diff --git a/arch/mips/alchemy/devboards/pb1200/platform.c b/arch/mips/alchemy/devboards/pb1200/platform.c
index 95303297c534..0d68e1985ffd 100644
--- a/arch/mips/alchemy/devboards/pb1200/platform.c
+++ b/arch/mips/alchemy/devboards/pb1200/platform.c
@@ -22,6 +22,7 @@
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/leds.h> 23#include <linux/leds.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/smc91x.h>
25 26
26#include <asm/mach-au1x00/au1xxx.h> 27#include <asm/mach-au1x00/au1xxx.h>
27#include <asm/mach-au1x00/au1100_mmc.h> 28#include <asm/mach-au1x00/au1100_mmc.h>
@@ -131,6 +132,12 @@ static struct platform_device ide_device = {
131 .resource = ide_resources 132 .resource = ide_resources
132}; 133};
133 134
135static struct smc91x_platdata smc_data = {
136 .flags = SMC91X_NOWAIT | SMC91X_USE_16BIT,
137 .leda = RPC_LED_100_10,
138 .ledb = RPC_LED_TX_RX,
139};
140
134static struct resource smc91c111_resources[] = { 141static struct resource smc91c111_resources[] = {
135 [0] = { 142 [0] = {
136 .name = "smc91x-regs", 143 .name = "smc91x-regs",
@@ -146,6 +153,9 @@ static struct resource smc91c111_resources[] = {
146}; 153};
147 154
148static struct platform_device smc91c111_device = { 155static struct platform_device smc91c111_device = {
156 .dev = {
157 .platform_data = &smc_data,
158 },
149 .name = "smc91x", 159 .name = "smc91x",
150 .id = -1, 160 .id = -1,
151 .num_resources = ARRAY_SIZE(smc91c111_resources), 161 .num_resources = ARRAY_SIZE(smc91c111_resources),
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index 6c44f86ae3fd..912308eec865 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -346,38 +346,6 @@ static inline void LPD7_SMC_outsw (unsigned char* a, int r,
346#define RPC_LSA_DEFAULT RPC_LED_TX_RX 346#define RPC_LSA_DEFAULT RPC_LED_TX_RX
347#define RPC_LSB_DEFAULT RPC_LED_100_10 347#define RPC_LSB_DEFAULT RPC_LED_100_10
348 348
349#elif defined(CONFIG_SOC_AU1X00)
350
351#include <au1xxx.h>
352
353/* We can only do 16-bit reads and writes in the static memory space. */
354#define SMC_CAN_USE_8BIT 0
355#define SMC_CAN_USE_16BIT 1
356#define SMC_CAN_USE_32BIT 0
357#define SMC_IO_SHIFT 0
358#define SMC_NOWAIT 1
359
360#define SMC_inw(a, r) au_readw((unsigned long)((a) + (r)))
361#define SMC_insw(a, r, p, l) \
362 do { \
363 unsigned long _a = (unsigned long)((a) + (r)); \
364 int _l = (l); \
365 u16 *_p = (u16 *)(p); \
366 while (_l-- > 0) \
367 *_p++ = au_readw(_a); \
368 } while(0)
369#define SMC_outw(v, a, r) au_writew(v, (unsigned long)((a) + (r)))
370#define SMC_outsw(a, r, p, l) \
371 do { \
372 unsigned long _a = (unsigned long)((a) + (r)); \
373 int _l = (l); \
374 const u16 *_p = (const u16 *)(p); \
375 while (_l-- > 0) \
376 au_writew(*_p++ , _a); \
377 } while(0)
378
379#define SMC_IRQ_FLAGS (0)
380
381#elif defined(CONFIG_ARCH_VERSATILE) 349#elif defined(CONFIG_ARCH_VERSATILE)
382 350
383#define SMC_CAN_USE_8BIT 1 351#define SMC_CAN_USE_8BIT 1