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
vserver 1.9.5.x5
[linux-2.6.git]
/
drivers
/
video
/
controlfb.c
diff --git
a/drivers/video/controlfb.c
b/drivers/video/controlfb.c
index
8ad33fa
..
f0eb993
100644
(file)
--- a/
drivers/video/controlfb.c
+++ b/
drivers/video/controlfb.c
@@
-98,14
+98,14
@@
struct fb_info_control {
struct fb_par_control par;
u32 pseudo_palette[17];
struct fb_par_control par;
u32 pseudo_palette[17];
- struct cmap_regs *cmap_regs;
+ struct cmap_regs
__iomem
*cmap_regs;
unsigned long cmap_regs_phys;
unsigned long cmap_regs_phys;
- struct control_regs *control_regs;
+ struct control_regs
__iomem
*control_regs;
unsigned long control_regs_phys;
unsigned long control_regs_size;
unsigned long control_regs_phys;
unsigned long control_regs_size;
- __u8 *frame_buffer;
+ __u8
__iomem
*frame_buffer;
unsigned long frame_buffer_phys;
unsigned long fb_orig_base;
unsigned long fb_orig_size;
unsigned long frame_buffer_phys;
unsigned long fb_orig_base;
unsigned long fb_orig_size;
@@
-329,17
+329,17
@@
static int controlfb_blank(int blank_mode, struct fb_info *info)
ctrl = ld_le32(CNTRL_REG(p,ctrl));
if (blank_mode > 0)
ctrl = ld_le32(CNTRL_REG(p,ctrl));
if (blank_mode > 0)
- switch (blank_mode
- 1
) {
- case
VESA
_VSYNC_SUSPEND:
+ switch (blank_mode) {
+ case
FB_BLANK
_VSYNC_SUSPEND:
ctrl &= ~3;
break;
ctrl &= ~3;
break;
- case
VESA
_HSYNC_SUSPEND:
+ case
FB_BLANK
_HSYNC_SUSPEND:
ctrl &= ~0x30;
break;
ctrl &= ~0x30;
break;
- case
VESA
_POWERDOWN:
+ case
FB_BLANK
_POWERDOWN:
ctrl &= ~0x33;
/* fall through */
ctrl &= ~0x33;
/* fall through */
- case
VESA_NO_BLANKING
:
+ case
FB_BLANK_NORMAL
:
ctrl |= 0x400;
break;
default:
ctrl |= 0x400;
break;
default:
@@
-497,7
+497,7
@@
try_again:
static void control_set_hardware(struct fb_info_control *p, struct fb_par_control *par)
{
struct control_regvals *r;
static void control_set_hardware(struct fb_info_control *p, struct fb_par_control *par)
{
struct control_regvals *r;
- volatile struct preg *rp;
+ volatile struct preg
__iomem
*rp;
int i, cmode;
if (PAR_EQUAL(&p->par, par)) {
int i, cmode;
if (PAR_EQUAL(&p->par, par)) {
@@
-556,6
+556,11
@@
static void control_set_hardware(struct fb_info_control *p, struct fb_par_contro
int __init control_init(void)
{
struct device_node *dp;
int __init control_init(void)
{
struct device_node *dp;
+ char *option = NULL;
+
+ if (fb_get_options("controlfb", &option))
+ return -ENODEV;
+ control_setup(option);
dp = find_devices("control");
if (dp != 0 && !control_of_init(dp))
dp = find_devices("control");
if (dp != 0 && !control_of_init(dp))
@@
-564,6
+569,7
@@
int __init control_init(void)
return -ENXIO;
}
return -ENXIO;
}
+module_init(control_init);
/* Work out which banks of VRAM we have installed. */
/* danj: I guess the card just ignores writes to nonexistant VRAM... */
/* Work out which banks of VRAM we have installed. */
/* danj: I guess the card just ignores writes to nonexistant VRAM... */
@@
-1010,8
+1016,8
@@
static void __init control_init_info(struct fb_info *info, struct fb_info_contro
info->par = &p->par;
info->fbops = &controlfb_ops;
info->pseudo_palette = p->pseudo_palette;
info->par = &p->par;
info->fbops = &controlfb_ops;
info->pseudo_palette = p->pseudo_palette;
- info->flags = FBINFO_
FLAG_DEFAULT
;
- info->screen_base =
(char *)
p->frame_buffer + CTRLFB_OFF;
+ info->flags = FBINFO_
DEFAULT | FBINFO_HWACCEL_YPAN
;
+ info->screen_base = p->frame_buffer + CTRLFB_OFF;
fb_alloc_cmap(&info->cmap, 256, 0);
fb_alloc_cmap(&info->cmap, 256, 0);