aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/arkfb.c
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2011-01-11 18:51:26 -0500
committerPaul Mundt <lethal@linux-sh.org>2011-03-22 02:47:07 -0400
commitea770789dce2d27afab39c3891a475624acbd82f (patch)
tree352ed0f19b74bff7dc6b80f7e05e7bf35b1f5d3f /drivers/video/arkfb.c
parentd907ec04cc498e11e039e0fff8eb58cf01e885da (diff)
svga: Make svga_wcrt_mask() 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/arkfb.c')
-rw-r--r--drivers/video/arkfb.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/video/arkfb.c b/drivers/video/arkfb.c
index c351b184b1bd..f24151e01da3 100644
--- a/drivers/video/arkfb.c
+++ b/drivers/video/arkfb.c
@@ -646,11 +646,11 @@ static int arkfb_set_par(struct fb_info *info)
646 info->var.activate = FB_ACTIVATE_NOW; 646 info->var.activate = FB_ACTIVATE_NOW;
647 647
648 /* Unlock registers */ 648 /* Unlock registers */
649 svga_wcrt_mask(0x11, 0x00, 0x80); 649 svga_wcrt_mask(par->state.vgabase, 0x11, 0x00, 0x80);
650 650
651 /* Blank screen and turn off sync */ 651 /* Blank screen and turn off sync */
652 svga_wseq_mask(par->state.vgabase, 0x01, 0x20, 0x20); 652 svga_wseq_mask(par->state.vgabase, 0x01, 0x20, 0x20);
653 svga_wcrt_mask(0x17, 0x00, 0x80); 653 svga_wcrt_mask(par->state.vgabase, 0x17, 0x00, 0x80);
654 654
655 /* Set default values */ 655 /* Set default values */
656 svga_set_default_gfx_regs(par->state.vgabase); 656 svga_set_default_gfx_regs(par->state.vgabase);
@@ -679,17 +679,17 @@ static int arkfb_set_par(struct fb_info *info)
679 svga_wcrt_multi(par->state.vgabase, ark_offset_regs, offset_value); 679 svga_wcrt_multi(par->state.vgabase, ark_offset_regs, offset_value);
680 680
681 /* fix for hi-res textmode */ 681 /* fix for hi-res textmode */
682 svga_wcrt_mask(0x40, 0x08, 0x08); 682 svga_wcrt_mask(par->state.vgabase, 0x40, 0x08, 0x08);
683 683
684 if (info->var.vmode & FB_VMODE_DOUBLE) 684 if (info->var.vmode & FB_VMODE_DOUBLE)
685 svga_wcrt_mask(0x09, 0x80, 0x80); 685 svga_wcrt_mask(par->state.vgabase, 0x09, 0x80, 0x80);
686 else 686 else
687 svga_wcrt_mask(0x09, 0x00, 0x80); 687 svga_wcrt_mask(par->state.vgabase, 0x09, 0x00, 0x80);
688 688
689 if (info->var.vmode & FB_VMODE_INTERLACED) 689 if (info->var.vmode & FB_VMODE_INTERLACED)
690 svga_wcrt_mask(0x44, 0x04, 0x04); 690 svga_wcrt_mask(par->state.vgabase, 0x44, 0x04, 0x04);
691 else 691 else
692 svga_wcrt_mask(0x44, 0x00, 0x04); 692 svga_wcrt_mask(par->state.vgabase, 0x44, 0x00, 0x04);
693 693
694 hmul = 1; 694 hmul = 1;
695 hdiv = 1; 695 hdiv = 1;
@@ -702,7 +702,7 @@ static int arkfb_set_par(struct fb_info *info)
702 svga_set_textmode_vga_regs(); 702 svga_set_textmode_vga_regs();
703 703
704 vga_wseq(NULL, 0x11, 0x10); /* basic VGA mode */ 704 vga_wseq(NULL, 0x11, 0x10); /* basic VGA mode */
705 svga_wcrt_mask(0x46, 0x00, 0x04); /* 8bit pixel path */ 705 svga_wcrt_mask(par->state.vgabase, 0x46, 0x00, 0x04); /* 8bit pixel path */
706 dac_set_mode(par->dac, DAC_PSEUDO8_8); 706 dac_set_mode(par->dac, DAC_PSEUDO8_8);
707 707
708 break; 708 break;
@@ -711,14 +711,14 @@ static int arkfb_set_par(struct fb_info *info)
711 vga_wgfx(NULL, VGA_GFX_MODE, 0x40); 711 vga_wgfx(NULL, VGA_GFX_MODE, 0x40);
712 712
713 vga_wseq(NULL, 0x11, 0x10); /* basic VGA mode */ 713 vga_wseq(NULL, 0x11, 0x10); /* basic VGA mode */
714 svga_wcrt_mask(0x46, 0x00, 0x04); /* 8bit pixel path */ 714 svga_wcrt_mask(par->state.vgabase, 0x46, 0x00, 0x04); /* 8bit pixel path */
715 dac_set_mode(par->dac, DAC_PSEUDO8_8); 715 dac_set_mode(par->dac, DAC_PSEUDO8_8);
716 break; 716 break;
717 case 2: 717 case 2:
718 pr_debug("fb%d: 4 bit pseudocolor, planar\n", info->node); 718 pr_debug("fb%d: 4 bit pseudocolor, planar\n", info->node);
719 719
720 vga_wseq(NULL, 0x11, 0x10); /* basic VGA mode */ 720 vga_wseq(NULL, 0x11, 0x10); /* basic VGA mode */
721 svga_wcrt_mask(0x46, 0x00, 0x04); /* 8bit pixel path */ 721 svga_wcrt_mask(par->state.vgabase, 0x46, 0x00, 0x04); /* 8bit pixel path */
722 dac_set_mode(par->dac, DAC_PSEUDO8_8); 722 dac_set_mode(par->dac, DAC_PSEUDO8_8);
723 break; 723 break;
724 case 3: 724 case 3:
@@ -728,11 +728,11 @@ static int arkfb_set_par(struct fb_info *info)
728 728
729 if (info->var.pixclock > 20000) { 729 if (info->var.pixclock > 20000) {
730 pr_debug("fb%d: not using multiplex\n", info->node); 730 pr_debug("fb%d: not using multiplex\n", info->node);
731 svga_wcrt_mask(0x46, 0x00, 0x04); /* 8bit pixel path */ 731 svga_wcrt_mask(par->state.vgabase, 0x46, 0x00, 0x04); /* 8bit pixel path */
732 dac_set_mode(par->dac, DAC_PSEUDO8_8); 732 dac_set_mode(par->dac, DAC_PSEUDO8_8);
733 } else { 733 } else {
734 pr_debug("fb%d: using multiplex\n", info->node); 734 pr_debug("fb%d: using multiplex\n", info->node);
735 svga_wcrt_mask(0x46, 0x04, 0x04); /* 16bit pixel path */ 735 svga_wcrt_mask(par->state.vgabase, 0x46, 0x04, 0x04); /* 16bit pixel path */
736 dac_set_mode(par->dac, DAC_PSEUDO8_16); 736 dac_set_mode(par->dac, DAC_PSEUDO8_16);
737 hdiv = 2; 737 hdiv = 2;
738 } 738 }
@@ -741,21 +741,21 @@ static int arkfb_set_par(struct fb_info *info)
741 pr_debug("fb%d: 5/5/5 truecolor\n", info->node); 741 pr_debug("fb%d: 5/5/5 truecolor\n", info->node);
742 742
743 vga_wseq(NULL, 0x11, 0x1A); /* 16bpp accel mode */ 743 vga_wseq(NULL, 0x11, 0x1A); /* 16bpp accel mode */
744 svga_wcrt_mask(0x46, 0x04, 0x04); /* 16bit pixel path */ 744 svga_wcrt_mask(par->state.vgabase, 0x46, 0x04, 0x04); /* 16bit pixel path */
745 dac_set_mode(par->dac, DAC_RGB1555_16); 745 dac_set_mode(par->dac, DAC_RGB1555_16);
746 break; 746 break;
747 case 5: 747 case 5:
748 pr_debug("fb%d: 5/6/5 truecolor\n", info->node); 748 pr_debug("fb%d: 5/6/5 truecolor\n", info->node);
749 749
750 vga_wseq(NULL, 0x11, 0x1A); /* 16bpp accel mode */ 750 vga_wseq(NULL, 0x11, 0x1A); /* 16bpp accel mode */
751 svga_wcrt_mask(0x46, 0x04, 0x04); /* 16bit pixel path */ 751 svga_wcrt_mask(par->state.vgabase, 0x46, 0x04, 0x04); /* 16bit pixel path */
752 dac_set_mode(par->dac, DAC_RGB0565_16); 752 dac_set_mode(par->dac, DAC_RGB0565_16);
753 break; 753 break;
754 case 6: 754 case 6:
755 pr_debug("fb%d: 8/8/8 truecolor\n", info->node); 755 pr_debug("fb%d: 8/8/8 truecolor\n", info->node);
756 756
757 vga_wseq(NULL, 0x11, 0x16); /* 8bpp accel mode ??? */ 757 vga_wseq(NULL, 0x11, 0x16); /* 8bpp accel mode ??? */
758 svga_wcrt_mask(0x46, 0x04, 0x04); /* 16bit pixel path */ 758 svga_wcrt_mask(par->state.vgabase, 0x46, 0x04, 0x04); /* 16bit pixel path */
759 dac_set_mode(par->dac, DAC_RGB0888_16); 759 dac_set_mode(par->dac, DAC_RGB0888_16);
760 hmul = 3; 760 hmul = 3;
761 hdiv = 2; 761 hdiv = 2;
@@ -764,7 +764,7 @@ static int arkfb_set_par(struct fb_info *info)
764 pr_debug("fb%d: 8/8/8/8 truecolor\n", info->node); 764 pr_debug("fb%d: 8/8/8/8 truecolor\n", info->node);
765 765
766 vga_wseq(NULL, 0x11, 0x1E); /* 32bpp accel mode */ 766 vga_wseq(NULL, 0x11, 0x1E); /* 32bpp accel mode */
767 svga_wcrt_mask(0x46, 0x04, 0x04); /* 16bit pixel path */ 767 svga_wcrt_mask(par->state.vgabase, 0x46, 0x04, 0x04); /* 16bit pixel path */
768 dac_set_mode(par->dac, DAC_RGB8888_16); 768 dac_set_mode(par->dac, DAC_RGB8888_16);
769 hmul = 2; 769 hmul = 2;
770 break; 770 break;
@@ -786,7 +786,7 @@ static int arkfb_set_par(struct fb_info *info)
786 786
787 memset_io(info->screen_base, 0x00, screen_size); 787 memset_io(info->screen_base, 0x00, screen_size);
788 /* Device and screen back on */ 788 /* Device and screen back on */
789 svga_wcrt_mask(0x17, 0x80, 0x80); 789 svga_wcrt_mask(par->state.vgabase, 0x17, 0x80, 0x80);
790 svga_wseq_mask(par->state.vgabase, 0x01, 0x00, 0x20); 790 svga_wseq_mask(par->state.vgabase, 0x01, 0x00, 0x20);
791 791
792 return 0; 792 return 0;
@@ -863,19 +863,19 @@ static int arkfb_blank(int blank_mode, struct fb_info *info)
863 case FB_BLANK_UNBLANK: 863 case FB_BLANK_UNBLANK:
864 pr_debug("fb%d: unblank\n", info->node); 864 pr_debug("fb%d: unblank\n", info->node);
865 svga_wseq_mask(par->state.vgabase, 0x01, 0x00, 0x20); 865 svga_wseq_mask(par->state.vgabase, 0x01, 0x00, 0x20);
866 svga_wcrt_mask(0x17, 0x80, 0x80); 866 svga_wcrt_mask(par->state.vgabase, 0x17, 0x80, 0x80);
867 break; 867 break;
868 case FB_BLANK_NORMAL: 868 case FB_BLANK_NORMAL:
869 pr_debug("fb%d: blank\n", info->node); 869 pr_debug("fb%d: blank\n", info->node);
870 svga_wseq_mask(par->state.vgabase, 0x01, 0x20, 0x20); 870 svga_wseq_mask(par->state.vgabase, 0x01, 0x20, 0x20);
871 svga_wcrt_mask(0x17, 0x80, 0x80); 871 svga_wcrt_mask(par->state.vgabase, 0x17, 0x80, 0x80);
872 break; 872 break;
873 case FB_BLANK_POWERDOWN: 873 case FB_BLANK_POWERDOWN:
874 case FB_BLANK_HSYNC_SUSPEND: 874 case FB_BLANK_HSYNC_SUSPEND:
875 case FB_BLANK_VSYNC_SUSPEND: 875 case FB_BLANK_VSYNC_SUSPEND:
876 pr_debug("fb%d: sync down\n", info->node); 876 pr_debug("fb%d: sync down\n", info->node);
877 svga_wseq_mask(par->state.vgabase, 0x01, 0x20, 0x20); 877 svga_wseq_mask(par->state.vgabase, 0x01, 0x20, 0x20);
878 svga_wcrt_mask(0x17, 0x00, 0x80); 878 svga_wcrt_mask(par->state.vgabase, 0x17, 0x00, 0x80);
879 break; 879 break;
880 } 880 }
881 return 0; 881 return 0;