ebusvar.h revision 1.2 1 1.2 tsutsui /* $NetBSD: ebusvar.h,v 1.2 2011/06/12 03:57:09 tsutsui Exp $ */
2 1.1 pooka
3 1.1 pooka #ifndef _EMIPS_EBUS_EBUSVAR_H_
4 1.1 pooka #define _EMIPS_EBUS_EBUSVAR_H_
5 1.1 pooka
6 1.1 pooka #include <machine/bus.h>
7 1.1 pooka
8 1.1 pooka struct ebus_attach_args;
9 1.1 pooka
10 1.1 pooka struct ebus_softc {
11 1.1 pooka struct device sc_dev;
12 1.1 pooka };
13 1.1 pooka
14 1.1 pooka /*
15 1.1 pooka * Arguments used to attach an ebus "device" to its parent
16 1.1 pooka */
17 1.1 pooka struct ebus_dev_attach_args {
18 1.1 pooka const char *ida_busname; /* XXX should be common */
19 1.1 pooka bus_space_tag_t ida_memt;
20 1.1 pooka
21 1.1 pooka int ida_ndevs;
22 1.1 pooka struct ebus_attach_args *ida_devs;
23 1.1 pooka };
24 1.1 pooka
25 1.1 pooka /*
26 1.1 pooka * Arguments used to attach devices to an ebus
27 1.1 pooka */
28 1.1 pooka struct ebus_attach_args {
29 1.2 tsutsui const char *ia_name; /* device name */
30 1.2 tsutsui int ia_cookie; /* device cookie */
31 1.2 tsutsui uint32_t ia_paddr; /* device address (PHYSICAL) */
32 1.2 tsutsui void *ia_vaddr; /* device address (VIRTUAL) */
33 1.2 tsutsui int ia_basz; /* device size
34 1.2 tsutsui (for min regset at probe, else 0) */
35 1.1 pooka };
36 1.1 pooka
37 1.2 tsutsui void ebusattach(device_t , device_t , void *);
38 1.2 tsutsui int ebusprint(void *, const char *);
39 1.2 tsutsui void ebus_intr_establish(device_t , void *, int,
40 1.2 tsutsui int (*)(void *, void *), void *);
41 1.1 pooka
42 1.1 pooka #endif /* !_EMIPS_EBUS_EBUSVAR_H_ */
43