Skip to content

Commit 91e8a30

Browse files
Manuel Laussralfbaechle
authored andcommitted
MIPS: Alchemy: PB1200: use SMC91X platform data.
Add platform data for the smc91x on the PB1200/DB1200, and remove the now unused AU1X00 entry in smc91x.h. Signed-off-by: Manuel Lauss <[email protected]>
1 parent 2f794d0 commit 91e8a30

File tree

2 files changed

+10
-32
lines changed

2 files changed

+10
-32
lines changed

arch/mips/alchemy/devboards/pb1200/platform.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <linux/init.h>
2323
#include <linux/leds.h>
2424
#include <linux/platform_device.h>
25+
#include <linux/smc91x.h>
2526

2627
#include <asm/mach-au1x00/au1xxx.h>
2728
#include <asm/mach-au1x00/au1100_mmc.h>
@@ -131,6 +132,12 @@ static struct platform_device ide_device = {
131132
.resource = ide_resources
132133
};
133134

135+
static 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+
134141
static struct resource smc91c111_resources[] = {
135142
[0] = {
136143
.name = "smc91x-regs",
@@ -146,6 +153,9 @@ static struct resource smc91c111_resources[] = {
146153
};
147154

148155
static struct platform_device smc91c111_device = {
156+
.dev = {
157+
.platform_data = &smc_data,
158+
},
149159
.name = "smc91x",
150160
.id = -1,
151161
.num_resources = ARRAY_SIZE(smc91c111_resources),

drivers/net/smc91x.h

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -346,38 +346,6 @@ static inline void LPD7_SMC_outsw (unsigned char* a, int r,
346346
#define RPC_LSA_DEFAULT RPC_LED_TX_RX
347347
#define RPC_LSB_DEFAULT RPC_LED_100_10
348348

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-
381349
#elif defined(CONFIG_ARCH_VERSATILE)
382350

383351
#define SMC_CAN_USE_8BIT 1

0 commit comments

Comments
 (0)