diff options
Diffstat (limited to 'drivers/net/cs89x0.c')
-rw-r--r-- | drivers/net/cs89x0.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index 756d80adc47b..7abc9f858f98 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -338,6 +338,32 @@ out: | |||
338 | } | 338 | } |
339 | #endif | 339 | #endif |
340 | 340 | ||
341 | #if defined(CONFIG_ARCH_IXDP2X01) | ||
342 | static int | ||
343 | readword(unsigned long base_addr, int portno) | ||
344 | { | ||
345 | return (u16)__raw_readl(base_addr + (portno << 1)); | ||
346 | } | ||
347 | |||
348 | static void | ||
349 | writeword(unsigned long base_addr, int portno, int value) | ||
350 | { | ||
351 | __raw_writel((u16)value, base_addr + (portno << 1)); | ||
352 | } | ||
353 | #else | ||
354 | #if defined(CONFIG_ARCH_PNX0501) | ||
355 | static int | ||
356 | readword(unsigned long base_addr, int portno) | ||
357 | { | ||
358 | return inw(base_addr + (portno << 1)); | ||
359 | } | ||
360 | |||
361 | static void | ||
362 | writeword(unsigned long base_addr, int portno, int value) | ||
363 | { | ||
364 | outw(value, base_addr + (portno << 1)); | ||
365 | } | ||
366 | #else | ||
341 | static int | 367 | static int |
342 | readword(unsigned long base_addr, int portno) | 368 | readword(unsigned long base_addr, int portno) |
343 | { | 369 | { |
@@ -349,6 +375,8 @@ writeword(unsigned long base_addr, int portno, int value) | |||
349 | { | 375 | { |
350 | outw(value, base_addr + portno); | 376 | outw(value, base_addr + portno); |
351 | } | 377 | } |
378 | #endif | ||
379 | #endif | ||
352 | 380 | ||
353 | static int | 381 | static int |
354 | readreg(struct net_device *dev, int regno) | 382 | readreg(struct net_device *dev, int regno) |