Commit 197fc657 authored by Antonino Daplas's avatar Antonino Daplas Committed by Linus Torvalds

[PATCH] rivafb: big-endian IO access fixes

In big endian machines, the read*/write* accessors do a byteswap for an
inherently little endian PCI bus.  However, rivafb puts the hardwire in big
endian register access, thus the byteswap is not needed. So for 16- and
32-bit access, instead of read*/write*, use __raw_read*/__raw_write* for all
archs.
Signed-off-by: default avatarAntonino Daplas <adaplas@pol.net>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f199195e
...@@ -73,18 +73,15 @@ typedef unsigned int U032; ...@@ -73,18 +73,15 @@ typedef unsigned int U032;
/* /*
* HW access macros. * HW access macros.
*/ */
#if defined(__powerpc__)
#include <asm/io.h> #include <asm/io.h>
#define NV_WR08(p,i,d) out_8(p+i, d)
#define NV_RD08(p,i) in_8(p+i) #define NV_WR08(p,i,d) (__raw_writeb((d), (void __iomem *)(p) + (i)))
#else #define NV_RD08(p,i) (__raw_readb((void __iomem *)(p) + (i)))
#define NV_WR08(p,i,d) (writeb((d), (u8 __iomem *)(p) + (i))) #define NV_WR16(p,i,d) (__raw_writew((d), (void __iomem *)(p) + (i)))
#define NV_RD08(p,i) (readb((u8 __iomem *)(p) + (i))) #define NV_RD16(p,i) (__raw_readw((void __iomem *)(p) + (i)))
#endif #define NV_WR32(p,i,d) (__raw_writel((d), (void __iomem *)(p) + (i)))
#define NV_WR16(p,i,d) (writew((d), (u16 __iomem *)(p) + (i)/2)) #define NV_RD32(p,i) (__raw_readl((void __iomem *)(p) + (i)))
#define NV_RD16(p,i) (readw((u16 __iomem *)(p) + (i)/2))
#define NV_WR32(p,i,d) (writel((d), (u32 __iomem *)(p) + (i)/4))
#define NV_RD32(p,i) (readl((u32 __iomem *)(p) + (i)/4))
#define VGA_WR08(p,i,d) NV_WR08(p,i,d) #define VGA_WR08(p,i,d) NV_WR08(p,i,d)
#define VGA_RD08(p,i) NV_RD08(p,i) #define VGA_RD08(p,i) NV_RD08(p,i)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment