xref: /openbsd-src/sys/dev/fdt/rsbvar.h (revision e8df791254e06ae3b54022ffbfd467f85546cacd)
1 /*	$OpenBSD: rsbvar.h,v 1.3 2019/08/29 11:51:48 kettenis Exp $	*/
2 /*
3  * Copyright (c) 2017 Mark Kettenis <kettenis@openbsd.org>
4  *
5  * Permission to use, copy, modify, and distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17 
18 struct rsb_attach_args {
19 	void		*ra_cookie;
20 	uint16_t	ra_da;
21 	uint8_t		ra_rta;
22 	char		*ra_name;
23 	int		ra_node;
24 };
25 
26 int	rsb_print(void *, const char *);
27 
28 uint8_t	rsb_read_1(void *, uint8_t, uint8_t);
29 uint16_t rsb_read_2(void *, uint8_t, uint8_t);
30 void	rsb_write_1(void *, uint8_t, uint8_t, uint8_t);
31 void	rsb_write_2(void *, uint8_t, uint8_t, uint16_t);
32