From c1b59412f60663bb2349ea6ffd55c6d97ebe95d9 Mon Sep 17 00:00:00 2001 From: Ville Syrjala Date: Fri, 8 Dec 2006 02:40:44 -0800 Subject: [PATCH] --- yaml --- r: 43817 b: refs/heads/master c: 4ec3fd71e4f5d1201cb7d2374ffdb4f328091fb4 h: refs/heads/master i: 43815: d1fde31cefdeacf0cd0457968c375399dbbd0d41 v: v3 --- [refs] | 2 +- trunk/drivers/video/aty/atyfb_base.c | 27 ++++++++++++++++++++------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index e0d59bc2ffaf..f847225bfbbd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cab5901e93bfe4f3cfd8cf9cda2558d22568f7a2 +refs/heads/master: 4ec3fd71e4f5d1201cb7d2374ffdb4f328091fb4 diff --git a/trunk/drivers/video/aty/atyfb_base.c b/trunk/drivers/video/aty/atyfb_base.c index d4262b8b8e02..a9c73c257f3a 100644 --- a/trunk/drivers/video/aty/atyfb_base.c +++ b/trunk/drivers/video/aty/atyfb_base.c @@ -3629,6 +3629,7 @@ static int __init atyfb_atari_probe(void) struct fb_info *info; int m64_num; u32 clock_r; + int num_found = 0; for (m64_num = 0; m64_num < mach64_count; m64_num++) { if (!phys_vmembase[m64_num] || !phys_size[m64_num] || @@ -3676,16 +3677,28 @@ static int __init atyfb_atari_probe(void) break; } - if (aty_init(info)) { - if (info->screen_base) - iounmap(info->screen_base); - if (par->ati_regbase) - iounmap(par->ati_regbase); + /* Fake pci_id for correct_chipset() */ + switch (aty_ld_le32(CONFIG_CHIP_ID, par) & CFG_CHIP_TYPE) { + case 0x00d7: + par->pci_id = PCI_CHIP_MACH64GX; + break; + case 0x0057: + par->pci_id = PCI_CHIP_MACH64CX; + break; + default: + break; + } + + if (correct_chipset(par) || aty_init(info)) { + iounmap(info->screen_base); + iounmap(par->ati_regbase); framebuffer_release(info); - /* This is insufficient! kernel_map has added two large chunks!! */ - return -ENXIO; + } else { + num_found++; } } + + return num_found ? 0 : -ENXIO; } #endif /* CONFIG_ATARI */