Annotation of sys/arch/landisk/dev/obiovar.h, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: obiovar.h,v 1.2 2006/10/07 20:52:40 miod Exp $ */
! 2: /* $NetBSD: obiovar.h,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
! 3:
! 4: /*-
! 5: * Copyright (c) 1997 The NetBSD Foundation, Inc.
! 6: * All rights reserved.
! 7: *
! 8: * This code is derived from software contributed to The NetBSD Foundation
! 9: * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
! 10: * NASA Ames Research Center.
! 11: *
! 12: * Redistribution and use in source and binary forms, with or without
! 13: * modification, are permitted provided that the following conditions
! 14: * are met:
! 15: * 1. Redistributions of source code must retain the above copyright
! 16: * notice, this list of conditions and the following disclaimer.
! 17: * 2. Redistributions in binary form must reproduce the above copyright
! 18: * notice, this list of conditions and the following disclaimer in the
! 19: * documentation and/or other materials provided with the distribution.
! 20: * 3. All advertising materials mentioning features or use of this software
! 21: * must display the following acknowledgement:
! 22: * This product includes software developed by the NetBSD
! 23: * Foundation, Inc. and its contributors.
! 24: * 4. Neither the name of The NetBSD Foundation nor the names of its
! 25: * contributors may be used to endorse or promote products derived
! 26: * from this software without specific prior written permission.
! 27: *
! 28: * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
! 29: * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
! 30: * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
! 31: * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
! 32: * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
! 33: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
! 34: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
! 35: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
! 36: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
! 37: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! 38: * POSSIBILITY OF SUCH DAMAGE.
! 39: */
! 40:
! 41: /*
! 42: * Copyright (c) 1995 Chris G. Demetriou
! 43: * Copyright (c) 1992 Berkeley Software Design, Inc.
! 44: * All rights reserved.
! 45: *
! 46: * Redistribution and use in source and binary forms, with or without
! 47: * modification, are permitted provided that the following conditions
! 48: * are met:
! 49: * 1. Redistributions of source code must retain the above copyright
! 50: * notice, this list of conditions and the following disclaimer.
! 51: * 2. Redistributions in binary form must reproduce the above copyright
! 52: * notice, this list of conditions and the following disclaimer in the
! 53: * documentation and/or other materials provided with the distribution.
! 54: * 3. All advertising materials mentioning features or use of this software
! 55: * must display the following acknowledgement:
! 56: * This product includes software developed by Berkeley Software
! 57: * Design, Inc.
! 58: * 4. The name of Berkeley Software Design must not be used to endorse
! 59: * or promote products derived from this software without specific
! 60: * prior written permission.
! 61: *
! 62: * THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN, INC. ``AS IS'' AND
! 63: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
! 64: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! 65: * ARE DISCLAIMED. IN NO EVENT SHALL BERKELEY SOFTWARE DESIGN, INC. BE LIABLE
! 66: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
! 67: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
! 68: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
! 69: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
! 70: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
! 71: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! 72: * SUCH DAMAGE.
! 73: *
! 74: * BSDI Id: isavar.h,v 1.5 1992/12/01 18:06:00 karels Exp
! 75: */
! 76:
! 77: #ifndef _LANDISK_OBIOVAR_H_
! 78: #define _LANDISK_OBIOVAR_H_
! 79:
! 80: #include <machine/bus.h>
! 81:
! 82: /* obio tag */
! 83: extern struct _bus_space obio_bus_io;
! 84: extern struct _bus_space obio_bus_mem;
! 85:
! 86: /*
! 87: * obio bus attach arguments
! 88: */
! 89: struct obiobus_attach_args {
! 90: const char *oba_busname; /* XXX should be common */
! 91:
! 92: bus_space_tag_t oba_iot; /* obio i/o space tag */
! 93: bus_space_tag_t oba_memt; /* obio mem space tag */
! 94: };
! 95:
! 96: /*
! 97: * obio bus resources.
! 98: */
! 99:
! 100: struct obio_io {
! 101: int or_addr;
! 102: int or_size;
! 103: };
! 104:
! 105: struct obio_iomem {
! 106: int or_addr;
! 107: int or_size;
! 108: };
! 109:
! 110: struct obio_irq {
! 111: int or_irq;
! 112: };
! 113:
! 114: /*
! 115: * driver attach arguments
! 116: */
! 117: struct obio_attach_args {
! 118: bus_space_tag_t oa_iot; /* i/o space tag */
! 119: bus_space_tag_t oa_memt; /* memory space tag */
! 120:
! 121: struct obio_io *oa_io; /* I/O resources */
! 122: int oa_nio;
! 123:
! 124: struct obio_iomem *oa_iomem; /* memory resources */
! 125: int oa_niomem;
! 126:
! 127: struct obio_irq *oa_irq; /* IRQ resources */
! 128: int oa_nirq;
! 129:
! 130: void *oa_aux; /* driver specific */
! 131: };
! 132:
! 133: #define IOBASEUNK -1 /* i/o address is unknown */
! 134: #define IRQUNK -1 /* interrupt request line is unknown */
! 135: #define MADDRUNK -1 /* shared memory address is unknown */
! 136:
! 137:
! 138: /*
! 139: * master bus
! 140: */
! 141: struct obio_softc {
! 142: struct device sc_dev; /* base device */
! 143:
! 144: bus_space_tag_t sc_iot; /* io space tag */
! 145: bus_space_tag_t sc_memt; /* mem space tag */
! 146: };
! 147:
! 148: #define cf_iobase cf_loc[0]
! 149: #define cf_iosize cf_loc[1]
! 150: #define cf_maddr cf_loc[2]
! 151: #define cf_msize cf_loc[3]
! 152: #define cf_irq cf_loc[4]
! 153:
! 154: void *obio_intr_establish(int, int, int (*)(void *), void *, const char *);
! 155: void obio_intr_disestablish(void *);
! 156:
! 157: #endif /* _LANDISK_OBIOVAR_H_ */
CVSweb