implement bus_space_vaddr()
This commit is contained in:
parent
13c9f8d398
commit
5e990a7f7c
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: footbridge_com_io.c,v 1.1 1998/09/06 02:20:34 mark Exp $ */
|
||||
/* $NetBSD: footbridge_com_io.c,v 1.2 2000/04/17 17:39:17 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Mark Brinicombe.
|
||||
@ -66,6 +66,9 @@ struct bus_space fcomcons_bs_tag = {
|
||||
fcomcons_bs_alloc,
|
||||
fcomcons_bs_free,
|
||||
|
||||
/* get kernel virtual address */
|
||||
0, /* never used */
|
||||
|
||||
/* barrier */
|
||||
fcomcons_bs_barrier,
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: footbridge_io.c,v 1.4 2000/01/10 07:43:07 mark Exp $ */
|
||||
/* $NetBSD: footbridge_io.c,v 1.5 2000/04/17 17:39:17 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Causality Limited
|
||||
@ -68,6 +68,9 @@ struct bus_space footbridge_bs_tag = {
|
||||
footbridge_bs_alloc,
|
||||
footbridge_bs_free,
|
||||
|
||||
/* get kernel virtual address */
|
||||
footbridge_bs_vaddr,
|
||||
|
||||
/* barrier */
|
||||
footbridge_bs_barrier,
|
||||
|
||||
@ -293,6 +296,15 @@ footbridge_bs_subregion(t, bsh, offset, size, nbshp)
|
||||
return (0);
|
||||
}
|
||||
|
||||
void *
|
||||
footbridge_bs_vaddr(t, bsh)
|
||||
void *t;
|
||||
bus_space_handle_t bsh;
|
||||
{
|
||||
|
||||
return ((void *)bsh);
|
||||
}
|
||||
|
||||
void
|
||||
footbridge_bs_barrier(t, bsh, offset, len, flags)
|
||||
void *t;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bus.h,v 1.18 2000/01/25 22:13:19 drochner Exp $ */
|
||||
/* $NetBSD: bus.h,v 1.19 2000/04/17 17:39:17 drochner Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -113,6 +113,9 @@ struct bus_space {
|
||||
void (*bs_free) __P((void *, bus_space_handle_t,
|
||||
bus_size_t));
|
||||
|
||||
/* get kernel virtual address */
|
||||
void * (*bs_vaddr) __P((void *, bus_space_handle_t));
|
||||
|
||||
/* barrier */
|
||||
void (*bs_barrier) __P((void *, bus_space_handle_t,
|
||||
bus_size_t, bus_size_t, int));
|
||||
@ -248,6 +251,12 @@ struct bus_space {
|
||||
#define bus_space_free(t, h, s) \
|
||||
(*(t)->bs_free)((t)->bs_cookie, (h), (s))
|
||||
|
||||
/*
|
||||
* Get kernel virtual address for ranges mapped BUS_SPACE_MAP_LINEAR.
|
||||
*/
|
||||
#define bus_space_vaddr(t, h) \
|
||||
(*(t)->bs_vaddr)((t)->bs_cookie, (h))
|
||||
|
||||
/*
|
||||
* Bus barrier operations.
|
||||
*/
|
||||
@ -393,6 +402,9 @@ int __bs_c(f,_bs_alloc) __P((void *t, bus_addr_t rstart, \
|
||||
void __bs_c(f,_bs_free) __P((void *t, bus_space_handle_t bsh, \
|
||||
bus_size_t size));
|
||||
|
||||
#define bs_vaddr_proto(f) \
|
||||
void * __bs_c(f,_bs_vaddr) __P((void *t, bus_space_handle_t bsh));
|
||||
|
||||
#define bs_barrier_proto(f) \
|
||||
void __bs_c(f,_bs_barrier) __P((void *t, bus_space_handle_t bsh, \
|
||||
bus_size_t offset, bus_size_t len, int flags));
|
||||
@ -551,6 +563,7 @@ bs_unmap_proto(f); \
|
||||
bs_subregion_proto(f); \
|
||||
bs_alloc_proto(f); \
|
||||
bs_free_proto(f); \
|
||||
bs_vaddr_proto(f); \
|
||||
bs_barrier_proto(f); \
|
||||
bs_r_1_proto(f); \
|
||||
bs_r_2_proto(f); \
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: iomd_io.c,v 1.3 1998/07/05 23:31:16 mark Exp $ */
|
||||
/* $NetBSD: iomd_io.c,v 1.4 2000/04/17 17:39:17 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Mark Brinicombe.
|
||||
@ -61,6 +61,9 @@ struct bus_space iomd_bs_tag = {
|
||||
iomd_bs_alloc,
|
||||
iomd_bs_free,
|
||||
|
||||
/* get kernel virtual address */
|
||||
0, /* there is no linear mapping */
|
||||
|
||||
/* barrier */
|
||||
iomd_bs_barrier,
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: isa_io.c,v 1.6 1999/04/22 10:12:41 ross Exp $ */
|
||||
/* $NetBSD: isa_io.c,v 1.7 2000/04/17 17:39:18 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997
|
||||
@ -71,6 +71,9 @@ struct bus_space isa_io_bs_tag = {
|
||||
isa_bs_alloc,
|
||||
isa_bs_free,
|
||||
|
||||
/* get kernel virtual address */
|
||||
isa_bs_vaddr,
|
||||
|
||||
/* barrier */
|
||||
isa_bs_barrier,
|
||||
|
||||
@ -146,6 +149,9 @@ struct bus_space isa_mem_bs_tag = {
|
||||
isa_bs_alloc,
|
||||
isa_bs_free,
|
||||
|
||||
/* get kernel virtual address */
|
||||
isa_bs_vaddr,
|
||||
|
||||
/* barrier */
|
||||
isa_bs_barrier,
|
||||
|
||||
@ -288,6 +294,15 @@ isa_bs_free(t, bsh, size)
|
||||
panic("isa_free(): Help!\n");
|
||||
}
|
||||
|
||||
void *
|
||||
isa_bs_vaddr(t, bsh)
|
||||
void *t;
|
||||
bus_space_handle_t bsh;
|
||||
{
|
||||
|
||||
return ((void *)bsh);
|
||||
}
|
||||
|
||||
void
|
||||
isa_bs_barrier(t, bsh, offset, len, flags)
|
||||
void *t;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mainbus_io.c,v 1.4 1998/06/28 07:27:53 thorpej Exp $ */
|
||||
/* $NetBSD: mainbus_io.c,v 1.5 2000/04/17 17:39:18 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Mark Brinicombe.
|
||||
@ -60,6 +60,9 @@ struct bus_space mainbus_bs_tag = {
|
||||
mainbus_bs_alloc,
|
||||
mainbus_bs_free,
|
||||
|
||||
/* get kernel virtual address */
|
||||
0, /* there is no linear mapping */
|
||||
|
||||
/* barrier */
|
||||
mainbus_bs_barrier,
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: podulebus_io.c,v 1.7 1998/06/28 07:27:54 thorpej Exp $ */
|
||||
/* $NetBSD: podulebus_io.c,v 1.8 2000/04/17 17:39:18 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Mark Brinicombe.
|
||||
@ -60,6 +60,9 @@ struct bus_space podulebus_bs_tag = {
|
||||
podulebus_bs_alloc,
|
||||
podulebus_bs_free,
|
||||
|
||||
/* get kernel virtual address */
|
||||
0, /* there is no linear mapping */
|
||||
|
||||
/* barrier */
|
||||
podulebus_bs_barrier,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user