Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/macppc/macppc mapiodev() the CPU reset GPIOs instea...



details:   https://anonhg.NetBSD.org/src/rev/81653d0edc77
branches:  trunk
changeset: 321558:81653d0edc77
user:      macallan <macallan%NetBSD.org@localhost>
date:      Thu Mar 22 15:23:43 2018 +0000

description:
mapiodev() the CPU reset GPIOs instead of blindly assuming that everything
is BAT-mapped
Now the 2nd CPU on my PowerMac7,3 wakes up and says hi.

diffstat:

 sys/arch/macppc/macppc/cpu.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 7f368f8695ac -r 81653d0edc77 sys/arch/macppc/macppc/cpu.c
--- a/sys/arch/macppc/macppc/cpu.c      Thu Mar 22 15:18:05 2018 +0000
+++ b/sys/arch/macppc/macppc/cpu.c      Thu Mar 22 15:23:43 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.60 2014/03/26 17:45:16 christos Exp $        */
+/*     $NetBSD: cpu.c,v 1.61 2018/03/22 15:23:43 macallan Exp $        */
 
 /*-
  * Copyright (c) 2001 Tsubai Masanari.
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.60 2014/03/26 17:45:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.61 2018/03/22 15:23:43 macallan Exp $");
 
 #include "opt_ppcparam.h"
 #include "opt_multiprocessor.h"
@@ -209,7 +209,7 @@
 {
 #ifdef OPENPIC
        if (openpic_base) {
-               uint32_t kl_base = 0x80000000;  /* XXX */
+               uint32_t kl_base = (uint32_t)mapiodev(0x80000000, 0x1000, 0);
                uint32_t gpio = kl_base + 0x5c; /* XXX */
                u_int node, off;
                char cpupath[32];



Home | Main Index | Thread Index | Old Index