changeset 7825:52818222a8be

endianness fixes for mach64 vidix driver patch by (Colin Leroy <colin at colino dot net>)
author michael
date Mon, 21 Oct 2002 16:57:02 +0000
parents ef5f2f54c231
children 938202ab9189
files vidix/drivers/mach64_vid.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/vidix/drivers/mach64_vid.c	Mon Oct 21 14:23:19 2002 +0000
+++ b/vidix/drivers/mach64_vid.c	Mon Oct 21 16:57:02 2002 +0000
@@ -13,6 +13,8 @@
 #include <inttypes.h>
 #include <fcntl.h>
 
+#include "../../config.h"
+#include "../../bswap.h"
 #include "../vidix.h"
 #include "../fourcc.h"
 #include "../../libdha/libdha.h"
@@ -125,8 +127,8 @@
 
 #define INREG8(addr)		GETREG(uint8_t,(uint32_t)mach64_mmio_base,((addr)^0x100)<<2)
 #define OUTREG8(addr,val)	SETREG(uint8_t,(uint32_t)mach64_mmio_base,((addr)^0x100)<<2,val)
-#define INREG(addr)		GETREG(uint32_t,(uint32_t)mach64_mmio_base,((addr)^0x100)<<2)
-#define OUTREG(addr,val)	SETREG(uint32_t,(uint32_t)mach64_mmio_base,((addr)^0x100)<<2,val)
+#define INREG(addr)		le2me_32(GETREG(uint32_t,(uint32_t)mach64_mmio_base,((addr)^0x100)<<2))
+#define OUTREG(addr,val)	SETREG(uint32_t,(uint32_t)mach64_mmio_base,((addr)^0x100)<<2,le2me_32(val))
 
 #define OUTREGP(addr,val,mask)  					\
 	do {								\