aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 14:52:41 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 14:52:41 -0400
commit98523d4630865c407d3787fd592e5e399488b93b (patch)
treeb32f2ef6bdaa43020d67e62d40a31720b9a5758a /drivers
parent8d6cea5111f2daea8acf79d7b4b384a14175ecc1 (diff)
parentaaa7e2f74f11b5f7e30483807b896d7b3369586f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6: (30 commits) sparc64: Update defconfig. sparc: Wire up sys_rt_tgsigqueueinfo(). openprom: Squelch useless GCC warning. sparc: replace uses of CPU_MASK_ALL_PTR sparc64: Add proper dynamic ftrace support. sparc: Simplify code using is_power_of_2() routine. sparc: move of_device common code to of_device_common sparc: remove dma-mapping_{32|64}.h sparc: use dma_map_page instead of dma_map_single sparc: add sync_single_for_device and sync_sg_for_device to struct dma_ops sparc: move the duplication in dma-mapping_{32|64}.h to dma-mapping.h p9100: use standard fields for framebuffer physical address and length leo: use standard fields for framebuffer physical address and length cg6: use standard fields for framebuffer physical address and length cg3: use standard fields for framebuffer physical address and length cg14: use standard fields for framebuffer physical address and length bw2: use standard fields for framebuffer physical address and length sparc64: fix and optimize irq distribution sparc64: Use new dynamic per-cpu allocator. sparc64: Only allocate per-cpu areas for possible cpus. ...
Diffstat (limited to 'drivers')
-rw-r--r--drivers/sbus/char/openprom.c2
-rw-r--r--drivers/video/bw2.c20
-rw-r--r--drivers/video/cg14.c19
-rw-r--r--drivers/video/cg3.c20
-rw-r--r--drivers/video/cg6.c25
-rw-r--r--drivers/video/leo.c14
-rw-r--r--drivers/video/p9100.c20
7 files changed, 50 insertions, 70 deletions
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c
index 124f660a0383..75ac19b1192f 100644
--- a/drivers/sbus/char/openprom.c
+++ b/drivers/sbus/char/openprom.c
@@ -303,7 +303,7 @@ static int openprom_sunos_ioctl(struct inode * inode, struct file * file,
303 struct device_node *dp) 303 struct device_node *dp)
304{ 304{
305 DATA *data = file->private_data; 305 DATA *data = file->private_data;
306 struct openpromio *opp; 306 struct openpromio *opp = NULL;
307 int bufsize, error = 0; 307 int bufsize, error = 0;
308 static int cnt; 308 static int cnt;
309 void __user *argp = (void __user *)arg; 309 void __user *argp = (void __user *)arg;
diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c
index 1e35ba6f18e0..b0b147cb4cb3 100644
--- a/drivers/video/bw2.c
+++ b/drivers/video/bw2.c
@@ -111,9 +111,7 @@ struct bw2_par {
111 u32 flags; 111 u32 flags;
112#define BW2_FLAG_BLANKED 0x00000001 112#define BW2_FLAG_BLANKED 0x00000001
113 113
114 unsigned long physbase;
115 unsigned long which_io; 114 unsigned long which_io;
116 unsigned long fbsize;
117}; 115};
118 116
119/** 117/**
@@ -167,17 +165,15 @@ static int bw2_mmap(struct fb_info *info, struct vm_area_struct *vma)
167 struct bw2_par *par = (struct bw2_par *)info->par; 165 struct bw2_par *par = (struct bw2_par *)info->par;
168 166
169 return sbusfb_mmap_helper(bw2_mmap_map, 167 return sbusfb_mmap_helper(bw2_mmap_map,
170 par->physbase, par->fbsize, 168 info->fix.smem_start, info->fix.smem_len,
171 par->which_io, 169 par->which_io,
172 vma); 170 vma);
173} 171}
174 172
175static int bw2_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) 173static int bw2_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
176{ 174{
177 struct bw2_par *par = (struct bw2_par *) info->par;
178
179 return sbusfb_ioctl_helper(cmd, arg, info, 175 return sbusfb_ioctl_helper(cmd, arg, info,
180 FBTYPE_SUN2BW, 1, par->fbsize); 176 FBTYPE_SUN2BW, 1, info->fix.smem_len);
181} 177}
182 178
183/* 179/*
@@ -294,7 +290,7 @@ static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *
294 290
295 spin_lock_init(&par->lock); 291 spin_lock_init(&par->lock);
296 292
297 par->physbase = op->resource[0].start; 293 info->fix.smem_start = op->resource[0].start;
298 par->which_io = op->resource[0].flags & IORESOURCE_BITS; 294 par->which_io = op->resource[0].flags & IORESOURCE_BITS;
299 295
300 sbusfb_fill_var(&info->var, dp, 1); 296 sbusfb_fill_var(&info->var, dp, 1);
@@ -317,13 +313,13 @@ static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *
317 goto out_unmap_regs; 313 goto out_unmap_regs;
318 } 314 }
319 315
320 par->fbsize = PAGE_ALIGN(linebytes * info->var.yres); 316 info->fix.smem_len = PAGE_ALIGN(linebytes * info->var.yres);
321 317
322 info->flags = FBINFO_DEFAULT; 318 info->flags = FBINFO_DEFAULT;
323 info->fbops = &bw2_ops; 319 info->fbops = &bw2_ops;
324 320
325 info->screen_base = of_ioremap(&op->resource[0], 0, 321 info->screen_base = of_ioremap(&op->resource[0], 0,
326 par->fbsize, "bw2 ram"); 322 info->fix.smem_len, "bw2 ram");
327 if (!info->screen_base) 323 if (!info->screen_base)
328 goto out_unmap_regs; 324 goto out_unmap_regs;
329 325
@@ -338,12 +334,12 @@ static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *
338 dev_set_drvdata(&op->dev, info); 334 dev_set_drvdata(&op->dev, info);
339 335
340 printk(KERN_INFO "%s: bwtwo at %lx:%lx\n", 336 printk(KERN_INFO "%s: bwtwo at %lx:%lx\n",
341 dp->full_name, par->which_io, par->physbase); 337 dp->full_name, par->which_io, info->fix.smem_start);
342 338
343 return 0; 339 return 0;
344 340
345out_unmap_screen: 341out_unmap_screen:
346 of_iounmap(&op->resource[0], info->screen_base, par->fbsize); 342 of_iounmap(&op->resource[0], info->screen_base, info->fix.smem_len);
347 343
348out_unmap_regs: 344out_unmap_regs:
349 of_iounmap(&op->resource[0], par->regs, sizeof(struct bw2_regs)); 345 of_iounmap(&op->resource[0], par->regs, sizeof(struct bw2_regs));
@@ -363,7 +359,7 @@ static int __devexit bw2_remove(struct of_device *op)
363 unregister_framebuffer(info); 359 unregister_framebuffer(info);
364 360
365 of_iounmap(&op->resource[0], par->regs, sizeof(struct bw2_regs)); 361 of_iounmap(&op->resource[0], par->regs, sizeof(struct bw2_regs));
366 of_iounmap(&op->resource[0], info->screen_base, par->fbsize); 362 of_iounmap(&op->resource[0], info->screen_base, info->fix.smem_len);
367 363
368 framebuffer_release(info); 364 framebuffer_release(info);
369 365
diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c
index a2d1882791a5..fe45a3b8d0e0 100644
--- a/drivers/video/cg14.c
+++ b/drivers/video/cg14.c
@@ -196,9 +196,7 @@ struct cg14_par {
196 u32 flags; 196 u32 flags;
197#define CG14_FLAG_BLANKED 0x00000001 197#define CG14_FLAG_BLANKED 0x00000001
198 198
199 unsigned long physbase;
200 unsigned long iospace; 199 unsigned long iospace;
201 unsigned long fbsize;
202 200
203 struct sbus_mmap_map mmap_map[CG14_MMAP_ENTRIES]; 201 struct sbus_mmap_map mmap_map[CG14_MMAP_ENTRIES];
204 202
@@ -271,7 +269,7 @@ static int cg14_mmap(struct fb_info *info, struct vm_area_struct *vma)
271 struct cg14_par *par = (struct cg14_par *) info->par; 269 struct cg14_par *par = (struct cg14_par *) info->par;
272 270
273 return sbusfb_mmap_helper(par->mmap_map, 271 return sbusfb_mmap_helper(par->mmap_map,
274 par->physbase, par->fbsize, 272 info->fix.smem_start, info->fix.smem_len,
275 par->iospace, vma); 273 par->iospace, vma);
276} 274}
277 275
@@ -343,7 +341,8 @@ static int cg14_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
343 341
344 default: 342 default:
345 ret = sbusfb_ioctl_helper(cmd, arg, info, 343 ret = sbusfb_ioctl_helper(cmd, arg, info,
346 FBTYPE_MDICOLOR, 8, par->fbsize); 344 FBTYPE_MDICOLOR, 8,
345 info->fix.smem_len);
347 break; 346 break;
348 }; 347 };
349 348
@@ -462,7 +461,7 @@ static void cg14_unmap_regs(struct of_device *op, struct fb_info *info,
462 par->cursor, sizeof(struct cg14_cursor)); 461 par->cursor, sizeof(struct cg14_cursor));
463 if (info->screen_base) 462 if (info->screen_base)
464 of_iounmap(&op->resource[1], 463 of_iounmap(&op->resource[1],
465 info->screen_base, par->fbsize); 464 info->screen_base, info->fix.smem_len);
466} 465}
467 466
468static int __devinit cg14_probe(struct of_device *op, const struct of_device_id *match) 467static int __devinit cg14_probe(struct of_device *op, const struct of_device_id *match)
@@ -488,14 +487,14 @@ static int __devinit cg14_probe(struct of_device *op, const struct of_device_id
488 487
489 linebytes = of_getintprop_default(dp, "linebytes", 488 linebytes = of_getintprop_default(dp, "linebytes",
490 info->var.xres); 489 info->var.xres);
491 par->fbsize = PAGE_ALIGN(linebytes * info->var.yres); 490 info->fix.smem_len = PAGE_ALIGN(linebytes * info->var.yres);
492 491
493 if (!strcmp(dp->parent->name, "sbus") || 492 if (!strcmp(dp->parent->name, "sbus") ||
494 !strcmp(dp->parent->name, "sbi")) { 493 !strcmp(dp->parent->name, "sbi")) {
495 par->physbase = op->resource[0].start; 494 info->fix.smem_start = op->resource[0].start;
496 par->iospace = op->resource[0].flags & IORESOURCE_BITS; 495 par->iospace = op->resource[0].flags & IORESOURCE_BITS;
497 } else { 496 } else {
498 par->physbase = op->resource[1].start; 497 info->fix.smem_start = op->resource[1].start;
499 par->iospace = op->resource[0].flags & IORESOURCE_BITS; 498 par->iospace = op->resource[0].flags & IORESOURCE_BITS;
500 } 499 }
501 500
@@ -507,7 +506,7 @@ static int __devinit cg14_probe(struct of_device *op, const struct of_device_id
507 sizeof(struct cg14_cursor), "cg14 cursor"); 506 sizeof(struct cg14_cursor), "cg14 cursor");
508 507
509 info->screen_base = of_ioremap(&op->resource[1], 0, 508 info->screen_base = of_ioremap(&op->resource[1], 0,
510 par->fbsize, "cg14 ram"); 509 info->fix.smem_len, "cg14 ram");
511 510
512 if (!par->regs || !par->clut || !par->cursor || !info->screen_base) 511 if (!par->regs || !par->clut || !par->cursor || !info->screen_base)
513 goto out_unmap_regs; 512 goto out_unmap_regs;
@@ -557,7 +556,7 @@ static int __devinit cg14_probe(struct of_device *op, const struct of_device_id
557 556
558 printk(KERN_INFO "%s: cgfourteen at %lx:%lx, %dMB\n", 557 printk(KERN_INFO "%s: cgfourteen at %lx:%lx, %dMB\n",
559 dp->full_name, 558 dp->full_name,
560 par->iospace, par->physbase, 559 par->iospace, info->fix.smem_start,
561 par->ramsize >> 20); 560 par->ramsize >> 20);
562 561
563 return 0; 562 return 0;
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c
index 99f87fb61d05..b2319fa7286f 100644
--- a/drivers/video/cg3.c
+++ b/drivers/video/cg3.c
@@ -118,9 +118,7 @@ struct cg3_par {
118#define CG3_FLAG_BLANKED 0x00000001 118#define CG3_FLAG_BLANKED 0x00000001
119#define CG3_FLAG_RDI 0x00000002 119#define CG3_FLAG_RDI 0x00000002
120 120
121 unsigned long physbase;
122 unsigned long which_io; 121 unsigned long which_io;
123 unsigned long fbsize;
124}; 122};
125 123
126/** 124/**
@@ -231,17 +229,15 @@ static int cg3_mmap(struct fb_info *info, struct vm_area_struct *vma)
231 struct cg3_par *par = (struct cg3_par *)info->par; 229 struct cg3_par *par = (struct cg3_par *)info->par;
232 230
233 return sbusfb_mmap_helper(cg3_mmap_map, 231 return sbusfb_mmap_helper(cg3_mmap_map,
234 par->physbase, par->fbsize, 232 info->fix.smem_start, info->fix.smem_len,
235 par->which_io, 233 par->which_io,
236 vma); 234 vma);
237} 235}
238 236
239static int cg3_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) 237static int cg3_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
240{ 238{
241 struct cg3_par *par = (struct cg3_par *) info->par;
242
243 return sbusfb_ioctl_helper(cmd, arg, info, 239 return sbusfb_ioctl_helper(cmd, arg, info,
244 FBTYPE_SUN3COLOR, 8, par->fbsize); 240 FBTYPE_SUN3COLOR, 8, info->fix.smem_len);
245} 241}
246 242
247/* 243/*
@@ -368,7 +364,7 @@ static int __devinit cg3_probe(struct of_device *op,
368 364
369 spin_lock_init(&par->lock); 365 spin_lock_init(&par->lock);
370 366
371 par->physbase = op->resource[0].start; 367 info->fix.smem_start = op->resource[0].start;
372 par->which_io = op->resource[0].flags & IORESOURCE_BITS; 368 par->which_io = op->resource[0].flags & IORESOURCE_BITS;
373 369
374 sbusfb_fill_var(&info->var, dp, 8); 370 sbusfb_fill_var(&info->var, dp, 8);
@@ -382,7 +378,7 @@ static int __devinit cg3_probe(struct of_device *op,
382 378
383 linebytes = of_getintprop_default(dp, "linebytes", 379 linebytes = of_getintprop_default(dp, "linebytes",
384 info->var.xres); 380 info->var.xres);
385 par->fbsize = PAGE_ALIGN(linebytes * info->var.yres); 381 info->fix.smem_len = PAGE_ALIGN(linebytes * info->var.yres);
386 382
387 par->regs = of_ioremap(&op->resource[0], CG3_REGS_OFFSET, 383 par->regs = of_ioremap(&op->resource[0], CG3_REGS_OFFSET,
388 sizeof(struct cg3_regs), "cg3 regs"); 384 sizeof(struct cg3_regs), "cg3 regs");
@@ -392,7 +388,7 @@ static int __devinit cg3_probe(struct of_device *op,
392 info->flags = FBINFO_DEFAULT; 388 info->flags = FBINFO_DEFAULT;
393 info->fbops = &cg3_ops; 389 info->fbops = &cg3_ops;
394 info->screen_base = of_ioremap(&op->resource[0], CG3_RAM_OFFSET, 390 info->screen_base = of_ioremap(&op->resource[0], CG3_RAM_OFFSET,
395 par->fbsize, "cg3 ram"); 391 info->fix.smem_len, "cg3 ram");
396 if (!info->screen_base) 392 if (!info->screen_base)
397 goto out_unmap_regs; 393 goto out_unmap_regs;
398 394
@@ -418,7 +414,7 @@ static int __devinit cg3_probe(struct of_device *op,
418 dev_set_drvdata(&op->dev, info); 414 dev_set_drvdata(&op->dev, info);
419 415
420 printk(KERN_INFO "%s: cg3 at %lx:%lx\n", 416 printk(KERN_INFO "%s: cg3 at %lx:%lx\n",
421 dp->full_name, par->which_io, par->physbase); 417 dp->full_name, par->which_io, info->fix.smem_start);
422 418
423 return 0; 419 return 0;
424 420
@@ -426,7 +422,7 @@ out_dealloc_cmap:
426 fb_dealloc_cmap(&info->cmap); 422 fb_dealloc_cmap(&info->cmap);
427 423
428out_unmap_screen: 424out_unmap_screen:
429 of_iounmap(&op->resource[0], info->screen_base, par->fbsize); 425 of_iounmap(&op->resource[0], info->screen_base, info->fix.smem_len);
430 426
431out_unmap_regs: 427out_unmap_regs:
432 of_iounmap(&op->resource[0], par->regs, sizeof(struct cg3_regs)); 428 of_iounmap(&op->resource[0], par->regs, sizeof(struct cg3_regs));
@@ -447,7 +443,7 @@ static int __devexit cg3_remove(struct of_device *op)
447 fb_dealloc_cmap(&info->cmap); 443 fb_dealloc_cmap(&info->cmap);
448 444
449 of_iounmap(&op->resource[0], par->regs, sizeof(struct cg3_regs)); 445 of_iounmap(&op->resource[0], par->regs, sizeof(struct cg3_regs));
450 of_iounmap(&op->resource[0], info->screen_base, par->fbsize); 446 of_iounmap(&op->resource[0], info->screen_base, info->fix.smem_len);
451 447
452 framebuffer_release(info); 448 framebuffer_release(info);
453 449
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c
index 940ec04f0f1b..0d47c6030e3d 100644
--- a/drivers/video/cg6.c
+++ b/drivers/video/cg6.c
@@ -263,9 +263,7 @@ struct cg6_par {
263 u32 flags; 263 u32 flags;
264#define CG6_FLAG_BLANKED 0x00000001 264#define CG6_FLAG_BLANKED 0x00000001
265 265
266 unsigned long physbase;
267 unsigned long which_io; 266 unsigned long which_io;
268 unsigned long fbsize;
269}; 267};
270 268
271static int cg6_sync(struct fb_info *info) 269static int cg6_sync(struct fb_info *info)
@@ -596,16 +594,14 @@ static int cg6_mmap(struct fb_info *info, struct vm_area_struct *vma)
596 struct cg6_par *par = (struct cg6_par *)info->par; 594 struct cg6_par *par = (struct cg6_par *)info->par;
597 595
598 return sbusfb_mmap_helper(cg6_mmap_map, 596 return sbusfb_mmap_helper(cg6_mmap_map,
599 par->physbase, par->fbsize, 597 info->fix.smem_start, info->fix.smem_len,
600 par->which_io, vma); 598 par->which_io, vma);
601} 599}
602 600
603static int cg6_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) 601static int cg6_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
604{ 602{
605 struct cg6_par *par = (struct cg6_par *)info->par;
606
607 return sbusfb_ioctl_helper(cmd, arg, info, 603 return sbusfb_ioctl_helper(cmd, arg, info,
608 FBTYPE_SUNFAST_COLOR, 8, par->fbsize); 604 FBTYPE_SUNFAST_COLOR, 8, info->fix.smem_len);
609} 605}
610 606
611/* 607/*
@@ -631,12 +627,12 @@ static void __devinit cg6_init_fix(struct fb_info *info, int linebytes)
631 break; 627 break;
632 }; 628 };
633 if (((conf >> CG6_FHC_REV_SHIFT) & CG6_FHC_REV_MASK) >= 11) { 629 if (((conf >> CG6_FHC_REV_SHIFT) & CG6_FHC_REV_MASK) >= 11) {
634 if (par->fbsize <= 0x100000) 630 if (info->fix.smem_len <= 0x100000)
635 cg6_card_name = "TGX"; 631 cg6_card_name = "TGX";
636 else 632 else
637 cg6_card_name = "TGX+"; 633 cg6_card_name = "TGX+";
638 } else { 634 } else {
639 if (par->fbsize <= 0x100000) 635 if (info->fix.smem_len <= 0x100000)
640 cg6_card_name = "GX"; 636 cg6_card_name = "GX";
641 else 637 else
642 cg6_card_name = "GX+"; 638 cg6_card_name = "GX+";
@@ -738,7 +734,8 @@ static void cg6_unmap_regs(struct of_device *op, struct fb_info *info,
738 of_iounmap(&op->resource[0], par->fhc, sizeof(u32)); 734 of_iounmap(&op->resource[0], par->fhc, sizeof(u32));
739 735
740 if (info->screen_base) 736 if (info->screen_base)
741 of_iounmap(&op->resource[0], info->screen_base, par->fbsize); 737 of_iounmap(&op->resource[0], info->screen_base,
738 info->fix.smem_len);
742} 739}
743 740
744static int __devinit cg6_probe(struct of_device *op, 741static int __devinit cg6_probe(struct of_device *op,
@@ -759,7 +756,7 @@ static int __devinit cg6_probe(struct of_device *op,
759 756
760 spin_lock_init(&par->lock); 757 spin_lock_init(&par->lock);
761 758
762 par->physbase = op->resource[0].start; 759 info->fix.smem_start = op->resource[0].start;
763 par->which_io = op->resource[0].flags & IORESOURCE_BITS; 760 par->which_io = op->resource[0].flags & IORESOURCE_BITS;
764 761
765 sbusfb_fill_var(&info->var, dp, 8); 762 sbusfb_fill_var(&info->var, dp, 8);
@@ -769,11 +766,11 @@ static int __devinit cg6_probe(struct of_device *op,
769 766
770 linebytes = of_getintprop_default(dp, "linebytes", 767 linebytes = of_getintprop_default(dp, "linebytes",
771 info->var.xres); 768 info->var.xres);
772 par->fbsize = PAGE_ALIGN(linebytes * info->var.yres); 769 info->fix.smem_len = PAGE_ALIGN(linebytes * info->var.yres);
773 770
774 dblbuf = of_getintprop_default(dp, "dblbuf", 0); 771 dblbuf = of_getintprop_default(dp, "dblbuf", 0);
775 if (dblbuf) 772 if (dblbuf)
776 par->fbsize *= 4; 773 info->fix.smem_len *= 4;
777 774
778 par->fbc = of_ioremap(&op->resource[0], CG6_FBC_OFFSET, 775 par->fbc = of_ioremap(&op->resource[0], CG6_FBC_OFFSET,
779 4096, "cgsix fbc"); 776 4096, "cgsix fbc");
@@ -792,7 +789,7 @@ static int __devinit cg6_probe(struct of_device *op,
792 info->fbops = &cg6_ops; 789 info->fbops = &cg6_ops;
793 790
794 info->screen_base = of_ioremap(&op->resource[0], CG6_RAM_OFFSET, 791 info->screen_base = of_ioremap(&op->resource[0], CG6_RAM_OFFSET,
795 par->fbsize, "cgsix ram"); 792 info->fix.smem_len, "cgsix ram");
796 if (!par->fbc || !par->tec || !par->thc || 793 if (!par->fbc || !par->tec || !par->thc ||
797 !par->bt || !par->fhc || !info->screen_base) 794 !par->bt || !par->fhc || !info->screen_base)
798 goto out_unmap_regs; 795 goto out_unmap_regs;
@@ -817,7 +814,7 @@ static int __devinit cg6_probe(struct of_device *op,
817 814
818 printk(KERN_INFO "%s: CGsix [%s] at %lx:%lx\n", 815 printk(KERN_INFO "%s: CGsix [%s] at %lx:%lx\n",
819 dp->full_name, info->fix.id, 816 dp->full_name, info->fix.id,
820 par->which_io, par->physbase); 817 par->which_io, info->fix.smem_start);
821 818
822 return 0; 819 return 0;
823 820
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
diff --git a/drivers/video/p9100.c b/drivers/video/p9100.c
index 7000f2cd5854..7fa4ab01b0d3 100644
--- a/drivers/video/p9100.c
+++ b/drivers/video/p9100.c
@@ -134,9 +134,7 @@ struct p9100_par {
134 u32 flags; 134 u32 flags;
135#define P9100_FLAG_BLANKED 0x00000001 135#define P9100_FLAG_BLANKED 0x00000001
136 136
137 unsigned long physbase;
138 unsigned long which_io; 137 unsigned long which_io;
139 unsigned long fbsize;
140}; 138};
141 139
142/** 140/**
@@ -224,18 +222,16 @@ static int p9100_mmap(struct fb_info *info, struct vm_area_struct *vma)
224 struct p9100_par *par = (struct p9100_par *)info->par; 222 struct p9100_par *par = (struct p9100_par *)info->par;
225 223
226 return sbusfb_mmap_helper(p9100_mmap_map, 224 return sbusfb_mmap_helper(p9100_mmap_map,
227 par->physbase, par->fbsize, 225 info->fix.smem_start, info->fix.smem_len,
228 par->which_io, vma); 226 par->which_io, vma);
229} 227}
230 228
231static int p9100_ioctl(struct fb_info *info, unsigned int cmd, 229static int p9100_ioctl(struct fb_info *info, unsigned int cmd,
232 unsigned long arg) 230 unsigned long arg)
233{ 231{
234 struct p9100_par *par = (struct p9100_par *) info->par;
235
236 /* Make it look like a cg3. */ 232 /* Make it look like a cg3. */
237 return sbusfb_ioctl_helper(cmd, arg, info, 233 return sbusfb_ioctl_helper(cmd, arg, info,
238 FBTYPE_SUN3COLOR, 8, par->fbsize); 234 FBTYPE_SUN3COLOR, 8, info->fix.smem_len);
239} 235}
240 236
241/* 237/*
@@ -271,7 +267,7 @@ static int __devinit p9100_probe(struct of_device *op, const struct of_device_id
271 spin_lock_init(&par->lock); 267 spin_lock_init(&par->lock);
272 268
273 /* This is the framebuffer and the only resource apps can mmap. */ 269 /* This is the framebuffer and the only resource apps can mmap. */
274 par->physbase = op->resource[2].start; 270 info->fix.smem_start = op->resource[2].start;
275 par->which_io = op->resource[2].flags & IORESOURCE_BITS; 271 par->which_io = op->resource[2].flags & IORESOURCE_BITS;
276 272
277 sbusfb_fill_var(&info->var, dp, 8); 273 sbusfb_fill_var(&info->var, dp, 8);
@@ -280,7 +276,7 @@ static int __devinit p9100_probe(struct of_device *op, const struct of_device_id
280 info->var.blue.length = 8; 276 info->var.blue.length = 8;
281 277
282 linebytes = of_getintprop_default(dp, "linebytes", info->var.xres); 278 linebytes = of_getintprop_default(dp, "linebytes", info->var.xres);
283 par->fbsize = PAGE_ALIGN(linebytes * info->var.yres); 279 info->fix.smem_len = PAGE_ALIGN(linebytes * info->var.yres);
284 280
285 par->regs = of_ioremap(&op->resource[0], 0, 281 par->regs = of_ioremap(&op->resource[0], 0,
286 sizeof(struct p9100_regs), "p9100 regs"); 282 sizeof(struct p9100_regs), "p9100 regs");
@@ -290,7 +286,7 @@ static int __devinit p9100_probe(struct of_device *op, const struct of_device_id
290 info->flags = FBINFO_DEFAULT; 286 info->flags = FBINFO_DEFAULT;
291 info->fbops = &p9100_ops; 287 info->fbops = &p9100_ops;
292 info->screen_base = of_ioremap(&op->resource[2], 0, 288 info->screen_base = of_ioremap(&op->resource[2], 0,
293 par->fbsize, "p9100 ram"); 289 info->fix.smem_len, "p9100 ram");
294 if (!info->screen_base) 290 if (!info->screen_base)
295 goto out_unmap_regs; 291 goto out_unmap_regs;
296 292
@@ -311,7 +307,7 @@ static int __devinit p9100_probe(struct of_device *op, const struct of_device_id
311 307
312 printk(KERN_INFO "%s: p9100 at %lx:%lx\n", 308 printk(KERN_INFO "%s: p9100 at %lx:%lx\n",
313 dp->full_name, 309 dp->full_name,
314 par->which_io, par->physbase); 310 par->which_io, info->fix.smem_start);
315 311
316 return 0; 312 return 0;
317 313
@@ -319,7 +315,7 @@ out_dealloc_cmap:
319 fb_dealloc_cmap(&info->cmap); 315 fb_dealloc_cmap(&info->cmap);
320 316
321out_unmap_screen: 317out_unmap_screen:
322 of_iounmap(&op->resource[2], info->screen_base, par->fbsize); 318 of_iounmap(&op->resource[2], info->screen_base, info->fix.smem_len);
323 319
324out_unmap_regs: 320out_unmap_regs:
325 of_iounmap(&op->resource[0], par->regs, sizeof(struct p9100_regs)); 321 of_iounmap(&op->resource[0], par->regs, sizeof(struct p9100_regs));
@@ -340,7 +336,7 @@ static int __devexit p9100_remove(struct of_device *op)
340 fb_dealloc_cmap(&info->cmap); 336 fb_dealloc_cmap(&info->cmap);
341 337
342 of_iounmap(&op->resource[0], par->regs, sizeof(struct p9100_regs)); 338 of_iounmap(&op->resource[0], par->regs, sizeof(struct p9100_regs));
343 of_iounmap(&op->resource[2], info->screen_base, par->fbsize); 339 of_iounmap(&op->resource[2], info->screen_base, info->fix.smem_len);
344 340
345 framebuffer_release(info); 341 framebuffer_release(info);
346 342