From 53ea55fd08634e7a5a3acfd5954dc789ee7a52e1 Mon Sep 17 00:00:00 2001 From: macallan Date: Fri, 23 Sep 2005 18:53:16 +0000 Subject: [PATCH] Added macros for bus_space_mmap() and bus_space_vaddr() --- sys/arch/macppc/include/bus.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/arch/macppc/include/bus.h b/sys/arch/macppc/include/bus.h index 7433bb4215c2..6b612db9c883 100644 --- a/sys/arch/macppc/include/bus.h +++ b/sys/arch/macppc/include/bus.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.17 2005/03/09 19:04:44 matt Exp $ */ +/* $NetBSD: bus.h,v 1.18 2005/09/23 18:53:16 macallan Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -387,6 +387,10 @@ bus_space_read_region_stream_4(tag, bsh, offset, addr, count) #define bus_space_write_stream_2(t, h, o, v) out16(__BA(t, h, o), (v)) #define bus_space_write_stream_4(t, h, o, v) out32(__BA(t, h, o), (v)) +#define bus_space_mmap(tag, addr, off, prot, flags) \ + (paddr_t)((tag & MACPPC_BUS_ADDR_MASK) + addr + off) +#define bus_space_vaddr(tag, handle) __BA(tag, handle, 0) + #if 0 /* Cause a link error for bus_space_write_8 */ #define bus_space_write_8 !!! unimplemented !!! #endif