* [PATCH 11/15] fbdev: Add __iomem annotations to hgafb
@ 2004-10-29 1:58 Antonino A. Daplas
0 siblings, 0 replies; only message in thread
From: Antonino A. Daplas @ 2004-10-29 1:58 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linux Fbdev development list, Ferenc Bakonyi
Add __iomem annotations to hgafb
Signed-off-by: Antonino Daplas <adaplas@pol.net>
---
hgafb.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff -Nru a/drivers/video/hgafb.c b/drivers/video/hgafb.c
--- a/drivers/video/hgafb.c 2004-10-27 14:58:07 +08:00
+++ b/drivers/video/hgafb.c 2004-10-28 23:24:53 +08:00
@@ -66,9 +66,9 @@
#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 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 @@
//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_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_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 @@
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;
-------------------------------------------------------
This Newsletter Sponsored by: Macrovision
For reliable Linux application installations, use the industry's leading
setup authoring tool, InstallShield X. Learn more and evaluate
today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-29 2:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-29 1:58 [PATCH 11/15] fbdev: Add __iomem annotations to hgafb Antonino A. Daplas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).