Commit 6cd5a86b authored by Robert Reif's avatar Robert Reif Committed by David S. Miller

sparc video: remove open boot prom code

Replace remaining open boot prom code with of.

Boot tested on sparc32 and compile tested on sparc64.
Signed-off-by: default avatarRobert Reif <reif@earthlink.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dc5dc7e6
...@@ -17,11 +17,9 @@ ...@@ -17,11 +17,9 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/of_device.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/oplib.h>
#include <asm/prom.h>
#include <asm/of_device.h>
#include <asm/fbio.h> #include <asm/fbio.h>
#include "sbuslib.h" #include "sbuslib.h"
...@@ -299,7 +297,7 @@ static int __devinit bw2_probe(struct of_device *op, const struct of_device_id * ...@@ -299,7 +297,7 @@ static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *
par->physbase = op->resource[0].start; par->physbase = op->resource[0].start;
par->which_io = op->resource[0].flags & IORESOURCE_BITS; par->which_io = op->resource[0].flags & IORESOURCE_BITS;
sbusfb_fill_var(&info->var, dp->node, 1); sbusfb_fill_var(&info->var, dp, 1);
linebytes = of_getintprop_default(dp, "linebytes", linebytes = of_getintprop_default(dp, "linebytes",
info->var.xres); info->var.xres);
......
...@@ -17,10 +17,9 @@ ...@@ -17,10 +17,9 @@
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/of_device.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h>
#include <asm/of_device.h>
#include <asm/fbio.h> #include <asm/fbio.h>
#include "sbuslib.h" #include "sbuslib.h"
...@@ -482,7 +481,7 @@ static int __devinit cg14_probe(struct of_device *op, const struct of_device_id ...@@ -482,7 +481,7 @@ static int __devinit cg14_probe(struct of_device *op, const struct of_device_id
spin_lock_init(&par->lock); spin_lock_init(&par->lock);
sbusfb_fill_var(&info->var, dp->node, 8); sbusfb_fill_var(&info->var, dp, 8);
info->var.red.length = 8; info->var.red.length = 8;
info->var.green.length = 8; info->var.green.length = 8;
info->var.blue.length = 8; info->var.blue.length = 8;
......
...@@ -17,11 +17,9 @@ ...@@ -17,11 +17,9 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/of_device.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/oplib.h>
#include <asm/prom.h>
#include <asm/of_device.h>
#include <asm/fbio.h> #include <asm/fbio.h>
#include "sbuslib.h" #include "sbuslib.h"
...@@ -373,7 +371,7 @@ static int __devinit cg3_probe(struct of_device *op, ...@@ -373,7 +371,7 @@ static int __devinit cg3_probe(struct of_device *op,
par->physbase = op->resource[0].start; par->physbase = op->resource[0].start;
par->which_io = op->resource[0].flags & IORESOURCE_BITS; par->which_io = op->resource[0].flags & IORESOURCE_BITS;
sbusfb_fill_var(&info->var, dp->node, 8); sbusfb_fill_var(&info->var, dp, 8);
info->var.red.length = 8; info->var.red.length = 8;
info->var.green.length = 8; info->var.green.length = 8;
info->var.blue.length = 8; info->var.blue.length = 8;
......
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/of_device.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/of_device.h>
#include <asm/fbio.h> #include <asm/fbio.h>
#include "sbuslib.h" #include "sbuslib.h"
...@@ -728,7 +728,7 @@ static int __devinit cg6_probe(struct of_device *op, ...@@ -728,7 +728,7 @@ static int __devinit cg6_probe(struct of_device *op,
par->physbase = op->resource[0].start; par->physbase = op->resource[0].start;
par->which_io = op->resource[0].flags & IORESOURCE_BITS; par->which_io = op->resource[0].flags & IORESOURCE_BITS;
sbusfb_fill_var(&info->var, dp->node, 8); sbusfb_fill_var(&info->var, dp, 8);
info->var.red.length = 8; info->var.red.length = 8;
info->var.green.length = 8; info->var.green.length = 8;
info->var.blue.length = 8; info->var.blue.length = 8;
......
...@@ -16,11 +16,10 @@ ...@@ -16,11 +16,10 @@
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/of_device.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/upa.h> #include <asm/upa.h>
#include <asm/prom.h>
#include <asm/of_device.h>
#include <asm/fbio.h> #include <asm/fbio.h>
#include "sbuslib.h" #include "sbuslib.h"
...@@ -941,7 +940,7 @@ static int __devinit ffb_probe(struct of_device *op, ...@@ -941,7 +940,7 @@ static int __devinit ffb_probe(struct of_device *op,
info->screen_base = (char *) par->physbase + FFB_DFB24_POFF; info->screen_base = (char *) par->physbase + FFB_DFB24_POFF;
info->pseudo_palette = par->pseudo_palette; info->pseudo_palette = par->pseudo_palette;
sbusfb_fill_var(&info->var, dp->node, 32); sbusfb_fill_var(&info->var, dp, 32);
par->fbsize = PAGE_ALIGN(info->var.xres * info->var.yres * 4); par->fbsize = PAGE_ALIGN(info->var.xres * info->var.yres * 4);
ffb_fixup_var_rgb(&info->var); ffb_fixup_var_rgb(&info->var);
......
...@@ -16,10 +16,9 @@ ...@@ -16,10 +16,9 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/of_device.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h>
#include <asm/of_device.h>
#include <asm/fbio.h> #include <asm/fbio.h>
#include "sbuslib.h" #include "sbuslib.h"
...@@ -562,7 +561,7 @@ static int __devinit leo_probe(struct of_device *op, const struct of_device_id * ...@@ -562,7 +561,7 @@ static int __devinit leo_probe(struct of_device *op, const struct of_device_id *
par->physbase = op->resource[0].start; par->physbase = op->resource[0].start;
par->which_io = op->resource[0].flags & IORESOURCE_BITS; par->which_io = op->resource[0].flags & IORESOURCE_BITS;
sbusfb_fill_var(&info->var, dp->node, 32); sbusfb_fill_var(&info->var, dp, 32);
leo_fixup_var_rgb(&info->var); leo_fixup_var_rgb(&info->var);
linebytes = of_getintprop_default(dp, "linebytes", linebytes = of_getintprop_default(dp, "linebytes",
......
...@@ -15,10 +15,9 @@ ...@@ -15,10 +15,9 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/of_device.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h>
#include <asm/of_device.h>
#include <asm/fbio.h> #include <asm/fbio.h>
#include "sbuslib.h" #include "sbuslib.h"
...@@ -275,7 +274,7 @@ static int __devinit p9100_probe(struct of_device *op, const struct of_device_id ...@@ -275,7 +274,7 @@ static int __devinit p9100_probe(struct of_device *op, const struct of_device_id
par->physbase = op->resource[2].start; par->physbase = op->resource[2].start;
par->which_io = op->resource[2].flags & IORESOURCE_BITS; par->which_io = op->resource[2].flags & IORESOURCE_BITS;
sbusfb_fill_var(&info->var, dp->node, 8); sbusfb_fill_var(&info->var, dp, 8);
info->var.red.length = 8; info->var.red.length = 8;
info->var.green.length = 8; info->var.green.length = 8;
info->var.blue.length = 8; info->var.blue.length = 8;
......
...@@ -10,18 +10,19 @@ ...@@ -10,18 +10,19 @@
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/of_device.h>
#include <asm/oplib.h>
#include <asm/fbio.h> #include <asm/fbio.h>
#include "sbuslib.h" #include "sbuslib.h"
void sbusfb_fill_var(struct fb_var_screeninfo *var, int prom_node, int bpp) void sbusfb_fill_var(struct fb_var_screeninfo *var, struct device_node *dp,
int bpp)
{ {
memset(var, 0, sizeof(*var)); memset(var, 0, sizeof(*var));
var->xres = prom_getintdefault(prom_node, "width", 1152); var->xres = of_getintprop_default(dp, "width", 1152);
var->yres = prom_getintdefault(prom_node, "height", 900); var->yres = of_getintprop_default(dp, "height", 900);
var->xres_virtual = var->xres; var->xres_virtual = var->xres;
var->yres_virtual = var->yres; var->yres_virtual = var->yres;
var->bits_per_pixel = bpp; var->bits_per_pixel = bpp;
......
...@@ -11,7 +11,8 @@ struct sbus_mmap_map { ...@@ -11,7 +11,8 @@ struct sbus_mmap_map {
#define SBUS_MMAP_FBSIZE(n) (-n) #define SBUS_MMAP_FBSIZE(n) (-n)
#define SBUS_MMAP_EMPTY 0x80000000 #define SBUS_MMAP_EMPTY 0x80000000
extern void sbusfb_fill_var(struct fb_var_screeninfo *var, int prom_node, int bpp); extern void sbusfb_fill_var(struct fb_var_screeninfo *var,
struct device_node *dp, int bpp);
struct vm_area_struct; struct vm_area_struct;
extern int sbusfb_mmap_helper(struct sbus_mmap_map *map, extern int sbusfb_mmap_helper(struct sbus_mmap_map *map,
unsigned long physbase, unsigned long fbsize, unsigned long physbase, unsigned long fbsize,
...@@ -21,6 +22,6 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, ...@@ -21,6 +22,6 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
struct fb_info *info, struct fb_info *info,
int type, int fb_depth, unsigned long fb_size); int type, int fb_depth, unsigned long fb_size);
int sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd, int sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd,
unsigned long arg); unsigned long arg);
#endif /* _SBUSLIB_H */ #endif /* _SBUSLIB_H */
...@@ -9,10 +9,9 @@ ...@@ -9,10 +9,9 @@
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/of_device.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h>
#include <asm/of_device.h>
struct s3d_info { struct s3d_info {
struct fb_info *info; struct fb_info *info;
......
...@@ -9,10 +9,9 @@ ...@@ -9,10 +9,9 @@
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/of_device.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h>
#include <asm/of_device.h>
/* XXX This device has a 'dev-comm' property which aparently is /* XXX This device has a 'dev-comm' property which aparently is
* XXX a pointer into the openfirmware's address space which is * XXX a pointer into the openfirmware's address space which is
......
...@@ -17,10 +17,9 @@ ...@@ -17,10 +17,9 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/of_device.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h>
#include <asm/of_device.h>
#include <asm/fbio.h> #include <asm/fbio.h>
#include "sbuslib.h" #include "sbuslib.h"
...@@ -385,7 +384,7 @@ static int __devinit tcx_probe(struct of_device *op, ...@@ -385,7 +384,7 @@ static int __devinit tcx_probe(struct of_device *op,
par->lowdepth = par->lowdepth =
(of_find_property(dp, "tcx-8-bit", NULL) != NULL); (of_find_property(dp, "tcx-8-bit", NULL) != NULL);
sbusfb_fill_var(&info->var, dp->node, 8); sbusfb_fill_var(&info->var, dp, 8);
info->var.red.length = 8; info->var.red.length = 8;
info->var.green.length = 8; info->var.green.length = 8;
info->var.blue.length = 8; info->var.blue.length = 8;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment