]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] smc91x: DB1200 support.
authorPete Popov <ppopov@embeddedalley.com>
Thu, 10 Nov 2005 03:46:05 +0000 (22:46 -0500)
committerJeff Garzik <jgarzik@pobox.com>
Fri, 11 Nov 2005 13:32:47 +0000 (08:32 -0500)
The following patch support the SMC9111 present on DB1200 boards.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/net/Kconfig
drivers/net/smc91x.h

index 5c69d57f8548aa41b84f45e5cf2101fa80f47d64..ebd7313d7fc1c1652d26c37e9c984b92c57bcbe7 100644 (file)
@@ -812,7 +812,7 @@ config SMC91X
        tristate "SMC 91C9x/91C1xxx support"
        select CRC32
        select MII
-       depends on NET_ETHERNET && (ARM || REDWOOD_5 || REDWOOD_6 || M32R || SUPERH)
+       depends on NET_ETHERNET && (ARM || REDWOOD_5 || REDWOOD_6 || M32R || SUPERH || SOC_AU1X00)
        help
          This is a driver for SMC's 91x series of Ethernet chipsets,
          including the SMC91C94 and the SMC91C111. Say Y if you want it
index 817f200742c37132b4982bb0a333ebe76096fcb8..a10cd184d597c836a5f759c35147b9af0b12756c 100644 (file)
@@ -289,6 +289,38 @@ static inline void SMC_outsw (unsigned long a, int r, unsigned char* p, int l)
 #define RPC_LSA_DEFAULT                RPC_LED_TX_RX
 #define RPC_LSB_DEFAULT                RPC_LED_100_10
 
+#elif defined(CONFIG_SOC_AU1X00)
+
+#include <au1xxx.h>
+
+/* We can only do 16-bit reads and writes in the static memory space. */
+#define SMC_CAN_USE_8BIT       0
+#define SMC_CAN_USE_16BIT      1
+#define SMC_CAN_USE_32BIT      0
+#define SMC_IO_SHIFT           0
+#define SMC_NOWAIT             1
+
+#define SMC_inw(a, r)          au_readw((unsigned long)((a) + (r)))
+#define SMC_insw(a, r, p, l)   \
+       do {    \
+               unsigned long _a = (unsigned long)((a) + (r)); \
+               int _l = (l); \
+               u16 *_p = (u16 *)(p); \
+               while (_l-- > 0) \
+                       *_p++ = au_readw(_a); \
+       } while(0)
+#define SMC_outw(v, a, r)      au_writew(v, (unsigned long)((a) + (r)))
+#define SMC_outsw(a, r, p, l)  \
+       do {    \
+               unsigned long _a = (unsigned long)((a) + (r)); \
+               int _l = (l); \
+               const u16 *_p = (const u16 *)(p); \
+               while (_l-- > 0) \
+                       au_writew(*_p++ , _a); \
+       } while(0)
+
+#define set_irq_type(irq, type) do {} while (0)
+
 #else
 
 #define SMC_CAN_USE_8BIT       1