summaryrefslogtreecommitdiffstats
path: root/drivers/video/offb.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
commitd6434e1042f3b0a6dfe1b1f615af369486f9b1fa (patch)
treee2be02f33984c48ec019c654051d27964e42c441 /drivers/video/offb.c
parent609d1e803baf519487233b765eb487f9ec227a18 (diff)
Merge with 2.3.19.
Diffstat (limited to 'drivers/video/offb.c')
-rw-r--r--drivers/video/offb.c38
1 files changed, 25 insertions, 13 deletions
diff --git a/drivers/video/offb.c b/drivers/video/offb.c
index a769e9454..068282244 100644
--- a/drivers/video/offb.c
+++ b/drivers/video/offb.c
@@ -72,8 +72,8 @@ static int ofonly = 0;
* Interface used by the world
*/
-void offb_init(void);
-void offb_setup(char *options, int *ints);
+int offb_init(void);
+int offb_setup(char*);
static int offb_open(struct fb_info *info, int user);
static int offb_release(struct fb_info *info, int user);
@@ -314,13 +314,16 @@ extern void valkyrie_of_init(struct device_node *dp);
#ifdef CONFIG_FB_PLATINUM
extern void platinum_of_init(struct device_node *dp);
#endif /* CONFIG_FB_PLATINUM */
+#ifdef CONFIG_FB_CLGEN
+extern void clgen_of_init(struct device_node *dp);
+#endif /* CONFIG_FB_CLGEN */
/*
* Initialisation
*/
-__initfunc(void offb_init(void))
+int __init offb_init(void)
{
struct device_node *dp;
unsigned int dpy;
@@ -389,9 +392,10 @@ __initfunc(void offb_init(void))
offb_init_driver(dp);
}
}
+ return 0;
}
-__initfunc(static int offb_init_driver(struct device_node *dp))
+static int __init offb_init_driver(struct device_node *dp)
{
#ifdef CONFIG_FB_ATY
if (!strncmp(dp->name, "ATY", 3)) {
@@ -441,10 +445,17 @@ __initfunc(static int offb_init_driver(struct device_node *dp))
return 1;
}
#endif /* CONFIG_FB_PLATINUM */
+#ifdef CONFIG_FB_CLGEN
+ if ((!strncmp(dp->name, "MacPicasso",10) ||
+ (!strncmp(dp->name, "54m30",5)) {
+ clgen_of_init(dp);
+ return 1;
+ }
+#endif /* CONFIG_FB_CLGEN */
return 0;
}
-__initfunc(static void offb_init_nodriver(struct device_node *dp))
+static void __init offb_init_nodriver(struct device_node *dp)
{
int *pp, i;
unsigned int len;
@@ -473,7 +484,7 @@ __initfunc(static void offb_init_nodriver(struct device_node *dp))
if (dp->addrs[i].size >= len)
break;
if (i >= dp->n_addrs) {
- printk("no framebuffer address found for %s\n", dp->full_name);
+ printk(KERN_ERR "no framebuffer address found for %s\n", dp->full_name);
return;
}
@@ -488,9 +499,9 @@ __initfunc(static void offb_init_nodriver(struct device_node *dp))
}
-__initfunc(static void offb_init_fb(const char *name, const char *full_name,
+static void offb_init_fb(const char *name, const char *full_name,
int width, int height, int depth,
- int pitch, unsigned long address))
+ int pitch, unsigned long address)
{
int i;
struct fb_fix_screeninfo *fix;
@@ -501,7 +512,7 @@ __initfunc(static void offb_init_fb(const char *name, const char *full_name,
printk(KERN_INFO "Using unsupported %dx%d %s at %lx, depth=%d, pitch=%d\n",
width, height, name, address, depth, pitch);
if (depth != 8 && depth != 16 && depth != 32) {
- printk("%s: can't use depth = %d\n", full_name, depth);
+ printk(KERN_ERR "%s: can't use depth = %d\n", full_name, depth);
return;
}
@@ -522,7 +533,7 @@ __initfunc(static void offb_init_fb(const char *name, const char *full_name,
var->yres = var->yres_virtual = height;
fix->line_length = pitch;
- fix->smem_start = (char *)address;
+ fix->smem_start = address;
fix->smem_len = pitch * height;
fix->type = FB_TYPE_PACKED_PIXELS;
fix->type_aux = 0;
@@ -674,7 +685,7 @@ __initfunc(static void offb_init_fb(const char *name, const char *full_name,
return;
}
- printk("fb%d: Open Firmware frame buffer device on %s\n",
+ printk(KERN_INFO "fb%d: Open Firmware frame buffer device on %s\n",
GET_FB_IDX(info->info.node), full_name);
#ifdef CONFIG_FB_COMPAT_XPMAC
@@ -706,13 +717,14 @@ __initfunc(static void offb_init_fb(const char *name, const char *full_name,
* Setup: parse used options
*/
-void offb_setup(char *options, int *ints)
+int offb_setup(char *options)
{
if (!options || !*options)
- return;
+ return 0;
if (!strcmp(options, "ofonly"))
ofonly = 1;
+ return 0;
}