xref: /netbsd-src/sys/arch/macppc/dev/obiovar.h (revision 72d26a2dda23791b892cf8f1f49376e5de407c78)
1 /*-
2  * Copyright (c) 2006 Michael Lorenz
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
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  *
14  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
15  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
16  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
18  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24  * POSSIBILITY OF SUCH DAMAGE.
25  */
26 
27 #include <sys/cdefs.h>
28 __KERNEL_RCSID(0, "$NetBSD: obiovar.h,v 1.5 2020/04/16 23:29:52 rin Exp $");
29 
30 #ifndef OBIOVAR_H
31 #define OBIOVAR_H
32 
33 /*
34  * access obio registers
35  * Since only some PowerBooks have more than one obio and in these cases we
36  * need to special-case it anyway we can safely assume that whoever wants to
37  * mess with obio registers means obio0
38  */
39 
40 void obio_write_4(int, uint32_t);
41 void obio_write_1(int, uint8_t);
42 uint32_t obio_read_4(int);
43 uint8_t obio_read_1(int);
44 int obio_space_map(bus_addr_t, bus_size_t, bus_space_handle_t *);
45 
46 /* some common offsets */
47 #define HEATHROW_FCR	0x38
48 #define KEYLARGO_FCR1	0x3c
49 
50 #endif /* OBIOVAR_H */
51