1 /* $OpenBSD: ciavar.h,v 1.13 2006/03/16 22:32:44 miod Exp $ */ 2 /* $NetBSD: ciavar.h,v 1.17 2000/03/19 01:43:25 thorpej Exp $ */ 3 4 /* 5 * Copyright (c) 1995, 1996 Carnegie-Mellon University. 6 * All rights reserved. 7 * 8 * Author: Chris G. Demetriou 9 * 10 * Permission to use, copy, modify and distribute this software and 11 * its documentation is hereby granted, provided that both the copyright 12 * notice and this permission notice appear in all copies of the 13 * software, derivative works or modified versions, and any portions 14 * thereof, and that both notices appear in supporting documentation. 15 * 16 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 17 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 18 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 19 * 20 * Carnegie Mellon requests users of this software to return to 21 * 22 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 23 * School of Computer Science 24 * Carnegie Mellon University 25 * Pittsburgh PA 15213-3890 26 * 27 * any improvements or extensions that they make and grant Carnegie the 28 * rights to redistribute these changes. 29 */ 30 31 #include <dev/isa/isavar.h> 32 #include <dev/pci/pcivar.h> 33 #include <alpha/pci/pci_sgmap_pte64.h> 34 35 /* 36 * A 21171 chipset's configuration. 37 * 38 * All of the information that the chipset-specific functions need to 39 * do their dirty work (and more!). 40 */ 41 struct cia_config { 42 int cc_initted; 43 44 struct alpha_bus_space cc_iot, cc_memt; 45 struct alpha_pci_chipset cc_pc; 46 47 struct alpha_bus_dma_tag cc_dmat_direct; 48 struct alpha_bus_dma_tag cc_dmat_sgmap; 49 50 struct alpha_sgmap cc_sgmap; 51 52 u_int32_t cc_hae_mem; 53 u_int32_t cc_hae_io; 54 55 u_int32_t cc_rev; 56 u_int32_t cc_cnfg; 57 58 int cc_flags; 59 60 #define CCF_ISPYXIS 0x01 /* chip is a 21174 Pyxis */ 61 #define CCF_PYXISBUG 0x02 62 #define CCF_PCI_USE_BWX 0x04 /* use BWX for PCI config space */ 63 #define CCF_BUS_USE_BWX 0x08 /* use BWX for bus space */ 64 65 struct extent *cc_io_ex, *cc_d_mem_ex, *cc_s_mem_ex; 66 int cc_mallocsafe; 67 }; 68 69 void cia_init(struct cia_config *, int); 70 void cia_pci_init(pci_chipset_tag_t, void *); 71 void cia_dma_init(struct cia_config *); 72 73 void cia_bwx_bus_io_init(bus_space_tag_t, void *); 74 void cia_bwx_bus_mem_init(bus_space_tag_t, void *); 75 76 void cia_bus_io_init(bus_space_tag_t, void *); 77 void cia_bus_mem_init(bus_space_tag_t, void *); 78 79 void cia_pyxis_intr_enable(int, int); 80