xref: /netbsd-src/sys/dev/ebus/ebusvar.h (revision c2b95373bf0fdf612ee0f8b5f5711bbc8c3d8b87)
1*c2b95373Smrg /*	$NetBSD: ebusvar.h,v 1.5 2008/05/29 14:51:27 mrg Exp $ */
2d2be07c5Suwe 
3d2be07c5Suwe /*
4d2be07c5Suwe  * Copyright (c) 1999, 2000 Matthew R. Green
5d2be07c5Suwe  * All rights reserved.
6d2be07c5Suwe  *
7d2be07c5Suwe  * Redistribution and use in source and binary forms, with or without
8d2be07c5Suwe  * modification, are permitted provided that the following conditions
9d2be07c5Suwe  * are met:
10d2be07c5Suwe  * 1. Redistributions of source code must retain the above copyright
11d2be07c5Suwe  *    notice, this list of conditions and the following disclaimer.
12d2be07c5Suwe  * 2. Redistributions in binary form must reproduce the above copyright
13d2be07c5Suwe  *    notice, this list of conditions and the following disclaimer in the
14d2be07c5Suwe  *    documentation and/or other materials provided with the distribution.
15d2be07c5Suwe  *
16d2be07c5Suwe  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17d2be07c5Suwe  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18d2be07c5Suwe  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19d2be07c5Suwe  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20d2be07c5Suwe  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21d2be07c5Suwe  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22d2be07c5Suwe  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23d2be07c5Suwe  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24d2be07c5Suwe  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25d2be07c5Suwe  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26d2be07c5Suwe  * SUCH DAMAGE.
27d2be07c5Suwe  */
28d2be07c5Suwe 
29d2be07c5Suwe #ifndef _DEV_EBUS_EBUSVAR_H_
30d2be07c5Suwe #define _DEV_EBUS_EBUSVAR_H_
31d2be07c5Suwe 
32d2be07c5Suwe /*
33d2be07c5Suwe  * ebus arguments; ebus attaches to a pci, and devices attach
34d2be07c5Suwe  * to the ebus.
35d2be07c5Suwe  */
36d2be07c5Suwe 
37d2be07c5Suwe struct ebus_attach_args {
38d2be07c5Suwe 	char			*ea_name;	/* PROM name */
39d2be07c5Suwe 	int			ea_node;	/* PROM node */
40d2be07c5Suwe 
41d2be07c5Suwe 	bus_space_tag_t		ea_bustag;
42d2be07c5Suwe 	bus_dma_tag_t		ea_dmatag;
43d2be07c5Suwe 
44d2be07c5Suwe 	struct ebus_regs	*ea_reg;	/* registers */
4556109695Skent 	uint32_t		*ea_vaddr;	/* virtual addrs */
4656109695Skent 	uint32_t		*ea_intr;	/* interrupts */
47d2be07c5Suwe 
48d2be07c5Suwe 	int			ea_nreg;	/* number of them */
49d2be07c5Suwe 	int			ea_nvaddr;
50d2be07c5Suwe 	int			ea_nintr;
51d2be07c5Suwe };
52d2be07c5Suwe 
53d2be07c5Suwe #endif /* _DEV_EBUS_EBUSVAR_H_ */
54