diff options
-rw-r--r-- | drivers/video/aty/atyfb_base.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index d4262b8b8e02..a9c73c257f3a 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -3629,6 +3629,7 @@ static int __init atyfb_atari_probe(void) | |||
3629 | struct fb_info *info; | 3629 | struct fb_info *info; |
3630 | int m64_num; | 3630 | int m64_num; |
3631 | u32 clock_r; | 3631 | u32 clock_r; |
3632 | int num_found = 0; | ||
3632 | 3633 | ||
3633 | for (m64_num = 0; m64_num < mach64_count; m64_num++) { | 3634 | for (m64_num = 0; m64_num < mach64_count; m64_num++) { |
3634 | if (!phys_vmembase[m64_num] || !phys_size[m64_num] || | 3635 | if (!phys_vmembase[m64_num] || !phys_size[m64_num] || |
@@ -3676,16 +3677,28 @@ static int __init atyfb_atari_probe(void) | |||
3676 | break; | 3677 | break; |
3677 | } | 3678 | } |
3678 | 3679 | ||
3679 | if (aty_init(info)) { | 3680 | /* Fake pci_id for correct_chipset() */ |
3680 | if (info->screen_base) | 3681 | switch (aty_ld_le32(CONFIG_CHIP_ID, par) & CFG_CHIP_TYPE) { |
3681 | iounmap(info->screen_base); | 3682 | case 0x00d7: |
3682 | if (par->ati_regbase) | 3683 | par->pci_id = PCI_CHIP_MACH64GX; |
3683 | iounmap(par->ati_regbase); | 3684 | break; |
3685 | case 0x0057: | ||
3686 | par->pci_id = PCI_CHIP_MACH64CX; | ||
3687 | break; | ||
3688 | default: | ||
3689 | break; | ||
3690 | } | ||
3691 | |||
3692 | if (correct_chipset(par) || aty_init(info)) { | ||
3693 | iounmap(info->screen_base); | ||
3694 | iounmap(par->ati_regbase); | ||
3684 | framebuffer_release(info); | 3695 | framebuffer_release(info); |
3685 | /* This is insufficient! kernel_map has added two large chunks!! */ | 3696 | } else { |
3686 | return -ENXIO; | 3697 | num_found++; |
3687 | } | 3698 | } |
3688 | } | 3699 | } |
3700 | |||
3701 | return num_found ? 0 : -ENXIO; | ||
3689 | } | 3702 | } |
3690 | 3703 | ||
3691 | #endif /* CONFIG_ATARI */ | 3704 | #endif /* CONFIG_ATARI */ |