Module Name:    src
Committed By:   macallan
Date:           Fri Feb 28 22:09:35 UTC 2020

Modified Files:
        src/sys/arch/powerpc/oea: ofwoea_machdep.c

Log Message:
switch PowerMac7,* CPUs to full speed via OF
if we do this later we hang


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/powerpc/oea/ofwoea_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/powerpc/oea/ofwoea_machdep.c
diff -u src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.45 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.46
--- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.45	Sun Jul 15 05:16:44 2018
+++ src/sys/arch/powerpc/oea/ofwoea_machdep.c	Fri Feb 28 22:09:34 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ofwoea_machdep.c,v 1.45 2018/07/15 05:16:44 maxv Exp $ */
+/* $NetBSD: ofwoea_machdep.c,v 1.46 2020/02/28 22:09:34 macallan Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.45 2018/07/15 05:16:44 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.46 2020/02/28 22:09:34 macallan Exp $");
 
 #include "opt_ppcarch.h"
 #include "opt_compat_netbsd.h"
@@ -176,9 +176,17 @@ ofwoea_initppc(u_int startkernel, u_int 
 	}
 
 	if (strncmp(model_name, "PowerMac11,", 11) == 0 ||
-	    strncmp(model_name, "PowerMac7,", 10) == 0) 
+	    strncmp(model_name, "PowerMac7,", 10) == 0)
 		OF_quiesce();
 
+	/* switch CPUs to full speed */
+	if  (strncmp(model_name, "PowerMac7,", 10) == 0) {
+		int clock_ih = OF_open("/u3/i2c/i2c-hwclock");
+		if (clock_ih != 0) {
+			OF_call_method_1("slew-high", clock_ih, 0);
+		}
+	}
+
 	/* Initialize bus_space */
 	ofwoea_bus_space_init();
 

Reply via email to