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.
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
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
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
47 * Redistribution and use in source and binary forms, with or without
48 * modification, are permitted provided that the following conditions
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
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 */
89 bs_protos(generic_armv4
);
90 bs_protos(bs_notimpl
);
92 struct bus_space nobyteacc_bs_tag
= {
96 /* mapping/unmapping */
101 /* allocation/deallocation */
102 omap_bs_alloc
, /* not implemented */
103 omap_bs_free
, /* not implemented */
105 /* get kernel virtual address */
116 generic_armv4_bs_r_2
,
122 generic_armv4_bs_rm_2
,
128 generic_armv4_bs_rr_2
,
133 nobyteacc_bs_w_1
, /* promote 8-bit writes to 16-bit */
134 generic_armv4_bs_w_2
,
140 generic_armv4_bs_wm_2
,
146 generic_armv4_bs_wr_2
,
158 generic_armv4_bs_sr_2
,
164 generic_armv4_bs_c_2
,