aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/svgalib.c
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2011-01-11 18:49:34 -0500
committerPaul Mundt <lethal@linux-sh.org>2011-03-22 02:46:44 -0400
commit21da386d0e4c55f6f7482b4637532b942e22b70a (patch)
tree47bebd65b27086a9cd1ba0ee2f241234ba53b902 /drivers/video/svgalib.c
parentf6b0cc477de99fe715f1071b13ab822daed9a34f (diff)
svga: Make svga_wcrt_multi take an iomem regbase pointer.
Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video/svgalib.c')
-rw-r--r--drivers/video/svgalib.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/video/svgalib.c b/drivers/video/svgalib.c
index 59c99fd4901..bf3c7a92eea 100644
--- a/drivers/video/svgalib.c
+++ b/drivers/video/svgalib.c
@@ -20,12 +20,12 @@
20 20
21 21
22/* Write a CRT register value spread across multiple registers */ 22/* Write a CRT register value spread across multiple registers */
23void svga_wcrt_multi(const struct vga_regset *regset, u32 value) { 23void svga_wcrt_multi(void __iomem *regbase, const struct vga_regset *regset, u32 value)
24 24{
25 u8 regval, bitval, bitnum; 25 u8 regval, bitval, bitnum;
26 26
27 while (regset->regnum != VGA_REGSET_END_VAL) { 27 while (regset->regnum != VGA_REGSET_END_VAL) {
28 regval = vga_rcrt(NULL, regset->regnum); 28 regval = vga_rcrt(regbase, regset->regnum);
29 bitnum = regset->lowbit; 29 bitnum = regset->lowbit;
30 while (bitnum <= regset->highbit) { 30 while (bitnum <= regset->highbit) {
31 bitval = 1 << bitnum; 31 bitval = 1 << bitnum;
@@ -34,7 +34,7 @@ void svga_wcrt_multi(const struct vga_regset *regset, u32 value) {
34 bitnum ++; 34 bitnum ++;
35 value = value >> 1; 35 value = value >> 1;
36 } 36 }
37 vga_wcrt(NULL, regset->regnum, regval); 37 vga_wcrt(regbase, regset->regnum, regval);
38 regset ++; 38 regset ++;
39 } 39 }
40} 40}
@@ -516,62 +516,62 @@ void svga_set_timings(const struct svga_timing_regs *tm, struct fb_var_screeninf
516 value = var->xres + var->left_margin + var->right_margin + var->hsync_len; 516 value = var->xres + var->left_margin + var->right_margin + var->hsync_len;
517 value = (value * hmul) / hdiv; 517 value = (value * hmul) / hdiv;
518 pr_debug("fb%d: horizontal total : %d\n", node, value); 518 pr_debug("fb%d: horizontal total : %d\n", node, value);
519 svga_wcrt_multi(tm->h_total_regs, (value / 8) - 5); 519 svga_wcrt_multi(NULL, tm->h_total_regs, (value / 8) - 5);
520 520
521 value = var->xres; 521 value = var->xres;
522 value = (value * hmul) / hdiv; 522 value = (value * hmul) / hdiv;
523 pr_debug("fb%d: horizontal display : %d\n", node, value); 523 pr_debug("fb%d: horizontal display : %d\n", node, value);
524 svga_wcrt_multi(tm->h_display_regs, (value / 8) - 1); 524 svga_wcrt_multi(NULL, tm->h_display_regs, (value / 8) - 1);
525 525
526 value = var->xres; 526 value = var->xres;
527 value = (value * hmul) / hdiv; 527 value = (value * hmul) / hdiv;
528 pr_debug("fb%d: horizontal blank start: %d\n", node, value); 528 pr_debug("fb%d: horizontal blank start: %d\n", node, value);
529 svga_wcrt_multi(tm->h_blank_start_regs, (value / 8) - 1 + hborder); 529 svga_wcrt_multi(NULL, tm->h_blank_start_regs, (value / 8) - 1 + hborder);
530 530
531 value = var->xres + var->left_margin + var->right_margin + var->hsync_len; 531 value = var->xres + var->left_margin + var->right_margin + var->hsync_len;
532 value = (value * hmul) / hdiv; 532 value = (value * hmul) / hdiv;
533 pr_debug("fb%d: horizontal blank end : %d\n", node, value); 533 pr_debug("fb%d: horizontal blank end : %d\n", node, value);
534 svga_wcrt_multi(tm->h_blank_end_regs, (value / 8) - 1 - hborder); 534 svga_wcrt_multi(NULL, tm->h_blank_end_regs, (value / 8) - 1 - hborder);
535 535
536 value = var->xres + var->right_margin; 536 value = var->xres + var->right_margin;
537 value = (value * hmul) / hdiv; 537 value = (value * hmul) / hdiv;
538 pr_debug("fb%d: horizontal sync start : %d\n", node, value); 538 pr_debug("fb%d: horizontal sync start : %d\n", node, value);
539 svga_wcrt_multi(tm->h_sync_start_regs, (value / 8)); 539 svga_wcrt_multi(NULL, tm->h_sync_start_regs, (value / 8));
540 540
541 value = var->xres + var->right_margin + var->hsync_len; 541 value = var->xres + var->right_margin + var->hsync_len;
542 value = (value * hmul) / hdiv; 542 value = (value * hmul) / hdiv;
543 pr_debug("fb%d: horizontal sync end : %d\n", node, value); 543 pr_debug("fb%d: horizontal sync end : %d\n", node, value);
544 svga_wcrt_multi(tm->h_sync_end_regs, (value / 8)); 544 svga_wcrt_multi(NULL, tm->h_sync_end_regs, (value / 8));
545 545
546 value = var->yres + var->upper_margin + var->lower_margin + var->vsync_len; 546 value = var->yres + var->upper_margin + var->lower_margin + var->vsync_len;
547 value = (value * vmul) / vdiv; 547 value = (value * vmul) / vdiv;
548 pr_debug("fb%d: vertical total : %d\n", node, value); 548 pr_debug("fb%d: vertical total : %d\n", node, value);
549 svga_wcrt_multi(tm->v_total_regs, value - 2); 549 svga_wcrt_multi(NULL, tm->v_total_regs, value - 2);
550 550
551 value = var->yres; 551 value = var->yres;
552 value = (value * vmul) / vdiv; 552 value = (value * vmul) / vdiv;
553 pr_debug("fb%d: vertical display : %d\n", node, value); 553 pr_debug("fb%d: vertical display : %d\n", node, value);
554 svga_wcrt_multi(tm->v_display_regs, value - 1); 554 svga_wcrt_multi(NULL, tm->v_display_regs, value - 1);
555 555
556 value = var->yres; 556 value = var->yres;
557 value = (value * vmul) / vdiv; 557 value = (value * vmul) / vdiv;
558 pr_debug("fb%d: vertical blank start : %d\n", node, value); 558 pr_debug("fb%d: vertical blank start : %d\n", node, value);
559 svga_wcrt_multi(tm->v_blank_start_regs, value); 559 svga_wcrt_multi(NULL, tm->v_blank_start_regs, value);
560 560
561 value = var->yres + var->upper_margin + var->lower_margin + var->vsync_len; 561 value = var->yres + var->upper_margin + var->lower_margin + var->vsync_len;
562 value = (value * vmul) / vdiv; 562 value = (value * vmul) / vdiv;
563 pr_debug("fb%d: vertical blank end : %d\n", node, value); 563 pr_debug("fb%d: vertical blank end : %d\n", node, value);
564 svga_wcrt_multi(tm->v_blank_end_regs, value - 2); 564 svga_wcrt_multi(NULL, tm->v_blank_end_regs, value - 2);
565 565
566 value = var->yres + var->lower_margin; 566 value = var->yres + var->lower_margin;
567 value = (value * vmul) / vdiv; 567 value = (value * vmul) / vdiv;
568 pr_debug("fb%d: vertical sync start : %d\n", node, value); 568 pr_debug("fb%d: vertical sync start : %d\n", node, value);
569 svga_wcrt_multi(tm->v_sync_start_regs, value); 569 svga_wcrt_multi(NULL, tm->v_sync_start_regs, value);
570 570
571 value = var->yres + var->lower_margin + var->vsync_len; 571 value = var->yres + var->lower_margin + var->vsync_len;
572 value = (value * vmul) / vdiv; 572 value = (value * vmul) / vdiv;
573 pr_debug("fb%d: vertical sync end : %d\n", node, value); 573 pr_debug("fb%d: vertical sync end : %d\n", node, value);
574 svga_wcrt_multi(tm->v_sync_end_regs, value); 574 svga_wcrt_multi(NULL, tm->v_sync_end_regs, value);
575 575
576 /* Set horizontal and vertical sync pulse polarity in misc register */ 576 /* Set horizontal and vertical sync pulse polarity in misc register */
577 577