X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fx86%2Fkernel%2Fgeode_32.c;h=9b08e852fd1ae63d3312552dd6898622ee4fd73b;hb=734b397cd14f3340394a8dd3266bec97d01f034b;hp=9c7f7d3959689af664bd7060b8f5c918a495dd14;hpb=7924e4f6519dd5b349ed146fe9fe35206730be67;p=linux-2.6-omap-h63xx.git diff --git a/arch/x86/kernel/geode_32.c b/arch/x86/kernel/geode_32.c index 9c7f7d39596..9b08e852fd1 100644 --- a/arch/x86/kernel/geode_32.c +++ b/arch/x86/kernel/geode_32.c @@ -161,16 +161,35 @@ void geode_gpio_setup_event(unsigned int gpio, int pair, int pme) } EXPORT_SYMBOL_GPL(geode_gpio_setup_event); -static int __init geode_southbridge_init(void) +int geode_has_vsa2(void) { - int timers; + static int has_vsa2 = -1; + + if (has_vsa2 == -1) { + u16 val; + + /* + * The VSA has virtual registers that we can query for a + * signature. + */ + outw(VSA_VR_UNLOCK, VSA_VRC_INDEX); + outw(VSA_VR_SIGNATURE, VSA_VRC_INDEX); + + val = inw(VSA_VRC_DATA); + has_vsa2 = (val == AMD_VSA_SIG || val == GSW_VSA_SIG); + } + return has_vsa2; +} +EXPORT_SYMBOL_GPL(geode_has_vsa2); + +static int __init geode_southbridge_init(void) +{ if (!is_geode()) return -ENODEV; init_lbars(); - timers = geode_mfgpt_detect(); - printk(KERN_INFO "geode: %d MFGPT timers available.\n", timers); + (void) mfgpt_timer_setup(); return 0; }