Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
[pandora-kernel.git] / arch / i386 / kernel / cpu / cyrix.c
index ff87cc2..f03b7f9 100644 (file)
@@ -184,7 +184,7 @@ static void __init geode_configure(void)
 
 
 #ifdef CONFIG_PCI
-static struct pci_device_id cyrix_55x0[] = {
+static struct pci_device_id __initdata cyrix_55x0[] = {
        { PCI_DEVICE(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5510) },
        { PCI_DEVICE(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5520) },
        { },
@@ -272,14 +272,15 @@ static void __init init_cyrix(struct cpuinfo_x86 *c)
 
                printk(KERN_INFO "Working around Cyrix MediaGX virtual DMA bugs.\n");
                isa_dma_bridge_buggy = 2;
-#endif         
-               c->x86_cache_size=16;   /* Yep 16K integrated cache thats it */
+
+
                /*
                 *  The 5510/5520 companion chips have a funky PIT.
                 */  
                if (pci_dev_present(cyrix_55x0))
                        pit_latch_buggy = 1;
+#endif
+               c->x86_cache_size=16;   /* Yep 16K integrated cache thats it */
 
                /* GXm supports extended cpuid levels 'ala' AMD */
                if (c->cpuid_level == 2) {
@@ -342,6 +343,31 @@ static void __init init_cyrix(struct cpuinfo_x86 *c)
        return;
 }
 
+/*
+ * Handle National Semiconductor branded processors
+ */
+static void __init init_nsc(struct cpuinfo_x86 *c)
+{
+       /* There may be GX1 processors in the wild that are branded
+        * NSC and not Cyrix.
+        *
+        * This function only handles the GX processor, and kicks every
+        * thing else to the Cyrix init function above - that should
+        * cover any processors that might have been branded differently
+        * after NSC acquired Cyrix.
+        *
+        * If this breaks your GX1 horribly, please e-mail
+        * info-linux@ldcmail.amd.com to tell us.
+        */
+
+       /* Handle the GX (Formally known as the GX2) */
+
+       if (c->x86 == 5 && c->x86_model == 5)
+               display_cacheinfo(c);
+       else
+               init_cyrix(c);
+}
+
 /*
  * Cyrix CPUs without cpuid or with cpuid not yet enabled can be detected
  * by the fact that they preserve the flags across the division of 5/2.
@@ -419,10 +445,18 @@ int __init cyrix_init_cpu(void)
 
 //early_arch_initcall(cyrix_init_cpu);
 
+static int __init cyrix_exit_cpu(void)
+{
+       cpu_devs[X86_VENDOR_CYRIX] = NULL;
+       return 0;
+}
+
+late_initcall(cyrix_exit_cpu);
+
 static struct cpu_dev nsc_cpu_dev __initdata = {
        .c_vendor       = "NSC",
        .c_ident        = { "Geode by NSC" },
-       .c_init         = init_cyrix,
+       .c_init         = init_nsc,
        .c_identify     = generic_identify,
 };
 
@@ -433,3 +467,11 @@ int __init nsc_init_cpu(void)
 }
 
 //early_arch_initcall(nsc_init_cpu);
+
+static int __init nsc_exit_cpu(void)
+{
+       cpu_devs[X86_VENDOR_NSC] = NULL;
+       return 0;
+}
+
+late_initcall(nsc_exit_cpu);