Commit f6b0cc47 authored by David Miller's avatar David Miller Committed by Paul Mundt

svga: Make svga_wattr take an iomem regbase pointer.

And use vga_{r,w}().
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 1284e49c
...@@ -552,7 +552,7 @@ static int s3fb_set_par(struct fb_info *info) ...@@ -552,7 +552,7 @@ static int s3fb_set_par(struct fb_info *info)
} }
vga_wcrt(NULL, 0x3A, 0x35); vga_wcrt(NULL, 0x3A, 0x35);
svga_wattr(0x33, 0x00); svga_wattr(par->state.vgabase, 0x33, 0x00);
if (info->var.vmode & FB_VMODE_DOUBLE) if (info->var.vmode & FB_VMODE_DOUBLE)
svga_wcrt_mask(0x09, 0x80, 0x80); svga_wcrt_mask(0x09, 0x80, 0x80);
......
...@@ -102,14 +102,14 @@ void svga_set_default_atc_regs(void) ...@@ -102,14 +102,14 @@ void svga_set_default_atc_regs(void)
/* All standard ATC registers (AR00 - AR14) */ /* All standard ATC registers (AR00 - AR14) */
for (count = 0; count <= 0xF; count ++) for (count = 0; count <= 0xF; count ++)
svga_wattr(count, count); svga_wattr(NULL, count, count);
svga_wattr(VGA_ATC_MODE, 0x01); svga_wattr(NULL, VGA_ATC_MODE, 0x01);
/* svga_wattr(VGA_ATC_MODE, 0x41); */ /* svga_wattr(NULL, VGA_ATC_MODE, 0x41); */
svga_wattr(VGA_ATC_OVERSCAN, 0x00); svga_wattr(NULL, VGA_ATC_OVERSCAN, 0x00);
svga_wattr(VGA_ATC_PLANE_ENABLE, 0x0F); svga_wattr(NULL, VGA_ATC_PLANE_ENABLE, 0x0F);
svga_wattr(VGA_ATC_PEL, 0x00); svga_wattr(NULL, VGA_ATC_PEL, 0x00);
svga_wattr(VGA_ATC_COLOR_PAGE, 0x00); svga_wattr(NULL, VGA_ATC_COLOR_PAGE, 0x00);
vga_r(NULL, 0x3DA); vga_r(NULL, 0x3DA);
vga_w(NULL, VGA_ATT_W, 0x20); vga_w(NULL, VGA_ATT_W, 0x20);
...@@ -159,8 +159,8 @@ void svga_set_textmode_vga_regs(void) ...@@ -159,8 +159,8 @@ void svga_set_textmode_vga_regs(void)
vga_r(NULL, 0x3DA); vga_r(NULL, 0x3DA);
vga_w(NULL, VGA_ATT_W, 0x00); vga_w(NULL, VGA_ATT_W, 0x00);
svga_wattr(0x10, 0x0C); /* Attribute Mode Control Register - text mode, blinking and line graphics */ svga_wattr(NULL, 0x10, 0x0C); /* Attribute Mode Control Register - text mode, blinking and line graphics */
svga_wattr(0x13, 0x08); /* Horizontal Pixel Panning Register */ svga_wattr(NULL, 0x13, 0x08); /* Horizontal Pixel Panning Register */
vga_r(NULL, 0x3DA); vga_r(NULL, 0x3DA);
vga_w(NULL, VGA_ATT_W, 0x20); vga_w(NULL, VGA_ATT_W, 0x20);
......
...@@ -67,11 +67,11 @@ struct svga_pll { ...@@ -67,11 +67,11 @@ struct svga_pll {
/* Write a value to the attribute register */ /* Write a value to the attribute register */
static inline void svga_wattr(u8 index, u8 data) static inline void svga_wattr(void __iomem *regbase, u8 index, u8 data)
{ {
inb(VGA_IS1_RC); vga_r(regbase, VGA_IS1_RC);
outb(index, VGA_ATT_IW); vga_w(regbase, VGA_ATT_IW, index);
outb(data, VGA_ATT_W); vga_w(regbase, VGA_ATT_W, data);
} }
/* Write a value to a sequence register with a mask */ /* Write a value to a sequence register with a mask */
......
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