git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
video
/
cyber2000fb.c
diff --git
a/drivers/video/cyber2000fb.c
b/drivers/video/cyber2000fb.c
index
4dca34f
..
aae6d9c
100644
(file)
--- a/
drivers/video/cyber2000fb.c
+++ b/
drivers/video/cyber2000fb.c
@@
-36,13
+36,11
@@
* (which, incidentally, is about the same saving as a 2.5in hard disk
* entering standby mode.)
*/
* (which, incidentally, is about the same saving as a 2.5in hard disk
* entering standby mode.)
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
-#include <linux/tty.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/fb.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/fb.h>
@@
-50,7
+48,6
@@
#include <linux/init.h>
#include <asm/io.h>
#include <linux/init.h>
#include <asm/io.h>
-#include <asm/irq.h>
#include <asm/pgtable.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include <asm/system.h>
#include <asm/uaccess.h>
@@
-66,8
+63,8
@@
struct cfb_info {
struct display_switch *dispsw;
struct display *display;
struct pci_dev *dev;
struct display_switch *dispsw;
struct display *display;
struct pci_dev *dev;
- unsigned char *region;
- unsigned char *regs;
+ unsigned char
__iomem
*region;
+ unsigned char
__iomem
*regs;
u_int id;
int func_use_count;
u_long ref_ps;
u_int id;
int func_use_count;
u_long ref_ps;
@@
-90,11
+87,12
@@
struct cfb_info {
*/
u_char ramdac_ctrl;
u_char ramdac_powerdown;
*/
u_char ramdac_ctrl;
u_char ramdac_powerdown;
+
+ u32 pseudo_palette[16];
};
};
-static char default_font_storage[40];
static char *default_font = "Acorn8x8";
static char *default_font = "Acorn8x8";
-
MODULE_PARM(default_font, "s"
);
+
module_param(default_font, charp, 0
);
MODULE_PARM_DESC(default_font, "Default font name");
/*
MODULE_PARM_DESC(default_font, "Default font name");
/*
@@
-1003,16
+1001,16
@@
static int cyber2000fb_blank(int blank, struct fb_info *info)
int i;
switch (blank) {
int i;
switch (blank) {
- case
4:
/* powerdown - both sync lines down */
+ case
FB_BLANK_POWERDOWN:
/* powerdown - both sync lines down */
sync = EXT_SYNC_CTL_VS_0 | EXT_SYNC_CTL_HS_0;
break;
sync = EXT_SYNC_CTL_VS_0 | EXT_SYNC_CTL_HS_0;
break;
- case
3:
/* hsync off */
+ case
FB_BLANK_HSYNC_SUSPEND:
/* hsync off */
sync = EXT_SYNC_CTL_VS_NORMAL | EXT_SYNC_CTL_HS_0;
break;
sync = EXT_SYNC_CTL_VS_NORMAL | EXT_SYNC_CTL_HS_0;
break;
- case
2:
/* vsync off */
+ case
FB_BLANK_VSYNC_SUSPEND:
/* vsync off */
sync = EXT_SYNC_CTL_VS_0 | EXT_SYNC_CTL_HS_NORMAL;
break;
sync = EXT_SYNC_CTL_VS_0 | EXT_SYNC_CTL_HS_NORMAL;
break;
- case
1:
/* soft blank */
+ case
FB_BLANK_NORMAL:
/* soft blank */
default: /* unblank */
break;
}
default: /* unblank */
break;
}
@@
-1063,7
+1061,6
@@
static struct fb_ops cyber2000fb_ops = {
.fb_fillrect = cyber2000fb_fillrect,
.fb_copyarea = cyber2000fb_copyarea,
.fb_imageblit = cyber2000fb_imageblit,
.fb_fillrect = cyber2000fb_fillrect,
.fb_copyarea = cyber2000fb_copyarea,
.fb_imageblit = cyber2000fb_imageblit,
- .fb_cursor = soft_cursor,
.fb_sync = cyber2000fb_sync,
};
.fb_sync = cyber2000fb_sync,
};
@@
-1224,9
+1221,7
@@
cyberpro_alloc_fb_info(unsigned int id, char *name)
{
struct cfb_info *cfb;
{
struct cfb_info *cfb;
- cfb = kmalloc(sizeof(struct cfb_info) +
- sizeof(u32) * 16, GFP_KERNEL);
-
+ cfb = kmalloc(sizeof(struct cfb_info), GFP_KERNEL);
if (!cfb)
return NULL;
if (!cfb)
return NULL;
@@
-1282,7
+1277,7
@@
cyberpro_alloc_fb_info(unsigned int id, char *name)
cfb->fb.fbops = &cyber2000fb_ops;
cfb->fb.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
cfb->fb.fbops = &cyber2000fb_ops;
cfb->fb.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
- cfb->fb.pseudo_palette =
(void *)(cfb + 1)
;
+ cfb->fb.pseudo_palette =
cfb->pseudo_palette
;
fb_alloc_cmap(&cfb->fb.cmap, NR_PALETTE, 0);
fb_alloc_cmap(&cfb->fb.cmap, NR_PALETTE, 0);
@@
-1306,7
+1301,8
@@
cyberpro_free_fb_info(struct cfb_info *cfb)
* Parse Cyber2000fb options. Usage:
* video=cyber2000:font:fontname
*/
* Parse Cyber2000fb options. Usage:
* video=cyber2000:font:fontname
*/
-int
+#ifndef MODULE
+static int
cyber2000fb_setup(char *options)
{
char *opt;
cyber2000fb_setup(char *options)
{
char *opt;
@@
-1319,6
+1315,8
@@
cyber2000fb_setup(char *options)
continue;
if (strncmp(opt, "font:", 5) == 0) {
continue;
if (strncmp(opt, "font:", 5) == 0) {
+ static char default_font_storage[40];
+
strlcpy(default_font_storage, opt + 5, sizeof(default_font_storage));
default_font = default_font_storage;
continue;
strlcpy(default_font_storage, opt + 5, sizeof(default_font_storage));
default_font = default_font_storage;
continue;
@@
-1328,6
+1326,7
@@
cyber2000fb_setup(char *options)
}
return 0;
}
}
return 0;
}
+#endif /* MODULE */
/*
* The CyberPro chips can be placed on many different bus types.
/*
* The CyberPro chips can be placed on many different bus types.
@@
-1399,6
+1398,8
@@
static int __devinit cyberpro_common_probe(struct cfb_info *cfb)
cfb->fb.var.xres, cfb->fb.var.yres,
h_sync / 1000, h_sync % 1000, v_sync);
cfb->fb.var.xres, cfb->fb.var.yres,
h_sync / 1000, h_sync % 1000, v_sync);
+ if (cfb->dev)
+ cfb->fb.device = &cfb->dev->dev;
err = register_framebuffer(&cfb->fb);
failed:
err = register_framebuffer(&cfb->fb);
failed:
@@
-1508,7
+1509,7
@@
static int cyberpro_pci_enable_mmio(struct cfb_info *cfb)
* I/O cycles storing into a reserved memory space at
* physical address 0x3000000
*/
* I/O cycles storing into a reserved memory space at
* physical address 0x3000000
*/
- unsigned char *iop;
+ unsigned char
__iomem
*iop;
iop = ioremap(0x3000000, 0x5000);
if (iop == NULL) {
iop = ioremap(0x3000000, 0x5000);
if (iop == NULL) {
@@
-1522,7
+1523,7
@@
static int cyberpro_pci_enable_mmio(struct cfb_info *cfb)
writeb(EXT_BIU_MISC, iop + 0x3ce);
writeb(EXT_BIU_MISC_LIN_ENABLE, iop + 0x3cf);
writeb(EXT_BIU_MISC, iop + 0x3ce);
writeb(EXT_BIU_MISC_LIN_ENABLE, iop + 0x3cf);
- iounmap(
(void *)
iop);
+ iounmap(iop);
#else
/*
* Most other machine types are "normal", so
#else
/*
* Most other machine types are "normal", so
@@
-1663,7
+1664,7
@@
static void __devexit cyberpro_pci_remove(struct pci_dev *dev)
}
}
}
}
-static int cyberpro_pci_suspend(struct pci_dev *dev,
u32
state)
+static int cyberpro_pci_suspend(struct pci_dev *dev,
pm_message_t
state)
{
return 0;
}
{
return 0;
}
@@
-1715,14
+1716,14
@@
static struct pci_driver cyberpro_driver = {
*
* Tony: "module_init" is now required
*/
*
* Tony: "module_init" is now required
*/
-int __init cyber2000fb_init(void)
+
static
int __init cyber2000fb_init(void)
{
int ret = -1, err;
#ifndef MODULE
char *option = NULL;
{
int ret = -1, err;
#ifndef MODULE
char *option = NULL;
- if (fb_get_options("cyber2000fb",
NULL
))
+ if (fb_get_options("cyber2000fb",
&option
))
return -ENODEV;
cyber2000fb_setup(option);
#endif
return -ENODEV;
cyber2000fb_setup(option);
#endif
@@
-1735,7
+1736,7
@@
int __init cyber2000fb_init(void)
}
#endif
#ifdef CONFIG_PCI
}
#endif
#ifdef CONFIG_PCI
- err = pci_
module_init
(&cyberpro_driver);
+ err = pci_
register_driver
(&cyberpro_driver);
if (!err)
ret = 0;
#endif
if (!err)
ret = 0;
#endif