diff options
Diffstat (limited to 'drivers/video/fbdev/imsttfb.c')
-rw-r--r-- | drivers/video/fbdev/imsttfb.c | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c index 16f272a50811..d7edb9c5d3a3 100644 --- a/drivers/video/fbdev/imsttfb.c +++ b/drivers/video/fbdev/imsttfb.c @@ -16,6 +16,7 @@ * more details. */ +#include <linux/aperture.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/errno.h> @@ -86,7 +87,7 @@ enum { SSTATUS = 36, /* 0x90 */ PRC = 37, /* 0x94 */ -#if 0 +#if 0 /* PCI Registers */ DVID = 0x00000000L, SC = 0x00000004L, @@ -103,8 +104,8 @@ enum { PDATA = 0x04, PPMASK = 0x08, PADDRR = 0x0c, - PIDXLO = 0x10, - PIDXHI = 0x14, + PIDXLO = 0x10, + PIDXHI = 0x14, PIDXDATA= 0x18, PIDXCTL = 0x1c }; @@ -131,7 +132,7 @@ enum { SYSCLKC = 0x18, /* () System Clock C */ /* * Dot clock rate is 20MHz * (m + 1) / ((n + 1) * (p ? 2 * p : 1) - * c is charge pump bias which depends on the VCO frequency + * c is charge pump bias which depends on the VCO frequency */ PIXM0 = 0x20, /* () Pixel M 0 */ PIXN0 = 0x21, /* () Pixel N 0 */ @@ -320,7 +321,7 @@ struct imstt_par { __u32 ramdac; __u32 palette[16]; }; - + enum { IBM = 0, TVP = 1 @@ -373,7 +374,7 @@ static struct imstt_regvals tvp_reg_init_17 = { static struct imstt_regvals tvp_reg_init_18 = { 1152, - 0x0009, 0x0011, 0x059, 0x5b, 0x0003, 0x0031, 0x0397, 0x039a, 0x0000, + 0x0009, 0x0011, 0x059, 0x5b, 0x0003, 0x0031, 0x0397, 0x039a, 0x0000, 0xfd, 0x3a, 0xf1, { 0x39, 0x38, 0x38 }, { 0xf3, 0xf3, 0xf2 } }; @@ -856,10 +857,10 @@ imsttfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) } static int -imsttfb_set_par(struct fb_info *info) +imsttfb_set_par(struct fb_info *info) { struct imstt_par *par = info->par; - + if (!compute_imstt_regvals(par, info->var.xres, info->var.yres)) return -EINVAL; @@ -930,7 +931,7 @@ imsttfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) return 0; } -static int +static int imsttfb_blank(int blank, struct fb_info *info) { struct imstt_par *par = info->par; @@ -986,7 +987,7 @@ imsttfb_blank(int blank, struct fb_info *info) static void imsttfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) -{ +{ struct imstt_par *par = info->par; __u32 Bpp, line_pitch, bgc, dx, dy, width, height; @@ -1192,7 +1193,7 @@ imstt_set_cursor(struct imstt_par *par, struct fb_image *d, int on) } } -static int +static int imsttfb_cursor(struct fb_info *info, struct fb_cursor *cursor) { struct imstt_par *par = info->par; @@ -1200,7 +1201,7 @@ imsttfb_cursor(struct fb_info *info, struct fb_cursor *cursor) if (cursor->dest == NULL && cursor->rop == ROP_XOR) return 1; - + imstt_set_cursor(info, cursor, 0); if (flags & FB_CUR_SETPOS) { @@ -1469,8 +1470,13 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) struct imstt_par *par; struct fb_info *info; struct device_node *dp; - int ret = -ENOMEM; - + int ret; + + ret = aperture_remove_conflicting_pci_devices(pdev, "imsttfb"); + if (ret) + return ret; + ret = -ENOMEM; + dp = pci_device_to_OF_node(pdev); if(dp) printk(KERN_INFO "%s: OF name %pOFn\n",__func__, dp); @@ -1619,7 +1625,7 @@ static int __init imsttfb_init(void) #endif return pci_register_driver(&imsttfb_pci_driver); } - + static void __exit imsttfb_exit(void) { pci_unregister_driver(&imsttfb_pci_driver); |