Deleted Added
full compact
eisaconf.h (92739) eisaconf.h (102177)
1/*
2 * EISA bus device definitions
3 *
4 * Copyright (c) 1995, 1996 Justin T. Gibbs.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 14 unchanged lines hidden (view full) ---

23 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
1/*
2 * EISA bus device definitions
3 *
4 * Copyright (c) 1995, 1996 Justin T. Gibbs.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 14 unchanged lines hidden (view full) ---

23 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * $FreeBSD: head/sys/dev/eisa/eisaconf.h 92739 2002-03-20 02:08:01Z alfred $
31 * $FreeBSD: head/sys/dev/eisa/eisaconf.h 102177 2002-08-20 12:32:06Z mux $
32 */
33
34#ifndef _I386_EISA_EISACONF_H_
35#define _I386_EISA_EISACONF_H_ 1
36
37#define EISA_SLOT_SIZE 0x1000
38
39#define EISA_MFCTR_CHAR0(ID) (char)(((ID>>26) & 0x1F) | '@') /* Bits 26-30 */

--- 14 unchanged lines hidden (view full) ---

54};
55
56#define EISA_TRIGGER_EDGE 0x0
57#define EISA_TRIGGER_LEVEL 0x1
58
59/*
60 * Simplified accessors for isa devices
61 */
32 */
33
34#ifndef _I386_EISA_EISACONF_H_
35#define _I386_EISA_EISACONF_H_ 1
36
37#define EISA_SLOT_SIZE 0x1000
38
39#define EISA_MFCTR_CHAR0(ID) (char)(((ID>>26) & 0x1F) | '@') /* Bits 26-30 */

--- 14 unchanged lines hidden (view full) ---

54};
55
56#define EISA_TRIGGER_EDGE 0x0
57#define EISA_TRIGGER_LEVEL 0x1
58
59/*
60 * Simplified accessors for isa devices
61 */
62#define EISA_ACCESSOR(A, B, T) \
63 \
64static __inline T eisa_get_ ## A(device_t dev) \
65{ \
66 uintptr_t v; \
67 BUS_READ_IVAR(device_get_parent(dev), dev, EISA_IVAR_ ## B, &v); \
68 return (T) v; \
69} \
70 \
71static __inline void eisa_set_ ## A(device_t dev, T t) \
72{ \
73 u_long v = (u_long) t; \
74 BUS_WRITE_IVAR(device_get_parent(dev), dev, EISA_IVAR_ ## B, v); \
75}
62#define EISA_ACCESSOR(var, ivar, type) \
63 __BUS_ACCESSOR(eisa, var, EISA, ivar, type)
76
77EISA_ACCESSOR(slot, SLOT, int)
78EISA_ACCESSOR(id, ID, eisa_id_t)
79EISA_ACCESSOR(irq, IRQ, eisa_id_t)
80
64
65EISA_ACCESSOR(slot, SLOT, int)
66EISA_ACCESSOR(id, ID, eisa_id_t)
67EISA_ACCESSOR(irq, IRQ, eisa_id_t)
68
69#undef EISA_ACCESSOR
70
81int eisa_add_intr(device_t, int, int);
82
83#define RESVADDR_NONE 0x00
84#define RESVADDR_BITMASK 0x01 /* size is a mask of reserved
85 * bits at addr
86 */
87#define RESVADDR_RELOCATABLE 0x02
88int eisa_add_iospace(device_t, u_long, u_long, int);
89int eisa_add_mspace(device_t, u_long, u_long, int);
90
91#endif /* _I386_EISA_EISACONF_H_ */
71int eisa_add_intr(device_t, int, int);
72
73#define RESVADDR_NONE 0x00
74#define RESVADDR_BITMASK 0x01 /* size is a mask of reserved
75 * bits at addr
76 */
77#define RESVADDR_RELOCATABLE 0x02
78int eisa_add_iospace(device_t, u_long, u_long, int);
79int eisa_add_mspace(device_t, u_long, u_long, int);
80
81#endif /* _I386_EISA_EISACONF_H_ */