X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fvideo%2Faty%2Faty128fb.c;h=f2d82d005f1249958977dc65fe15231d6e328b3a;hb=9e1bf581d67d87a1d7fc0ea500729e3a03643a26;hp=a215c2f9f8169966a9350242e47e474fd2125246;hpb=8d40237c730b8be87c1b80a5d96b9c603fefa829;p=linux-2.6.git diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index a215c2f9f..f2d82d005 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c @@ -397,7 +397,7 @@ struct aty128fb_par { struct aty128_ddafifo fifo_reg; u32 accel_flags; struct aty128_constants constants; /* PLL and others */ - void __iomem *regbase; /* remapped mmio */ + void *regbase; /* remapped mmio */ u32 vram_size; /* onboard video ram */ int chip_gen; const struct aty128_meminfo *mem; /* onboard mem info */ @@ -450,9 +450,9 @@ static int aty128_decode_var(struct fb_var_screeninfo *var, struct aty128fb_par *par); #if 0 static void __init aty128_get_pllinfo(struct aty128fb_par *par, - void __iomem *bios); -static void __init __iomem *aty128_map_ROM(struct pci_dev *pdev, const struct aty128fb_par *par); -static void __init aty128_unmap_ROM(struct pci_dev *dev, void __iomem * rom); + void *bios); +static void __init *aty128_map_ROM(struct pci_dev *pdev, const struct aty128fb_par *par); +static void __init aty128_unmap_ROM(struct pci_dev *dev, void * rom); #endif static void aty128_timings(struct aty128fb_par *par); static void aty128_init_engine(struct aty128fb_par *par); @@ -788,7 +788,7 @@ static u32 depth_to_dst(u32 depth) #ifndef __sparc__ -static void __init aty128_unmap_ROM(struct pci_dev *dev, void __iomem * rom) +static void __init aty128_unmap_ROM(struct pci_dev *dev, void * rom) { struct resource *r = &dev->resource[PCI_ROM_RESOURCE]; @@ -806,12 +806,12 @@ static void __init aty128_unmap_ROM(struct pci_dev *dev, void __iomem * rom) } -static void __iomem * __init aty128_map_ROM(const struct aty128fb_par *par, struct pci_dev *dev) +static void * __init aty128_map_ROM(const struct aty128fb_par *par, struct pci_dev *dev) { struct resource *r; u16 dptr; u8 rom_type; - void __iomem *bios; + void *bios; /* Fix from ATI for problem with Rage128 hardware not leaving ROM enabled */ unsigned int temp; @@ -903,7 +903,7 @@ static void __iomem * __init aty128_map_ROM(const struct aty128fb_par *par, stru return NULL; } -static void __init aty128_get_pllinfo(struct aty128fb_par *par, unsigned char __iomem *bios) +static void __init aty128_get_pllinfo(struct aty128fb_par *par, unsigned char *bios) { unsigned int bios_hdr; unsigned int bios_pll; @@ -925,7 +925,7 @@ static void __init aty128_get_pllinfo(struct aty128fb_par *par, unsigned char __ } #ifdef CONFIG_X86 -static void __iomem * __devinit aty128_find_mem_vbios(struct aty128fb_par *par) +static void * __devinit aty128_find_mem_vbios(struct aty128fb_par *par) { /* I simplified this code as we used to miss the signatures in * a lot of case. It's now closer to XFree, we just don't check @@ -933,13 +933,13 @@ static void __iomem * __devinit aty128_find_mem_vbios(struct aty128fb_par *par) * if we end up having conflicts */ u32 segstart; - unsigned char __iomem *rom_base = NULL; + unsigned char *rom_base = NULL; for (segstart=0x000c0000; segstart<0x000f0000; segstart+=0x00001000) { - rom_base = ioremap(segstart, 0x10000); + rom_base = (char *)ioremap(segstart, 0x10000); if (rom_base == NULL) return NULL; - if (readb(rom_base) == 0x55 && readb(rom_base + 1) == 0xaa) + if ((*rom_base == 0x55) && (((*(rom_base + 1)) & 0xff) == 0xaa)) break; iounmap(rom_base); rom_base = NULL; @@ -1885,7 +1885,7 @@ static int __init aty128_probe(struct pci_dev *pdev, const struct pci_device_id struct fb_info *info; int err; #ifndef __sparc__ - void __iomem *bios = NULL; + void *bios = NULL; #endif /* Enable device in PCI config */ @@ -2016,6 +2016,8 @@ static void __devexit aty128_remove(struct pci_dev *pdev) release_mem_region(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0)); + release_mem_region(pci_resource_start(pdev, 1), + pci_resource_len(pdev, 1)); release_mem_region(pci_resource_start(pdev, 2), pci_resource_len(pdev, 2)); framebuffer_release(info); @@ -2040,11 +2042,11 @@ static int aty128fb_blank(int blank, struct fb_info *fb) set_backlight_enable(0); #endif /* CONFIG_PMAC_BACKLIGHT */ - if (blank & FB_BLANK_VSYNC_SUSPEND) + if (blank & VESA_VSYNC_SUSPEND) state |= 2; - if (blank & FB_BLANK_HSYNC_SUSPEND) + if (blank & VESA_HSYNC_SUSPEND) state |= 1; - if (blank & FB_BLANK_POWERDOWN) + if (blank & VESA_POWERDOWN) state |= 4; aty_st_8(CRTC_EXT_CNTL+1, state); @@ -2361,7 +2363,7 @@ static int aty128_pci_suspend(struct pci_dev *pdev, u32 state) state = 2; #endif /* CONFIG_PPC_PMAC */ - if (state != 2 || state == pdev->dev.power.power_state) + if (state != 2 || state == pdev->dev.power_state) return 0; printk(KERN_DEBUG "aty128fb: suspending...\n"); @@ -2392,7 +2394,7 @@ static int aty128_pci_suspend(struct pci_dev *pdev, u32 state) release_console_sem(); - pdev->dev.power.power_state = state; + pdev->dev.power_state = state; return 0; } @@ -2402,13 +2404,13 @@ static int aty128_pci_resume(struct pci_dev *pdev) struct fb_info *info = pci_get_drvdata(pdev); struct aty128fb_par *par = info->par; - if (pdev->dev.power.power_state == 0) + if (pdev->dev.power_state == 0) return 0; acquire_console_sem(); /* Wakeup chip */ - if (pdev->dev.power.power_state == 2) + if (pdev->dev.power_state == 2) aty128_set_suspend(par, 0); par->asleep = 0; @@ -2428,7 +2430,7 @@ static int aty128_pci_resume(struct pci_dev *pdev) release_console_sem(); - pdev->dev.power.power_state = 0; + pdev->dev.power_state = 0; printk(KERN_DEBUG "aty128fb: resumed !\n");