Sync usage with man page.
[netbsd-mini2440.git] / sys / arch / shark / include / devmap.h
blobcc66ec68806a7a2ad4f0805102db3bbd81d42878
1 /* $NetBSD$ */
3 /*
4 * Copyright 1997
5 * Digital Equipment Corporation. All rights reserved.
7 * This software is furnished under license and may be used and
8 * copied only in accordance with the following terms and conditions.
9 * Subject to these conditions, you may download, copy, install,
10 * use, modify and distribute this software in source and/or binary
11 * form. No title or ownership is transferred hereby.
13 * 1) Any source code used, modified or distributed must reproduce
14 * and retain this copyright notice and list of conditions as
15 * they appear in the source file.
17 * 2) No right is granted to use any trade name, trademark, or logo of
18 * Digital Equipment Corporation. Neither the "Digital Equipment
19 * Corporation" name nor any trademark or logo of Digital Equipment
20 * Corporation may be used to endorse or promote products derived
21 * from this software without the prior written permission of
22 * Digital Equipment Corporation.
24 * 3) This software is provided "AS-IS" and any express or implied
25 * warranties, including but not limited to, any implied warranties
26 * of merchantability, fitness for a particular purpose, or
27 * non-infringement are disclaimed. In no event shall DIGITAL be
28 * liable for any damages whatsoever, and in particular, DIGITAL
29 * shall not be liable for special, indirect, consequential, or
30 * incidental damages or damages for lost profits, loss of
31 * revenue or loss of use, whether such damages arise in contract,
32 * negligence, tort, under statute, in equity, at law or otherwise,
33 * even if advised of the possibility of such damage.
37 ** devmap.h -- device memory mapping definitions
39 ** <-----------------map size------------------------->
40 ** <--internal offset--><--internal size-->
41 ** |--------------------|------------------|----------|
42 ** v v v v
43 ** page device device page
44 ** start memory memory end
45 ** (map offset) start end
48 #ifndef _DEVMAP_H_
49 #define _DEVMAP_H_
51 #include <sys/types.h>
53 #define MAP_INFO_UNKNOWN -1
54 #define MAP_IOCTL 0
55 #define MAP_MMAP 1
56 #define MAP_I386_IOMAP 3
58 struct map_info {
59 int method; /* Mapping method - eg. IOCTL, MMAP, or I386_IOMAP */
60 u_long size; /* size of region, in bus-space units */
61 union {
62 long maxmapinfo[64/sizeof(long)];
63 struct {
64 int placeholder; /* nothing needed */
65 } map_info_ioctl; /* used for ioctl method */
66 struct {
67 off_t map_offset; /* offset to be given to mmap, page aligned */
68 size_t map_size; /* size to be given to mmap, page aligned */
69 off_t internal_offset; /* internal offset in mapped rgn to data */
70 size_t internal_size; /* actual size of accessible region */
71 } map_info_mmap; /* used for mmap'd methods */
72 struct {
73 u_long start_port;
74 } map_info_i386_iomap;
75 } u;
78 #endif /* _DEVMAP_H_ */