xref: /netbsd-src/sys/arch/algor/pci/vtpbcvar.h (revision ce099b40997c43048fb78bd578195f81d2456523)
1*ce099b40Smartin /*	$NetBSD: vtpbcvar.h,v 1.4 2008/04/28 20:23:10 martin Exp $	*/
216b9c606Sthorpej 
316b9c606Sthorpej /*-
416b9c606Sthorpej  * Copyright (c) 2001 The NetBSD Foundation, Inc.
516b9c606Sthorpej  * All rights reserved.
616b9c606Sthorpej  *
716b9c606Sthorpej  * This code is derived from software contributed to The NetBSD Foundation
816b9c606Sthorpej  * by Jason R. Thorpe.
916b9c606Sthorpej  *
1016b9c606Sthorpej  * Redistribution and use in source and binary forms, with or without
1116b9c606Sthorpej  * modification, are permitted provided that the following conditions
1216b9c606Sthorpej  * are met:
1316b9c606Sthorpej  * 1. Redistributions of source code must retain the above copyright
1416b9c606Sthorpej  *    notice, this list of conditions and the following disclaimer.
1516b9c606Sthorpej  * 2. Redistributions in binary form must reproduce the above copyright
1616b9c606Sthorpej  *    notice, this list of conditions and the following disclaimer in the
1716b9c606Sthorpej  *    documentation and/or other materials provided with the distribution.
1816b9c606Sthorpej  *
1916b9c606Sthorpej  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
2016b9c606Sthorpej  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2116b9c606Sthorpej  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2216b9c606Sthorpej  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2316b9c606Sthorpej  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2416b9c606Sthorpej  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2516b9c606Sthorpej  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2616b9c606Sthorpej  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2716b9c606Sthorpej  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2816b9c606Sthorpej  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2916b9c606Sthorpej  * POSSIBILITY OF SUCH DAMAGE.
3016b9c606Sthorpej  */
3116b9c606Sthorpej 
3216b9c606Sthorpej #include <dev/pci/pcivar.h>
3316b9c606Sthorpej 
3416b9c606Sthorpej struct vtpbc_config {
3516b9c606Sthorpej 	vaddr_t		vt_addr;	/* address of the V3 PBC */
3616b9c606Sthorpej 	vaddr_t		vt_cfgbase;	/* PCI configuration space base */
3716b9c606Sthorpej 	int		vt_adbase;	/* AD line base for config access */
3816b9c606Sthorpej 	int		vt_rev;		/* silicon revision */
3980dfaa3eSthorpej 
4080dfaa3eSthorpej 	/*
4180dfaa3eSthorpej 	 * These are here in order to support the old-style PCI address
4280dfaa3eSthorpej 	 * map used by boards with older firmware (mostly on P-4032
4380dfaa3eSthorpej 	 * boards).
4480dfaa3eSthorpej 	 */
45fe87c9aaSthorpej 	bus_addr_t	vt_pci_iobase;	/* PCI I/O space base */
4680dfaa3eSthorpej 	bus_addr_t	vt_pci_membase;	/* PCI memory space base */
4780dfaa3eSthorpej 	bus_addr_t	vt_dma_winbase;	/* DMA window base */
4816b9c606Sthorpej };
4916b9c606Sthorpej 
5016b9c606Sthorpej #ifdef _KERNEL
5116b9c606Sthorpej extern struct vtpbc_config vtpbc_configuration;
5216b9c606Sthorpej extern const char *vtpbc_revs[];
5316b9c606Sthorpej extern const int vtpbc_nrevs;
5416b9c606Sthorpej 
5516b9c606Sthorpej void	vtpbc_init(pci_chipset_tag_t, struct vtpbc_config *);
5616b9c606Sthorpej #endif /* _KERNEL */
57