Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/macppc/dev map more register space on Shasta/K2, ne...



details:   https://anonhg.NetBSD.org/src/rev/37fac89a9d44
branches:  trunk
changeset: 786286:37fac89a9d44
user:      macallan <macallan%NetBSD.org@localhost>
date:      Thu Apr 25 11:22:22 2013 +0000

description:
map more register space on Shasta/K2, needed for SMU mailbox registers

diffstat:

 sys/arch/macppc/dev/obio.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (43 lines):

diff -r ae3749c159b0 -r 37fac89a9d44 sys/arch/macppc/dev/obio.c
--- a/sys/arch/macppc/dev/obio.c        Thu Apr 25 09:01:23 2013 +0000
+++ b/sys/arch/macppc/dev/obio.c        Thu Apr 25 11:22:22 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: obio.c,v 1.39 2013/04/17 12:25:15 macallan Exp $       */
+/*     $NetBSD: obio.c,v 1.40 2013/04/25 11:22:22 macallan Exp $       */
 
 /*-
  * Copyright (C) 1998  Internet Research Institute, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.39 2013/04/17 12:25:15 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.40 2013/04/25 11:22:22 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -132,6 +132,7 @@
        int node, child, namelen, error;
        u_int reg[20];
        int intr[6], parent_intr = 0, parent_nintr = 0;
+       int map_size = 0x1000;
        char name[32];
        char compat[32];
 
@@ -161,6 +162,7 @@
        case PCI_PRODUCT_APPLE_K2:
        case PCI_PRODUCT_APPLE_SHASTA:
                node = OF_finddevice("mac-io");
+               map_size = 0x10000;
                break;
 
        default:
@@ -196,7 +198,7 @@
        ca.ca_baseaddr = reg[2];
        ca.ca_tag = pa->pa_memt;
        sc->sc_tag = pa->pa_memt;
-       error = bus_space_map (pa->pa_memt, ca.ca_baseaddr, 0x80, 0, &bsh);
+       error = bus_space_map (pa->pa_memt, ca.ca_baseaddr, map_size, 0, &bsh);
        if (error)
                panic(": failed to map mac-io %#x", ca.ca_baseaddr);
        sc->sc_bh = bsh;



Home | Main Index | Thread Index | Old Index