1*dd2488a8Smatt /* $NetBSD: pci_machdep.h,v 1.8 2011/06/22 18:06:33 matt Exp $ */ 23dc55c12Smatt 3d974db0aSgarbled /*- 4d974db0aSgarbled * Copyright (c) 2007 The NetBSD Foundation, Inc. 53dc55c12Smatt * All rights reserved. 63dc55c12Smatt * 7d974db0aSgarbled * This code is derived from software contributed to The NetBSD Foundation 8d974db0aSgarbled * by Tim Rightnour 93dc55c12Smatt * 10d974db0aSgarbled * Redistribution and use in source and binary forms, with or without 11d974db0aSgarbled * modification, are permitted provided that the following conditions 12d974db0aSgarbled * are met: 13d974db0aSgarbled * 1. Redistributions of source code must retain the above copyright 14d974db0aSgarbled * notice, this list of conditions and the following disclaimer. 15d974db0aSgarbled * 2. Redistributions in binary form must reproduce the above copyright 16d974db0aSgarbled * notice, this list of conditions and the following disclaimer in the 17d974db0aSgarbled * documentation and/or other materials provided with the distribution. 183dc55c12Smatt * 19d974db0aSgarbled * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20d974db0aSgarbled * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21d974db0aSgarbled * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22d974db0aSgarbled * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23d974db0aSgarbled * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24d974db0aSgarbled * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25d974db0aSgarbled * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26d974db0aSgarbled * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27d974db0aSgarbled * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28d974db0aSgarbled * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29d974db0aSgarbled * POSSIBILITY OF SUCH DAMAGE. 303dc55c12Smatt */ 313dc55c12Smatt 32d974db0aSgarbled #include <powerpc/pci_machdep.h> 333dc55c12Smatt 343dc55c12Smatt #ifdef _KERNEL 353dc55c12Smatt /* 363dc55c12Smatt * ibmnws-specific PCI functions. 373dc55c12Smatt * NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE. 383dc55c12Smatt */ 394f2934afSmatt int ibmnws_pci_bus_maxdevs(void *, int); 403dc55c12Smatt int ibmnws_pci_intr_map(struct pci_attach_args *, pci_intr_handle_t *); 41*dd2488a8Smatt int ibmnws_pci_conf_hook(void *, int, int, int, pcireg_t); 423dc55c12Smatt 433dc55c12Smatt void ibmnws_pci_get_chipset_tag_indirect(pci_chipset_tag_t); 443dc55c12Smatt 453dc55c12Smatt /* 463dc55c12Smatt * ibmnws-specific PCI data. 473dc55c12Smatt * NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE. 483dc55c12Smatt */ 493dc55c12Smatt extern struct powerpc_bus_dma_tag pci_bus_dma_tag; 507e2a8aeaSmjf 517e2a8aeaSmjf #define PCI_MODE1_ENABLE 0x80000000UL 527e2a8aeaSmjf #define PCI_MODE1_ADDRESS_REG (PREP_BUS_SPACE_IO + 0xcf8) 537e2a8aeaSmjf #define PCI_MODE1_DATA_REG (PREP_BUS_SPACE_IO + 0xcfc) 547e2a8aeaSmjf 553dc55c12Smatt #endif 56