Run-time rather than compile-time check of machine type when initializing the cyberpro clocks. Necessary so the Debian folk can distribute a single binary for their supported ARM arch's. Patch originated from Vince Sanders. Now includes #ifdef to ensure that code only runs on ARM. PATCH FOLLOWS KernelVersion: 2.4.19-rmk7 --- linux-2.4.19-rmk7-orig/drivers/video/cyber2000fb.c Wed Mar 26 17:43:15 2003 +++ linux-2.4.19-rmk7/drivers/video/cyber2000fb.c Wed Mar 26 17:45:56 2003 @@ -1836,18 +1836,20 @@ if (err) goto failed; -#if defined(CONFIG_ARCH_SHARK) || defined(CONFIG_ARCH_NETWINDER) - /* - * MCLK on the NetWinder and the Shark is fixed at 75MHz - */ - cfb->mclk_mult = 0xdb; - cfb->mclk_div = 0x54; -#else - /* - * Use MCLK from BIOS. FIXME: what about hotplug? - */ - cfb->mclk_mult = cyber2000_grphr(EXT_MCLK_MULT, cfb); - cfb->mclk_div = cyber2000_grphr(EXT_MCLK_DIV, cfb); +#ifdef __arm__ + if (machine_is_netwinder() || machine_is_shark()) { + /* + * MCLK on the NetWinder and the Shark is fixed at 75MHz + */ + cfb->mclk_mult = 0xdb; + cfb->mclk_div = 0x54; + } else { + /* + * Use MCLK from BIOS. FIXME: what about hotplug? + */ + cfb->mclk_mult = cyber2000_grphr(EXT_MCLK_MULT, cfb); + cfb->mclk_div = cyber2000_grphr(EXT_MCLK_DIV, cfb); + } #endif err = cyberpro_common_probe(cfb);