diff options
Diffstat (limited to 'drivers/video/aty/radeon_base.c')
| -rw-r--r-- | drivers/video/aty/radeon_base.c | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index e7e8b52014c3..046b47860266 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c | |||
| @@ -329,8 +329,9 @@ static int __devinit radeon_map_ROM(struct radeonfb_info *rinfo, struct pci_dev | |||
| 329 | 329 | ||
| 330 | /* Very simple test to make sure it appeared */ | 330 | /* Very simple test to make sure it appeared */ |
| 331 | if (BIOS_IN16(0) != 0xaa55) { | 331 | if (BIOS_IN16(0) != 0xaa55) { |
| 332 | printk(KERN_ERR "radeonfb (%s): Invalid ROM signature %x should be" | 332 | printk(KERN_DEBUG "radeonfb (%s): Invalid ROM signature %x " |
| 333 | "0xaa55\n", pci_name(rinfo->pdev), BIOS_IN16(0)); | 333 | "should be 0xaa55\n", |
| 334 | pci_name(rinfo->pdev), BIOS_IN16(0)); | ||
| 334 | goto failed; | 335 | goto failed; |
| 335 | } | 336 | } |
| 336 | /* Look for the PCI data to check the ROM type */ | 337 | /* Look for the PCI data to check the ROM type */ |
| @@ -2312,19 +2313,27 @@ static int radeonfb_pci_register (struct pci_dev *pdev, | |||
| 2312 | rinfo->mmio_base_phys = pci_resource_start (pdev, 2); | 2313 | rinfo->mmio_base_phys = pci_resource_start (pdev, 2); |
| 2313 | 2314 | ||
| 2314 | /* request the mem regions */ | 2315 | /* request the mem regions */ |
| 2315 | ret = pci_request_regions(pdev, "radeonfb"); | 2316 | ret = pci_request_region(pdev, 0, "radeonfb framebuffer"); |
| 2316 | if (ret < 0) { | 2317 | if (ret < 0) { |
| 2317 | printk( KERN_ERR "radeonfb (%s): cannot reserve PCI regions." | 2318 | printk( KERN_ERR "radeonfb (%s): cannot request region 0.\n", |
| 2318 | " Someone already got them?\n", pci_name(rinfo->pdev)); | 2319 | pci_name(rinfo->pdev)); |
| 2319 | goto err_release_fb; | 2320 | goto err_release_fb; |
| 2320 | } | 2321 | } |
| 2321 | 2322 | ||
| 2323 | ret = pci_request_region(pdev, 2, "radeonfb mmio"); | ||
| 2324 | if (ret < 0) { | ||
| 2325 | printk( KERN_ERR "radeonfb (%s): cannot request region 2.\n", | ||
| 2326 | pci_name(rinfo->pdev)); | ||
| 2327 | goto err_release_pci0; | ||
| 2328 | } | ||
| 2329 | |||
| 2322 | /* map the regions */ | 2330 | /* map the regions */ |
| 2323 | rinfo->mmio_base = ioremap(rinfo->mmio_base_phys, RADEON_REGSIZE); | 2331 | rinfo->mmio_base = ioremap(rinfo->mmio_base_phys, RADEON_REGSIZE); |
| 2324 | if (!rinfo->mmio_base) { | 2332 | if (!rinfo->mmio_base) { |
| 2325 | printk(KERN_ERR "radeonfb (%s): cannot map MMIO\n", pci_name(rinfo->pdev)); | 2333 | printk(KERN_ERR "radeonfb (%s): cannot map MMIO\n", |
| 2334 | pci_name(rinfo->pdev)); | ||
| 2326 | ret = -EIO; | 2335 | ret = -EIO; |
| 2327 | goto err_release_pci; | 2336 | goto err_release_pci2; |
| 2328 | } | 2337 | } |
| 2329 | 2338 | ||
| 2330 | rinfo->fb_local_base = INREG(MC_FB_LOCATION) << 16; | 2339 | rinfo->fb_local_base = INREG(MC_FB_LOCATION) << 16; |
| @@ -2499,10 +2508,12 @@ err_unmap_rom: | |||
| 2499 | if (rinfo->bios_seg) | 2508 | if (rinfo->bios_seg) |
| 2500 | radeon_unmap_ROM(rinfo, pdev); | 2509 | radeon_unmap_ROM(rinfo, pdev); |
| 2501 | iounmap(rinfo->mmio_base); | 2510 | iounmap(rinfo->mmio_base); |
| 2502 | err_release_pci: | 2511 | err_release_pci2: |
| 2503 | pci_release_regions(pdev); | 2512 | pci_release_region(pdev, 2); |
| 2513 | err_release_pci0: | ||
| 2514 | pci_release_region(pdev, 0); | ||
| 2504 | err_release_fb: | 2515 | err_release_fb: |
| 2505 | framebuffer_release(info); | 2516 | framebuffer_release(info); |
| 2506 | err_disable: | 2517 | err_disable: |
| 2507 | pci_disable_device(pdev); | 2518 | pci_disable_device(pdev); |
| 2508 | err_out: | 2519 | err_out: |
| @@ -2548,7 +2559,8 @@ static void __devexit radeonfb_pci_unregister (struct pci_dev *pdev) | |||
| 2548 | iounmap(rinfo->mmio_base); | 2559 | iounmap(rinfo->mmio_base); |
| 2549 | iounmap(rinfo->fb_base); | 2560 | iounmap(rinfo->fb_base); |
| 2550 | 2561 | ||
| 2551 | pci_release_regions(pdev); | 2562 | pci_release_region(pdev, 2); |
| 2563 | pci_release_region(pdev, 0); | ||
| 2552 | 2564 | ||
| 2553 | kfree(rinfo->mon1_EDID); | 2565 | kfree(rinfo->mon1_EDID); |
| 2554 | kfree(rinfo->mon2_EDID); | 2566 | kfree(rinfo->mon2_EDID); |
