summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-06-09 15:37:23 +0000
committerwdenk <wdenk>2004-06-09 15:37:23 +0000
commitca0e774894ceceeffe5134f69c0f4e1f789407a2 (patch)
treed6ad4c3f828edc0c934cae02668e903cbc92253e /drivers
parent697037fe9b68fdf8cf7ce63f7875912f365270b7 (diff)
downloadu-boot-imx-ca0e774894ceceeffe5134f69c0f4e1f789407a2.zip
u-boot-imx-ca0e774894ceceeffe5134f69c0f4e1f789407a2.tar.gz
u-boot-imx-ca0e774894ceceeffe5134f69c0f4e1f789407a2.tar.bz2
Patch by Kurt Stremerch, 28 May 2004:
Add support for Exys XSEngine board Some code cleanup.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/smc91111.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/drivers/smc91111.h b/drivers/smc91111.h
index b373452..0b6dfeb 100644
--- a/drivers/smc91111.h
+++ b/drivers/smc91111.h
@@ -76,6 +76,16 @@ typedef unsigned long int dword;
#ifdef CONFIG_PXA250
+#ifdef CONFIG_XSENGINE
+#define SMC_inl(r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r<<1))))
+#define SMC_inw(r) (*((volatile word *)(SMC_BASE_ADDRESS+(r<<1))))
+#define SMC_inb(p) ({ \
+ unsigned int __p = (unsigned int)(SMC_BASE_ADDRESS + (p<<1)); \
+ unsigned int __v = *(volatile unsigned short *)((__p) & ~2); \
+ if (__p & 2) __v >>= 8; \
+ else __v &= 0xff; \
+ __v; })
+#else
#define SMC_inl(r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r))))
#define SMC_inw(r) (*((volatile word *)(SMC_BASE_ADDRESS+(r))))
#define SMC_inb(p) ({ \
@@ -84,9 +94,16 @@ typedef unsigned long int dword;
if (__p & 1) __v >>= 8; \
else __v &= 0xff; \
__v; })
+#endif
+#ifdef CONFIG_XSENGINE
+#define SMC_outl(d,r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r<<1))) = d)
+#define SMC_outw(d,r) (*((volatile word *)(SMC_BASE_ADDRESS+(r<<1))) = d)
+#else
#define SMC_outl(d,r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r))) = d)
#define SMC_outw(d,r) (*((volatile word *)(SMC_BASE_ADDRESS+(r))) = d)
+#endif
+
#define SMC_outb(d,r) ({ word __d = (byte)(d); \
word __w = SMC_inw((r)&~1); \
__w &= ((r)&1) ? 0x00FF : 0xFF00; \
@@ -191,7 +208,11 @@ typedef unsigned long int dword;
#if defined(CONFIG_SMC_USE_32_BIT)
+#ifdef CONFIG_XSENGINE
+#define SMC_inl(r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r<<1))))
+#else
#define SMC_inl(r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r))))
+#endif
#define SMC_insl(r,b,l) ({ int __i ; \
dword *__b2; \
@@ -202,8 +223,11 @@ typedef unsigned long int dword;
}; \
})
+#ifdef CONFIG_XSENGINE
+#define SMC_outl(d,r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r<<1))) = d)
+#else
#define SMC_outl(d,r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r))) = d)
-
+#endif
#define SMC_outsl(r,b,l) ({ int __i; \
dword *__b2; \
__b2 = (dword *) b; \