aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/leo.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/leo.c')
-rw-r--r--drivers/video/leo.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/video/leo.c b/drivers/video/leo.c
index 7c7e8c2da9d9..e145e2d16fe3 100644
--- a/drivers/video/leo.c
+++ b/drivers/video/leo.c
@@ -191,9 +191,7 @@ struct leo_par {
191 u32 flags; 191 u32 flags;
192#define LEO_FLAG_BLANKED 0x00000001 192#define LEO_FLAG_BLANKED 0x00000001
193 193
194 unsigned long physbase;
195 unsigned long which_io; 194 unsigned long which_io;
196 unsigned long fbsize;
197}; 195};
198 196
199static void leo_wait(struct leo_lx_krn __iomem *lx_krn) 197static void leo_wait(struct leo_lx_krn __iomem *lx_krn)
@@ -420,16 +418,14 @@ static int leo_mmap(struct fb_info *info, struct vm_area_struct *vma)
420 struct leo_par *par = (struct leo_par *)info->par; 418 struct leo_par *par = (struct leo_par *)info->par;
421 419
422 return sbusfb_mmap_helper(leo_mmap_map, 420 return sbusfb_mmap_helper(leo_mmap_map,
423 par->physbase, par->fbsize, 421 info->fix.smem_start, info->fix.smem_len,
424 par->which_io, vma); 422 par->which_io, vma);
425} 423}
426 424
427static int leo_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) 425static int leo_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
428{ 426{
429 struct leo_par *par = (struct leo_par *) info->par;
430
431 return sbusfb_ioctl_helper(cmd, arg, info, 427 return sbusfb_ioctl_helper(cmd, arg, info,
432 FBTYPE_SUNLEO, 32, par->fbsize); 428 FBTYPE_SUNLEO, 32, info->fix.smem_len);
433} 429}
434 430
435/* 431/*
@@ -569,7 +565,7 @@ static int __devinit leo_probe(struct of_device *op,
569 565
570 spin_lock_init(&par->lock); 566 spin_lock_init(&par->lock);
571 567
572 par->physbase = op->resource[0].start; 568 info->fix.smem_start = op->resource[0].start;
573 par->which_io = op->resource[0].flags & IORESOURCE_BITS; 569 par->which_io = op->resource[0].flags & IORESOURCE_BITS;
574 570
575 sbusfb_fill_var(&info->var, dp, 32); 571 sbusfb_fill_var(&info->var, dp, 32);
@@ -577,7 +573,7 @@ static int __devinit leo_probe(struct of_device *op,
577 573
578 linebytes = of_getintprop_default(dp, "linebytes", 574 linebytes = of_getintprop_default(dp, "linebytes",
579 info->var.xres); 575 info->var.xres);
580 par->fbsize = PAGE_ALIGN(linebytes * info->var.yres); 576 info->fix.smem_len = PAGE_ALIGN(linebytes * info->var.yres);
581 577
582 par->lc_ss0_usr = 578 par->lc_ss0_usr =
583 of_ioremap(&op->resource[0], LEO_OFF_LC_SS0_USR, 579 of_ioremap(&op->resource[0], LEO_OFF_LC_SS0_USR,
@@ -627,7 +623,7 @@ static int __devinit leo_probe(struct of_device *op,
627 623
628 printk(KERN_INFO "%s: leo at %lx:%lx\n", 624 printk(KERN_INFO "%s: leo at %lx:%lx\n",
629 dp->full_name, 625 dp->full_name,
630 par->which_io, par->physbase); 626 par->which_io, info->fix.smem_start);
631 627
632 return 0; 628 return 0;
633 629