
From: "Antonino A. Daplas" <adaplas@hotpop.com>

Add __iomem annotations to hgafb

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/video/hgafb.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff -puN drivers/video/hgafb.c~fbdev-add-__iomem-annotations-to-hgafb drivers/video/hgafb.c
--- 25/drivers/video/hgafb.c~fbdev-add-__iomem-annotations-to-hgafb	2004-10-28 19:16:39.116598192 -0700
+++ 25-akpm/drivers/video/hgafb.c	2004-10-28 19:16:39.120597584 -0700
@@ -66,9 +66,9 @@ static unsigned long hga_vram_len;		/* S
 #define HGA_TXT			0
 #define HGA_GFX			1
 
-static inline u8* rowaddr(struct fb_info *info, u_int row)
+static inline u8 __iomem * rowaddr(struct fb_info *info, u_int row)
 {
-        return info->screen_base + HGA_ROWADDR(row);
+	return (u8 __iomem *) (fb_readl(info->screen_base + HGA_ROWADDR(row)));
 }
 
 static int hga_mode = -1;			/* 0 = txt, 1 = gfx mode */
@@ -455,7 +455,7 @@ static int hgafb_blank(int blank_mode, s
 static void hgafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
 {
 	u_int rows, y;
-	u8 *dest;
+	u8 __iomem *dest;
 
 	y = rect->dy;
 
@@ -466,7 +466,7 @@ static void hgafb_fillrect(struct fb_inf
 			//fb_memset(dest, rect->color, (rect->width >> 3));
 			break;
 		case ROP_XOR:
-			*dest = ~*dest;
+			fb_writeb(~(fb_readb(dest)), dest);
 			break;
 		}
 	}
@@ -475,7 +475,8 @@ static void hgafb_fillrect(struct fb_inf
 static void hgafb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
 {
 	u_int rows, y1, y2;
-	u8 *src, *dest;
+	u8 __iomem *src;
+	u8 __iomem *dest;
 
 	if (area->dy <= area->sy) {
 		y1 = area->sy;
@@ -504,14 +505,15 @@ static void hgafb_copyarea(struct fb_inf
 
 static void hgafb_imageblit(struct fb_info *info, const struct fb_image *image)
 {
-	u8 *dest, *cdat = (u8 *) image->data;
+	u8 __iomem *dest;
+	u8 *cdat = (u8 *) image->data;
 	u_int rows, y = image->dy;
 	u8 d;
 
 	for (rows = image->height; rows--; y++) {
 		d = *cdat++;
 		dest = rowaddr(info, y) + (image->dx >> 3);
-		*dest = d;
+		fb_writeb(d, dest);
 	}
 }
 #else /* !CONFIG_FB_HGA_ACCEL */
@@ -570,7 +572,7 @@ int __init hgafb_init(void)
 	fb_info.monspecs.vfmax = 10000;
 	fb_info.monspecs.dpms = 0;
 	fb_info.fbops = &hgafb_ops;
-	fb_info.screen_base = (char *)hga_fix.smem_start;
+	fb_info.screen_base = (char __iomem *)hga_fix.smem_start;
 
         if (register_framebuffer(&fb_info) < 0)
                 return -EINVAL;
_
