Added definition of unican_readw and unican_writew for PowerPC
authorwentasah <wentasah>
Tue, 27 Apr 2004 16:54:09 +0000 (16:54 +0000)
committerwentasah <wentasah>
Tue, 27 Apr 2004 16:54:09 +0000 (16:54 +0000)
lincan/include/unican_types.h

index 5fd58a6..76f9fec 100644 (file)
 #define TRUE  1
 #endif
 
 #define TRUE  1
 #endif
 
+#ifdef CONFIG_PPC
+#define unican_readw(addr) in_be16((volatile u16 *)(addr))
+#define unican_writew(b,addr) out_be16((volatile u16 *)(addr),(b))
+/* #define unican_readw(addr) (*(volatile __u16 *)(addr)) */
+/* #define unican_writew(v, addr) (*(volatile __u16 *)(addr) = (v)) */
+#else  /* CONFIG_PPC */
 #define unican_readw(addr) readw(addr)
 #define unican_writew(v, addr) writew(v, addr)
 #define unican_readw(addr) readw(addr)
 #define unican_writew(v, addr) writew(v, addr)
+#endif /* CONFIG_PPC */
 
 #endif /*_UNICAN_TYPES_H*/
 
 #endif /*_UNICAN_TYPES_H*/