Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / arm / omap / omap_nobyteacc_space.c
blobc7d376571a67211754dbd7f4908f41be87491774
1 /* $NetBSD: $ */
3 /*
4 * "nobyteacc" bus_space functions for Texas Instruments OMAP processor.
5 * Based on pxa2x0_space.c which in turn was derived from i80321_space.c.
7 * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
8 * All rights reserved.
10 * Written by Jason R. Thorpe for Wasabi Systems, Inc.
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 * 3. All advertising materials mentioning features or use of this software
21 * must display the following acknowledgement:
22 * This product includes software developed for the NetBSD Project by
23 * Wasabi Systems, Inc.
24 * 4. The name of Wasabi Systems, Inc. may not be used to endorse
25 * or promote products derived from this software without specific prior
26 * written permission.
28 * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
29 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
30 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
32 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38 * POSSIBILITY OF SUCH DAMAGE.
40 * Copyright (c) 1997 Mark Brinicombe.
41 * Copyright (c) 1997 Causality Limited.
42 * All rights reserved.
44 * This code is derived from software contributed to The NetBSD Foundation
45 * by Ichiro FUKUHARA.
47 * Redistribution and use in source and binary forms, with or without
48 * modification, are permitted provided that the following conditions
49 * are met:
50 * 1. Redistributions of source code must retain the above copyright
51 * notice, this list of conditions and the following disclaimer.
52 * 2. Redistributions in binary form must reproduce the above copyright
53 * notice, this list of conditions and the following disclaimer in the
54 * documentation and/or other materials provided with the distribution.
55 * 3. All advertising materials mentioning features or use of this software
56 * must display the following acknowledgement:
57 * This product includes software developed by Mark Brinicombe.
58 * 4. The name of the company nor the name of the author may be used to
59 * endorse or promote products derived from this software without specific
60 * prior written permission.
62 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
63 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
64 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
65 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
66 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
67 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
68 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
69 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
70 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
71 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
72 * SUCH DAMAGE.
75 #include <sys/cdefs.h>
76 __KERNEL_RCSID(0, "$NetBSD: $");
78 #include <sys/param.h>
79 #include <sys/systm.h>
81 #include <uvm/uvm_extern.h>
83 #include <machine/bus.h>
85 /* Prototypes for all the bus_space structure functions */
86 bs_protos(omap);
87 bs_protos(nobyteacc);
88 bs_protos(generic);
89 bs_protos(generic_armv4);
90 bs_protos(bs_notimpl);
92 struct bus_space nobyteacc_bs_tag = {
93 /* cookie */
94 (void *) 0,
96 /* mapping/unmapping */
97 omap_bs_map,
98 omap_bs_unmap,
99 omap_bs_subregion,
101 /* allocation/deallocation */
102 omap_bs_alloc, /* not implemented */
103 omap_bs_free, /* not implemented */
105 /* get kernel virtual address */
106 omap_bs_vaddr,
108 /* mmap */
109 bs_notimpl_bs_mmap,
111 /* barrier */
112 omap_bs_barrier,
114 /* read (single) */
115 generic_bs_r_1,
116 generic_armv4_bs_r_2,
117 generic_bs_r_4,
118 bs_notimpl_bs_r_8,
120 /* read multiple */
121 generic_bs_rm_1,
122 generic_armv4_bs_rm_2,
123 generic_bs_rm_4,
124 bs_notimpl_bs_rm_8,
126 /* read region */
127 generic_bs_rr_1,
128 generic_armv4_bs_rr_2,
129 generic_bs_rr_4,
130 bs_notimpl_bs_rr_8,
132 /* write (single) */
133 nobyteacc_bs_w_1, /* promote 8-bit writes to 16-bit */
134 generic_armv4_bs_w_2,
135 generic_bs_w_4,
136 bs_notimpl_bs_w_8,
138 /* write multiple */
139 bs_notimpl_bs_wm_1,
140 generic_armv4_bs_wm_2,
141 generic_bs_wm_4,
142 bs_notimpl_bs_wm_8,
144 /* write region */
145 bs_notimpl_bs_wr_1,
146 generic_armv4_bs_wr_2,
147 generic_bs_wr_4,
148 bs_notimpl_bs_wr_8,
150 /* set multiple */
151 bs_notimpl_bs_sm_1,
152 bs_notimpl_bs_sm_2,
153 bs_notimpl_bs_sm_4,
154 bs_notimpl_bs_sm_8,
156 /* set region */
157 bs_notimpl_bs_sr_1,
158 generic_armv4_bs_sr_2,
159 bs_notimpl_bs_sr_4,
160 bs_notimpl_bs_sr_8,
162 /* copy */
163 bs_notimpl_bs_c_1,
164 generic_armv4_bs_c_2,
165 bs_notimpl_bs_c_4,
166 bs_notimpl_bs_c_8,