--- linux-2.6.30.1/arch/x86/kernel/mfgpt_32.c 2009-07-03 01:52:38.000000000 +0200 +++ linux-2.6.30-patch/arch/x86/kernel/mfgpt_32.c 2009-07-18 09:35:43.335443537 +0200 @@ -70,6 +70,7 @@ } __setup("mfgptfix", mfgpt_fix); + /* * Check whether any MFGPTs are available for the kernel to use. In most * cases, firmware that uses AMD's VSA code will claim all timers during @@ -83,6 +84,10 @@ static void geode_mfgpt_detect(void) { + void *io_base; + char tinyBIOS[] = "tinyBIOS"; + char alix[] = "PC Engines ALIX"; + int i; u16 val; @@ -93,6 +98,31 @@ goto done; } +/* Check if there is a PC Engines ALIX with wrong BIOS Settings */ + io_base = ioremap(0xf0000,0x10000); + for (i=0;i<=7;i++) + { + if (readb(io_base+i+0x9100)!=tinyBIOS[i]) i=0xff; + } + if (i<0xff) + { + for (i=0;i<=14;i++) + { + if (readb(io_base+i+0x9003)!=alix[i]) i=0xff; + } + if (i<0xff) + { + printk(KERN_INFO "geode-mfgpt: found PC Engines ALIX\n"); + if (readb(io_base+0x800c)) + { + printk(KERN_WARNING "geode-mfgpt: MFGPT workaround is enabled in BIOS - set it to disabled!\n"); + iounmap(io_base); + goto done; + } + } + } + iounmap(io_base); + if (!geode_get_dev_base(GEODE_DEV_MFGPT)) { printk(KERN_INFO "geode-mfgpt: MFGPT LBAR is not set up\n"); goto done;