No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / evbarm / lubbock / sm_obio_space.c
blob77bac75f1a9d9d47477ab47de759717ab03f6b29
1 /* $NetBSD: sm_obio_space.c,v 1.1.2.3 2004/09/21 13:14:53 skrll Exp $ */
3 /*
4 * Copyright (c) 2002, 2003 Genetec Corporation. All rights reserved.
5 * Written by Hiroyuki Bessho for Genetec Corporation.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. The name of Genetec Corporation may not be used to endorse or
16 * promote products derived from this software without specific prior
17 * written permission.
19 * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GENETEC CORPORATION
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
33 * bus_space I/O functions for SMC91C96 on Lubbock.
36 #include <sys/cdefs.h>
37 __KERNEL_RCSID(0, "$NetBSD: sm_obio_space.c,v 1.1.2.3 2004/09/21 13:14:53 skrll Exp $");
39 #include <sys/param.h>
40 #include <sys/systm.h>
41 #include <sys/queue.h>
43 #include <uvm/uvm.h>
45 #include <machine/bus.h>
46 #include <machine/pmap.h>
48 /* Proto types for all the bus_space structure functions */
50 bs_protos(pxa2x0);
51 bs_protos(a4x);
52 bs_protos(smobio8);
53 bs_protos(bs_notimpl);
56 * Special bus space functions for on-board SMC91c96 in 8-bit mode
58 struct bus_space smobio8_bs_tag = {
59 /* cookie */
60 NULL,
62 /* mapping/unmapping */
63 pxa2x0_bs_map,
64 pxa2x0_bs_unmap,
65 pxa2x0_bs_subregion,
67 /* allocation/deallocation */
68 pxa2x0_bs_alloc,
69 pxa2x0_bs_free,
71 /* get kernel virtual address */
72 pxa2x0_bs_vaddr,
74 /* mmap bus space for userland */
75 bs_notimpl_bs_mmap,
77 /* barrier */
78 pxa2x0_bs_barrier,
80 /* read (single) */
81 a4x_bs_r_1,
82 smobio8_bs_r_2,
83 bs_notimpl_bs_r_4,
84 bs_notimpl_bs_r_8,
86 /* read multiple */
87 a4x_bs_rm_1,
88 smobio8_bs_rm_2,
89 bs_notimpl_bs_rm_4,
90 bs_notimpl_bs_rm_8,
92 /* read region */
93 bs_notimpl_bs_rr_1,
94 bs_notimpl_bs_rr_2,
95 bs_notimpl_bs_rr_4,
96 bs_notimpl_bs_rr_8,
98 /* write (single) */
99 a4x_bs_w_1,
100 smobio8_bs_w_2,
101 bs_notimpl_bs_w_4,
102 bs_notimpl_bs_w_8,
104 /* write multiple */
105 a4x_bs_wm_1,
106 smobio8_bs_wm_2,
107 bs_notimpl_bs_wm_4,
108 bs_notimpl_bs_wm_8,
110 /* write region */
111 bs_notimpl_bs_wr_1,
112 bs_notimpl_bs_wr_2,
113 bs_notimpl_bs_wr_4,
114 bs_notimpl_bs_wr_8,
116 /* set multiple */
117 bs_notimpl_bs_sm_1,
118 bs_notimpl_bs_sm_2,
119 bs_notimpl_bs_sm_4,
120 bs_notimpl_bs_sm_8,
122 /* set region */
123 bs_notimpl_bs_sr_1,
124 bs_notimpl_bs_sr_2,
125 bs_notimpl_bs_sr_4,
126 bs_notimpl_bs_sr_8,
128 /* copy */
129 bs_notimpl_bs_c_1,
130 bs_notimpl_bs_c_2,
131 bs_notimpl_bs_c_4,
132 bs_notimpl_bs_c_8,
135 /* bus space functions */