xref: /openbsd-src/sys/arch/alpha/pci/ciavar.h (revision 9339f7ab175251dc4cd20adc5903cfd7533e576f)
1*9339f7abSmiod /* $OpenBSD: ciavar.h,v 1.13 2006/03/16 22:32:44 miod Exp $ */
2aed035abSart /* $NetBSD: ciavar.h,v 1.17 2000/03/19 01:43:25 thorpej Exp $ */
334fbf6deSderaadt 
434fbf6deSderaadt /*
5417eba8cSderaadt  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
634fbf6deSderaadt  * All rights reserved.
734fbf6deSderaadt  *
834fbf6deSderaadt  * Author: Chris G. Demetriou
934fbf6deSderaadt  *
1034fbf6deSderaadt  * Permission to use, copy, modify and distribute this software and
1134fbf6deSderaadt  * its documentation is hereby granted, provided that both the copyright
1234fbf6deSderaadt  * notice and this permission notice appear in all copies of the
1334fbf6deSderaadt  * software, derivative works or modified versions, and any portions
1434fbf6deSderaadt  * thereof, and that both notices appear in supporting documentation.
1534fbf6deSderaadt  *
1634fbf6deSderaadt  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
1734fbf6deSderaadt  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
1834fbf6deSderaadt  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
1934fbf6deSderaadt  *
2034fbf6deSderaadt  * Carnegie Mellon requests users of this software to return to
2134fbf6deSderaadt  *
2234fbf6deSderaadt  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
2334fbf6deSderaadt  *  School of Computer Science
2434fbf6deSderaadt  *  Carnegie Mellon University
2534fbf6deSderaadt  *  Pittsburgh PA 15213-3890
2634fbf6deSderaadt  *
2734fbf6deSderaadt  * any improvements or extensions that they make and grant Carnegie the
2834fbf6deSderaadt  * rights to redistribute these changes.
2934fbf6deSderaadt  */
3034fbf6deSderaadt 
3134fbf6deSderaadt #include <dev/isa/isavar.h>
3234fbf6deSderaadt #include <dev/pci/pcivar.h>
33aed035abSart #include <alpha/pci/pci_sgmap_pte64.h>
3434fbf6deSderaadt 
3534fbf6deSderaadt /*
3634fbf6deSderaadt  * A 21171 chipset's configuration.
3734fbf6deSderaadt  *
3834fbf6deSderaadt  * All of the information that the chipset-specific functions need to
3934fbf6deSderaadt  * do their dirty work (and more!).
4034fbf6deSderaadt  */
4134fbf6deSderaadt struct cia_config {
423a630e3fSniklas 	int	cc_initted;
433a630e3fSniklas 
4470048494Snate 	struct alpha_bus_space cc_iot, cc_memt;
45417eba8cSderaadt 	struct alpha_pci_chipset cc_pc;
4634fbf6deSderaadt 
47aed035abSart 	struct alpha_bus_dma_tag cc_dmat_direct;
48aed035abSart 	struct alpha_bus_dma_tag cc_dmat_sgmap;
49aed035abSart 
50aed035abSart 	struct alpha_sgmap cc_sgmap;
51aed035abSart 
52417eba8cSderaadt 	u_int32_t cc_hae_mem;
53417eba8cSderaadt 	u_int32_t cc_hae_io;
543a630e3fSniklas 
550cb4f638Sangelos 	u_int32_t cc_rev;
560cb4f638Sangelos 	u_int32_t cc_cnfg;
570cb4f638Sangelos 
580cb4f638Sangelos 	int	cc_flags;
590cb4f638Sangelos 
600cb4f638Sangelos #define	CCF_ISPYXIS	0x01		/* chip is a 21174 Pyxis */
61aed035abSart #define	CCF_PYXISBUG	0x02
62aed035abSart #define	CCF_PCI_USE_BWX	0x04		/* use BWX for PCI config space */
63aed035abSart #define	CCF_BUS_USE_BWX	0x08		/* use BWX for bus space */
640cb4f638Sangelos 
653a630e3fSniklas 	struct extent *cc_io_ex, *cc_d_mem_ex, *cc_s_mem_ex;
663a630e3fSniklas 	int	cc_mallocsafe;
6734fbf6deSderaadt };
6834fbf6deSderaadt 
69c4071fd1Smillert void	cia_init(struct cia_config *, int);
70c4071fd1Smillert void	cia_pci_init(pci_chipset_tag_t, void *);
71c4071fd1Smillert void	cia_dma_init(struct cia_config *);
72aed035abSart 
73c4071fd1Smillert void	cia_bwx_bus_io_init(bus_space_tag_t, void *);
74c4071fd1Smillert void	cia_bwx_bus_mem_init(bus_space_tag_t, void *);
75417eba8cSderaadt 
76c4071fd1Smillert void	cia_bus_io_init(bus_space_tag_t, void *);
77c4071fd1Smillert void	cia_bus_mem_init(bus_space_tag_t, void *);
78aed035abSart 
79c4071fd1Smillert void	cia_pyxis_intr_enable(int, int);
80