Deleted Added
full compact
eisaconf.h (45791) eisaconf.h (49360)
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 * $Id: eisaconf.h,v 1.17 1997/09/21 21:35:23 gibbs Exp $
31 * $Id: eisaconf.h,v 1.18 1999/04/18 15:50:33 peter Exp $
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 */

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

48typedef u_int32_t eisa_id_t;
49
50enum eisa_device_ivars {
51 EISA_IVAR_SLOT,
52 EISA_IVAR_ID,
53 EISA_IVAR_IRQ
54};
55
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 */

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

48typedef u_int32_t eisa_id_t;
49
50enum eisa_device_ivars {
51 EISA_IVAR_SLOT,
52 EISA_IVAR_ID,
53 EISA_IVAR_IRQ
54};
55
56#define EISA_TRIGGER_EDGE 0x0
57#define EISA_TRIGGER_LEVEL 0x1
58
56/*
57 * Simplified accessors for isa devices
58 */
59#define EISA_ACCESSOR(A, B, T) \
60 \
61static __inline T eisa_get_ ## A(device_t dev) \
62{ \
63 uintptr_t v; \

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

70 u_long v = (u_long) t; \
71 BUS_WRITE_IVAR(device_get_parent(dev), dev, EISA_IVAR_ ## B, v); \
72}
73
74EISA_ACCESSOR(slot, SLOT, int)
75EISA_ACCESSOR(id, ID, eisa_id_t)
76EISA_ACCESSOR(irq, IRQ, eisa_id_t)
77
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; \

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

73 u_long v = (u_long) t; \
74 BUS_WRITE_IVAR(device_get_parent(dev), dev, EISA_IVAR_ ## B, v); \
75}
76
77EISA_ACCESSOR(slot, SLOT, int)
78EISA_ACCESSOR(id, ID, eisa_id_t)
79EISA_ACCESSOR(irq, IRQ, eisa_id_t)
80
78int eisa_add_intr __P((device_t, int));
81int eisa_add_intr __P((device_t, int, int));
79
80#define RESVADDR_NONE 0x00
81#define RESVADDR_BITMASK 0x01 /* size is a mask of reserved
82 * bits at addr
83 */
84#define RESVADDR_RELOCATABLE 0x02
85int eisa_add_iospace __P((device_t, u_long, u_long, int));
86int eisa_add_mspace __P((device_t, u_long, u_long, int));
87
88#endif /* _I386_EISA_EISACONF_H_ */
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 __P((device_t, u_long, u_long, int));
89int eisa_add_mspace __P((device_t, u_long, u_long, int));
90
91#endif /* _I386_EISA_EISACONF_H_ */