patch-2.1.115 linux/arch/ppc/kernel/pmac_setup.c

Next file: linux/arch/ppc/kernel/pmac_time.c
Previous file: linux/arch/ppc/kernel/pmac_pci.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.114/linux/arch/ppc/kernel/pmac_setup.c linux/arch/ppc/kernel/pmac_setup.c
@@ -96,6 +96,18 @@
 }
 #endif
 
+/*
+ * Dummy mksound function that does nothing.
+ * The real one is in the dmasound driver.
+ */
+static void
+pmac_mksound(unsigned int hz, unsigned int ticks)
+{
+}
+
+static volatile u32 *sysctrl_regs;
+static volatile u32 *feature_addr;
+
 __initfunc(void
 pmac_setup_arch(unsigned long *memory_start_p, unsigned long *memory_end_p))
 {
@@ -124,7 +136,8 @@
 
 	/* this area has the CPU identification register
 	   and some registers used by smp boards */
-	ioremap(0xf8000000, 0x1000);
+	sysctrl_regs = (volatile u32 *) ioremap(0xf8000000, 0x1000);
+	__ioremap(0xffc00000, 0x400000, pgprot_val(PAGE_READONLY));
 
 	*memory_start_p = pmac_find_bridges(*memory_start_p, *memory_end_p);
 
@@ -140,16 +153,10 @@
 #ifdef CONFIG_DUMMY_CONSOLE
 	conswitchp = &dummy_con;
 #endif
-#ifdef CONFIG_ABSCON_COMPAT
-	/* Console wrapper */
-	conswitchp = &compat_con;
-#endif
 
 	kd_mksound = pmac_mksound;
 }
 
-static volatile u32 *feature_addr;
-
 __initfunc(static void ohare_init(void))
 {
 	struct device_node *np;
@@ -173,6 +180,19 @@
 		out_le32(feature_addr, in_le32(feature_addr) | PBOOK_FEATURES);
 		printk(KERN_DEBUG "feature reg = %x\n", in_le32(feature_addr));
 	}
+
+	/*
+	 * Turn on the L2 cache.
+	 * We assume that we have a PSX memory controller iff
+	 * we have an ohare I/O controller.
+	 */
+	if (((sysctrl_regs[2] >> 24) & 0xf) >= 3) {
+		if (sysctrl_regs[4] & 0x10)
+			sysctrl_regs[4] |= 0x04000020;
+		else
+			sysctrl_regs[4] |= 0x04000000;
+		printk(KERN_INFO "Level 2 cache enabled\n");
+	}
 }
 
 extern char *bootpath;
@@ -189,9 +209,6 @@
 	if (_machine == _MACH_Pmac) {
 		media_bay_init();
 	}
-#ifdef CONFIG_PMAC_CONSOLE
-	pmac_find_display();
-#endif
 }
 
 __initfunc(void
@@ -298,6 +315,10 @@
 	p = find_devices("ATA");
 	if (p == NULL)
 		p = find_devices("IDE");
+	if (p == NULL)
+		p = find_type_devices("ide");
+	if (p == NULL)
+		p = find_type_devices("ata");
 	/* Move removable devices such as the media-bay CDROM
 	   on the PB3400 to the end of the list. */
 	for (; p != NULL; p = p->next) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov