2 * Copyright (C) 2012 FreeBSD Foundation
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of MARVELL nor the names of contributors
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 #include <sys/cdefs.h>
31 __FBSDID("$FreeBSD$");
33 #include <sys/param.h>
34 #include <sys/systm.h>
36 #include <sys/kernel.h>
37 #include <sys/malloc.h>
39 #include <machine/bus.h>
41 /* Prototypes for all the bus_space structure functions */
43 bs_protos(generic_armv4);
45 struct bus_space _base_tag = {
47 .bs_cookie = (void *) 0,
49 /* mapping/unmapping */
50 .bs_map = generic_bs_map,
51 .bs_unmap = generic_bs_unmap,
52 .bs_subregion = generic_bs_subregion,
54 /* allocation/deallocation */
55 .bs_alloc = generic_bs_alloc,
56 .bs_free = generic_bs_free,
59 .bs_barrier = generic_bs_barrier,
62 .bs_r_1 = generic_bs_r_1,
63 .bs_r_2 = generic_armv4_bs_r_2,
64 .bs_r_4 = generic_bs_r_4,
68 .bs_rm_1 = generic_bs_rm_1,
69 .bs_rm_2 = generic_armv4_bs_rm_2,
70 .bs_rm_4 = generic_bs_rm_4,
74 .bs_rr_1 = generic_bs_rr_1,
75 .bs_rr_2 = generic_armv4_bs_rr_2,
76 .bs_rr_4 = generic_bs_rr_4,
80 .bs_w_1 = generic_bs_w_1,
81 .bs_w_2 = generic_armv4_bs_w_2,
82 .bs_w_4 = generic_bs_w_4,
86 .bs_wm_1 = generic_bs_wm_1,
87 .bs_wm_2 = generic_armv4_bs_wm_2,
88 .bs_wm_4 = generic_bs_wm_4,
92 .bs_wr_1 = generic_bs_wr_1,
93 .bs_wr_2 = generic_armv4_bs_wr_2,
94 .bs_wr_4 = generic_bs_wr_4,
98 /* XXX not implemented */
102 .bs_sr_2 = generic_armv4_bs_sr_2,
103 .bs_sr_4 = generic_bs_sr_4,
108 .bs_c_2 = generic_armv4_bs_c_2,
113 bus_space_tag_t fdtbus_bs_tag = &_base_tag;