Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/oea switch PowerMac7,* CPUs to full speed v...



details:   https://anonhg.NetBSD.org/src/rev/a5a95a44d47d
branches:  trunk
changeset: 969712:a5a95a44d47d
user:      macallan <macallan%NetBSD.org@localhost>
date:      Fri Feb 28 22:09:34 2020 +0000

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

diffstat:

 sys/arch/powerpc/oea/ofwoea_machdep.c |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r 4fb45e9a4c54 -r a5a95a44d47d sys/arch/powerpc/oea/ofwoea_machdep.c
--- a/sys/arch/powerpc/oea/ofwoea_machdep.c     Fri Feb 28 17:50:29 2020 +0000
+++ b/sys/arch/powerpc/oea/ofwoea_machdep.c     Fri Feb 28 22:09:34 2020 +0000
@@ -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 @@
        }
 
        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();
 



Home | Main Index | Thread Index | Old Index