diff options
| author | macallan <macallan@NetBSD.org> | 2018-05-04 17:17:48 +0000 |
|---|---|---|
| committer | macallan <macallan@NetBSD.org> | 2018-05-04 17:17:48 +0000 |
| commit | 5fa6380fdaba558f76c2faef0ca8eb8b63181cfc (patch) | |
| tree | 3821c4a63e9e7155bf8d853fba93d85fd6ba3b3a /sys/arch/macppc/dev/obio.c | |
| parent | f255930e3260e9df49e99d533f047203c912d5f4 (diff) | |
map 64KB register space on G5, provide function to bus_space_subregion()
from this area so we don't run into mapping conflicts on G5
Not really relevant on 32bit where we BAT-map everything
Diffstat (limited to 'sys/arch/macppc/dev/obio.c')
| -rw-r--r-- | sys/arch/macppc/dev/obio.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/arch/macppc/dev/obio.c b/sys/arch/macppc/dev/obio.c index dcadbf2ad2b..4ba68544dc1 100644 --- a/sys/arch/macppc/dev/obio.c +++ b/sys/arch/macppc/dev/obio.c @@ -1,4 +1,4 @@ -/* $NetBSD: obio.c,v 1.44 2018/03/29 06:28:12 macallan Exp $ */ +/* $NetBSD: obio.c,v 1.45 2018/05/04 17:17:48 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.44 2018/03/29 06:28:12 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.45 2018/05/04 17:17:48 macallan Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -162,7 +162,7 @@ obio_attach(device_t parent, device_t self, void *aux) case PCI_PRODUCT_APPLE_K2: case PCI_PRODUCT_APPLE_SHASTA: node = OF_finddevice("mac-io"); - map_size = 0x8000; + map_size = 0x10000; break; default: @@ -337,6 +337,15 @@ uint8_t obio_read_1(int offset) return bus_space_read_1(obio0->sc_tag, obio0->sc_bh, offset); } +int +obio_space_map(bus_addr_t addr, bus_size_t size, bus_space_handle_t *bh) +{ + if (obio0 == NULL) + return 0xff; + return bus_space_subregion(obio0->sc_tag, obio0->sc_bh, + addr & 0xfffff, size, bh); +} + #ifdef OBIO_SPEED_CONTROL static void |
