xref: /netbsd-src/sys/arch/macppc/dev/obiovar.h (revision 72d26a2dda23791b892cf8f1f49376e5de407c78)
158c0e446Smacallan /*-
258c0e446Smacallan  * Copyright (c) 2006 Michael Lorenz
358c0e446Smacallan  * All rights reserved.
458c0e446Smacallan  *
558c0e446Smacallan  * Redistribution and use in source and binary forms, with or without
658c0e446Smacallan  * modification, are permitted provided that the following conditions
758c0e446Smacallan  * are met:
858c0e446Smacallan  * 1. Redistributions of source code must retain the above copyright
958c0e446Smacallan  *    notice, this list of conditions and the following disclaimer.
1058c0e446Smacallan  * 2. Redistributions in binary form must reproduce the above copyright
1158c0e446Smacallan  *    notice, this list of conditions and the following disclaimer in the
1258c0e446Smacallan  *    documentation and/or other materials provided with the distribution.
1358c0e446Smacallan  *
1458c0e446Smacallan  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
1558c0e446Smacallan  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
1658c0e446Smacallan  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1758c0e446Smacallan  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
1858c0e446Smacallan  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1958c0e446Smacallan  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2058c0e446Smacallan  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2158c0e446Smacallan  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2258c0e446Smacallan  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2358c0e446Smacallan  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2458c0e446Smacallan  * POSSIBILITY OF SUCH DAMAGE.
2558c0e446Smacallan  */
2658c0e446Smacallan 
27*72d26a2dSrin #include <sys/cdefs.h>
28*72d26a2dSrin __KERNEL_RCSID(0, "$NetBSD: obiovar.h,v 1.5 2020/04/16 23:29:52 rin Exp $");
29*72d26a2dSrin 
3058c0e446Smacallan #ifndef OBIOVAR_H
3158c0e446Smacallan #define OBIOVAR_H
3258c0e446Smacallan 
3358c0e446Smacallan /*
3458c0e446Smacallan  * access obio registers
3558c0e446Smacallan  * Since only some PowerBooks have more than one obio and in these cases we
3658c0e446Smacallan  * need to special-case it anyway we can safely assume that whoever wants to
3758c0e446Smacallan  * mess with obio registers means obio0
3858c0e446Smacallan  */
3958c0e446Smacallan 
4058c0e446Smacallan void obio_write_4(int, uint32_t);
4158c0e446Smacallan void obio_write_1(int, uint8_t);
4258c0e446Smacallan uint32_t obio_read_4(int);
4358c0e446Smacallan uint8_t obio_read_1(int);
441d8dbdddSmacallan int obio_space_map(bus_addr_t, bus_size_t, bus_space_handle_t *);
4558c0e446Smacallan 
469a3f01e8Smacallan /* some common offsets */
479a3f01e8Smacallan #define HEATHROW_FCR	0x38
489a3f01e8Smacallan #define KEYLARGO_FCR1	0x3c
4958c0e446Smacallan 
5058c0e446Smacallan #endif /* OBIOVAR_H */
51