Commit 017fb98e authored by David S. Miller's avatar David S. Miller

[RADEON]: Fix unaligned I/O port access during probe.

The driver does a readl() on DEVICE_ID which is 2-byte aligned and
2-bytes in size.  It's doing this read just to flush write buffers.

Create IN16() and OUT16() macros, and use the former to do this I/O
load.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 717463d8
......@@ -475,7 +475,7 @@ static int __devinit radeon_probe_pll_params(struct radeonfb_info *rinfo)
*/
/* Flush PCI buffers ? */
tmp = INREG(DEVICE_ID);
tmp = INREG16(DEVICE_ID);
local_irq_disable();
......
......@@ -395,6 +395,8 @@ static inline void _radeon_msleep(struct radeonfb_info *rinfo, unsigned long ms)
#define INREG8(addr) readb((rinfo->mmio_base)+addr)
#define OUTREG8(addr,val) writeb(val, (rinfo->mmio_base)+addr)
#define INREG16(addr) readw((rinfo->mmio_base)+addr)
#define OUTREG16(addr,val) writew(val, (rinfo->mmio_base)+addr)
#define INREG(addr) readl((rinfo->mmio_base)+addr)
#define OUTREG(addr,val) writel(val, (rinfo->mmio_base)+addr)
......
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