]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/net/smc91111.h
Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx
[karo-tx-uboot.git] / drivers / net / smc91111.h
index bb4524106f946c64333e789c01d6c1d02d8909b3..d70c66f58eb9ced81fe1860d81c436845fd05ca6 100644 (file)
@@ -78,13 +78,13 @@ struct smc91111_priv{
 
 #define        SMC_IO_EXTENT   16
 
-#ifdef CONFIG_PXA250
+#ifdef CONFIG_CPU_PXA25X
 
 #ifdef CONFIG_XSENGINE
-#define        SMC_inl(a,r)    (*((volatile dword *)((a)->iobase+(r<<1))))
-#define        SMC_inw(a,r)    (*((volatile word *)((a)->iobase+(r<<1))))
+#define        SMC_inl(a,r)    (*((volatile dword *)((a)->iobase+((r)<<1))))
+#define        SMC_inw(a,r)    (*((volatile word *)((a)->iobase+((r)<<1))))
 #define SMC_inb(a,p)  ({ \
-       unsigned int __p = (unsigned int)((a)->iobase + (p<<1)); \
+       unsigned int __p = (unsigned int)((a)->iobase + ((p)<<1)); \
        unsigned int __v = *(volatile unsigned short *)((__p) & ~2); \
        if (__p & 2) __v >>= 8; \
        else __v &= 0xff; \
@@ -99,7 +99,7 @@ struct smc91111_priv{
        __v; })
 #define SMC_inb(a,p)   ({ \
        unsigned int ___v = SMC_inw((a),(p) & ~1); \
-       if (p & 1) ___v >>= 8; \
+       if ((p) & 1) ___v >>= 8; \
        else ___v &= 0xff; \
        ___v; })
 #else
@@ -180,7 +180,7 @@ struct smc91111_priv{
                                        };  \
                                })
 
-#elif defined(CONFIG_LEON)     /* if not CONFIG_PXA250 */
+#elif defined(CONFIG_LEON)     /* if not CONFIG_CPU_PXA25X */
 
 #define SMC_LEON_SWAP16(_x_) ({ word _x = (_x_); ((_x << 8) | (_x >> 8)); })
 
@@ -249,7 +249,7 @@ struct smc91111_priv{
                                        };  \
                                }while(0)
 
-#else                          /* if not CONFIG_PXA250 and not CONFIG_LEON */
+#else                  /* if not CONFIG_CPU_PXA25X and not CONFIG_LEON */
 
 #ifndef CONFIG_SMC_USE_IOFUNCS /* these macros don't work on some boards */
 /*