]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/smc91x.h
ath9k: Update copyright in all the files
[karo-tx-linux.git] / drivers / net / smc91x.h
index 3e7c6a3cbc650c8f0a39afa4bc49eb48f7aac191..ed9ae43523a12e88ec4e2ffada52d2f3844eea55 100644 (file)
@@ -493,7 +493,8 @@ struct smc_local {
  * as RX which can overrun memory and lose packets.
  */
 #include <linux/dma-mapping.h>
-#include <asm/dma.h>
+#include <mach/dma.h>
+#include <mach/hardware.h>
 #include <mach/pxa-regs.h>
 
 #ifdef SMC_insl
@@ -1140,6 +1141,16 @@ static const char * chip_ids[ 16 ] =  {
 
 #define SMC_GET_MII(lp)                SMC_inw(ioaddr, MII_REG(lp))
 
+#define SMC_GET_GP(lp)         SMC_inw(ioaddr, GP_REG(lp))
+
+#define SMC_SET_GP(lp, x)                                              \
+       do {                                                            \
+               if (SMC_MUST_ALIGN_WRITE(lp))                           \
+                       SMC_outl((x)<<16, ioaddr, SMC_REG(lp, 8, 1));   \
+               else                                                    \
+                       SMC_outw(x, ioaddr, GP_REG(lp));                \
+       } while (0)
+
 #define SMC_SET_MII(lp, x)             SMC_outw(x, ioaddr, MII_REG(lp))
 
 #define SMC_GET_MIR(lp)                SMC_inw(ioaddr, MIR_REG(lp))