xref: /netbsd/sys/arch/arm/arm/bus_space_notimpl.S (revision bf9ec67e)
1/*	$NetBSD: bus_space_notimpl.S,v 1.2 2001/09/10 02:20:19 reinoud Exp $	*/
2
3/*
4 * Copyright (c) 1997 Mark Brinicombe.
5 * All rights reserved.
6 *
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. All advertising materials mentioning features or use of this software
16 *    must display the following acknowledgement:
17 *	This product includes software developed by Mark Brinicombe.
18 * 4. The name of the company nor the name of the author may be used to
19 *    endorse or promote products derived from this software without specific
20 *    prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
23 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 */
34
35#include <machine/asm.h>
36
37/*
38 * BUS_SPACE - name of this bus space
39 */
40
41#define BUS_SPACE	bs_notimpl
42
43#define __C(x,y)	__CONCAT(x,y)
44#define __S(s)		__STRING(s)
45#define NAME(func)	__C(BUS_SPACE,__C(_bs_,func))
46#define LNAME(func)	__C(L,NAME(func))
47
48#define	__L(x)		_C_LABEL(x)
49#define GLOBAL(func)	.global	__L(NAME(func))
50#define LABEL(func)	__L(NAME(func)):
51#define LLABEL(func)	LNAME(func):
52
53#define FTEXT(func,text)	__S(__C(NAME(func),text))
54
55
56#define NOT_IMPL(func)							\
57	GLOBAL(func)						;	\
58LABEL(func)							;	\
59	stmfd	sp!, {r0-r3}					;	\
60	adr	r0, LNAME(__C(func,_text))			;	\
61	mov	r1, sp						;	\
62	b	_C_LABEL(panic)					;	\
63								;	\
64LLABEL(__C(func,_text))						;	\
65	.asciz	FTEXT(func,: args at 0x%08x\n)			;	\
66	.align	0						;
67
68
69/*
70 * misc functions
71 */
72
73NOT_IMPL(mmap)
74
75
76/*
77 * Generic bus_space I/O functions
78 */
79
80/*
81 * read single
82 */
83
84NOT_IMPL(r_1)
85NOT_IMPL(r_2)
86NOT_IMPL(r_4)
87NOT_IMPL(r_8)
88
89/*
90 * write single
91 */
92
93NOT_IMPL(w_1)
94NOT_IMPL(w_2)
95NOT_IMPL(w_4)
96NOT_IMPL(w_8)
97
98/*
99 * read multiple
100 */
101
102NOT_IMPL(rm_1)
103NOT_IMPL(rm_2)
104NOT_IMPL(rm_4)
105NOT_IMPL(rm_8)
106
107/*
108 * write multiple
109 */
110
111NOT_IMPL(wm_1)
112NOT_IMPL(wm_2)
113NOT_IMPL(wm_4)
114NOT_IMPL(wm_8)
115
116/*
117 * read region
118 */
119
120NOT_IMPL(rr_1)
121NOT_IMPL(rr_2)
122NOT_IMPL(rr_4)
123NOT_IMPL(rr_8)
124
125/*
126 * write region
127 */
128
129NOT_IMPL(wr_1)
130NOT_IMPL(wr_2)
131NOT_IMPL(wr_4)
132NOT_IMPL(wr_8)
133
134/*
135 * set multiple
136 */
137
138NOT_IMPL(sm_1)
139NOT_IMPL(sm_2)
140NOT_IMPL(sm_4)
141NOT_IMPL(sm_8)
142
143/*
144 * set region
145 */
146
147NOT_IMPL(sr_1)
148NOT_IMPL(sr_2)
149NOT_IMPL(sr_4)
150NOT_IMPL(sr_8)
151
152/*
153 * copy
154 */
155
156NOT_IMPL(c_1)
157NOT_IMPL(c_2)
158NOT_IMPL(c_4)
159NOT_IMPL(c_8)
160