11.4Sscole/* $NetBSD: pci_machdep.h,v 1.4 2018/03/01 23:01:19 scole Exp $ */ 21.2Skiyohara/* 31.2Skiyohara * Copyright (c) 2010 KIYOHARA Takashi 41.2Skiyohara * All rights reserved. 51.2Skiyohara * 61.2Skiyohara * Redistribution and use in source and binary forms, with or without 71.2Skiyohara * modification, are permitted provided that the following conditions 81.2Skiyohara * are met: 91.2Skiyohara * 1. Redistributions of source code must retain the above copyright 101.2Skiyohara * notice, this list of conditions and the following disclaimer. 111.2Skiyohara * 2. Redistributions in binary form must reproduce the above copyright 121.2Skiyohara * notice, this list of conditions and the following disclaimer in the 131.2Skiyohara * documentation and/or other materials provided with the distribution. 141.2Skiyohara * 151.2Skiyohara * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 161.2Skiyohara * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 171.2Skiyohara * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 181.2Skiyohara * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 191.2Skiyohara * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 201.2Skiyohara * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 211.2Skiyohara * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 221.2Skiyohara * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 231.2Skiyohara * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 241.2Skiyohara * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 251.2Skiyohara * POSSIBILITY OF SUCH DAMAGE. 261.2Skiyohara */ 271.2Skiyohara 281.2Skiyohara#ifndef _PCI_MACHDEP_H 291.2Skiyohara#define _PCI_MACHDEP_H 301.2Skiyohara 311.2Skiyoharastruct pci_attach_args; 321.2Skiyoharastruct pci_chipset_tag; 331.2Skiyohara 341.2Skiyoharatypedef struct pci_chipset_tag *pci_chipset_tag_t; 351.1Skiyoharatypedef int pci_intr_handle_t; 361.1Skiyoharatypedef int pcitag_t; 371.1Skiyohara 381.2Skiyoharavoid pci_attach_hook(device_t, device_t, struct pcibus_attach_args *); 391.2Skiyoharaint pci_bus_maxdevs(pci_chipset_tag_t, int); 401.2Skiyoharapcitag_t pci_make_tag(pci_chipset_tag_t, int, int, int); 411.2Skiyoharavoid pci_decompose_tag(pci_chipset_tag_t, pcitag_t, int *, int *, int *); 421.2Skiyoharapcireg_t pci_conf_read(pci_chipset_tag_t, pcitag_t, int); 431.2Skiyoharavoid pci_conf_write(pci_chipset_tag_t, pcitag_t, int, pcireg_t); 441.1Skiyohara 451.2Skiyohara#endif 46