vserver 1.9.5.x5
[linux-2.6.git] / drivers / video / p9100.c
index 7fbbef4..7808a01 100644 (file)
@@ -129,7 +129,7 @@ struct p9100_cmd_parameng {
 
 struct p9100_par {
        spinlock_t              lock;
-       struct p9100_regs       *regs;
+       struct p9100_regs       __iomem *regs;
 
        u32                     flags;
 #define P9100_FLAG_BLANKED     0x00000001
@@ -155,7 +155,7 @@ static int p9100_setcolreg(unsigned regno,
                           unsigned transp, struct fb_info *info)
 {
        struct p9100_par *par = (struct p9100_par *) info->par;
-       struct p9100_regs *regs = par->regs;
+       struct p9100_regs __iomem *regs = par->regs;
        unsigned long flags;
 
        if (regno >= 256)
@@ -186,24 +186,24 @@ static int
 p9100_blank(int blank, struct fb_info *info)
 {
        struct p9100_par *par = (struct p9100_par *) info->par;
-       struct p9100_regs *regs = par->regs;
+       struct p9100_regs __iomem *regs = par->regs;
        unsigned long flags;
        u32 val;
 
        spin_lock_irqsave(&par->lock, flags);
 
        switch (blank) {
-       case 0: /* Unblanking */
+       case FB_BLANK_UNBLANK: /* Unblanking */
                val = sbus_readl(&regs->vid_screenpaint_timectl1);
                val |= SCREENPAINT_TIMECTL1_ENABLE_VIDEO;
                sbus_writel(val, &regs->vid_screenpaint_timectl1);
                par->flags &= ~P9100_FLAG_BLANKED;
                break;
 
-       case 1: /* Normal blanking */
-       case 2: /* VESA blank (vsync off) */
-       case 3: /* VESA blank (hsync off) */
-       case 4: /* Poweroff */
+       case FB_BLANK_NORMAL: /* Normal blanking */
+       case FB_BLANK_VSYNC_SUSPEND: /* VESA blank (vsync off) */
+       case FB_BLANK_HSYNC_SUSPEND: /* VESA blank (hsync off) */
+       case FB_BLANK_POWERDOWN: /* Poweroff */
                val = sbus_readl(&regs->vid_screenpaint_timectl1);
                val &= ~SCREENPAINT_TIMECTL1_ENABLE_VIDEO;
                sbus_writel(val, &regs->vid_screenpaint_timectl1);
@@ -293,21 +293,18 @@ static void p9100_init_one(struct sbus_dev *sdev)
                                       all->info.var.xres);
        all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres);
 
-       all->par.regs = (struct p9100_regs *)
-               sbus_ioremap(&sdev->resource[0], 0,
+       all->par.regs = sbus_ioremap(&sdev->resource[0], 0,
                             sizeof(struct p9100_regs), "p9100 regs");
 
        all->info.flags = FBINFO_DEFAULT;
        all->info.fbops = &p9100_ops;
 #ifdef CONFIG_SPARC32
-       all->info.screen_base = (char *)
+       all->info.screen_base = (char __iomem *)
                prom_getintdefault(sdev->prom_node, "address", 0);
 #endif
        if (!all->info.screen_base)
-               all->info.screen_base = (char *)
-                       sbus_ioremap(&sdev->resource[2], 0,
+               all->info.screen_base = sbus_ioremap(&sdev->resource[2], 0,
                                     all->par.fbsize, "p9100 ram");
-       all->info.currcon = -1;
        all->info.par = &all->par;
 
        p9100_blank(0, &all->info);