patch-1.3.93 linux/arch/sparc/kernel/devices.c

Next file: linux/arch/sparc/kernel/entry.S
Previous file: linux/arch/sparc/kernel/cpu.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.92/linux/arch/sparc/kernel/devices.c linux/arch/sparc/kernel/devices.c
@@ -5,6 +5,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/config.h>
 
 #include <asm/page.h>
 #include <asm/oplib.h>
@@ -15,7 +16,7 @@
 int linux_num_cpus;
 
 extern void cpu_probe(void);
-extern void auxio_probe(void);
+extern void clock_stop_probe(void); /* tadpole.c */
 
 unsigned long
 device_scan(unsigned long mem_start)
@@ -25,13 +26,21 @@
 	int cpu_nds[NCPUS];  /* One node for each cpu */
 	int cpu_ctr = 0;
 
+#if CONFIG_AP1000
+        printk("Not scanning device list for CPUs\n");
+	linux_num_cpus = 1;
+	return;
+#endif
+
 	prom_getstring(prom_root_node, "device_type", node_str, sizeof(node_str));
+
 	if(strcmp(node_str, "cpu") == 0) {
 		cpu_nds[0] = prom_root_node;
 		cpu_ctr++;
 	} else {
 		int scan;
 		scan = prom_getchild(prom_root_node);
+		prom_printf("root child is %08lx\n", (unsigned long) scan);
 		nd = 0;
 		while((scan = prom_getsibling(scan)) != 0) {
 			prom_getstring(scan, "device_type", node_str, sizeof(node_str));
@@ -40,6 +49,9 @@
 				linux_cpus[cpu_ctr].prom_node = scan;
 				prom_getproperty(scan, "mid", (char *) &thismid, sizeof(thismid));
 				linux_cpus[cpu_ctr].mid = thismid;
+				prom_printf("Found CPU %d <node=%08lx,mid=%d>\n",
+					    cpu_ctr, (unsigned long) scan,
+					    thismid);
 				cpu_ctr++;
 			}
 		};
@@ -55,7 +67,13 @@
 	linux_num_cpus = cpu_ctr;
 
 	cpu_probe();
-	auxio_probe();
+#if CONFIG_SUN_AUXIO
+	{
+	  extern void auxio_probe(void);
+	  auxio_probe();
+	}
+#endif
+	clock_stop_probe();
 
 	return mem_start;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this