1881Sjohnny /* 2881Sjohnny * CDDL HEADER START 3881Sjohnny * 4881Sjohnny * The contents of this file are subject to the terms of the 5*10923SEvan.Yan@Sun.COM * Common Development and Distribution License (the "License"). 6*10923SEvan.Yan@Sun.COM * You may not use this file except in compliance with the License. 7881Sjohnny * 8881Sjohnny * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9881Sjohnny * or http://www.opensolaris.org/os/licensing. 10881Sjohnny * See the License for the specific language governing permissions 11881Sjohnny * and limitations under the License. 12881Sjohnny * 13881Sjohnny * When distributing Covered Code, include this CDDL HEADER in each 14881Sjohnny * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15881Sjohnny * If applicable, add the following below this CDDL HEADER, with the 16881Sjohnny * fields enclosed by brackets "[]" replaced with your own identifying 17881Sjohnny * information: Portions Copyright [yyyy] [name of copyright owner] 18881Sjohnny * 19881Sjohnny * CDDL HEADER END 20881Sjohnny */ 21881Sjohnny /* 22*10923SEvan.Yan@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23881Sjohnny * Use is subject to license terms. 24881Sjohnny */ 25881Sjohnny 26881Sjohnny #ifndef _SYS_HOTPLUG_PCI_PCIEHPC_H 27881Sjohnny #define _SYS_HOTPLUG_PCI_PCIEHPC_H 28881Sjohnny 29881Sjohnny #ifdef __cplusplus 30881Sjohnny extern "C" { 31881Sjohnny #endif 32881Sjohnny 33881Sjohnny /* 34881Sjohnny * Interfaces exported by PCI-E nexus Hot Plug Controller extension module 35881Sjohnny */ 36*10923SEvan.Yan@Sun.COM int pciehpc_init(dev_info_t *dip, caddr_t arg); 37*10923SEvan.Yan@Sun.COM int pciehpc_uninit(dev_info_t *dip); 38*10923SEvan.Yan@Sun.COM int pciehpc_intr(dev_info_t *dip); 39*10923SEvan.Yan@Sun.COM int pciehpc_hp_ops(dev_info_t *dip, char *cn_name, ddi_hp_op_t op, void *arg, 40*10923SEvan.Yan@Sun.COM void *result); 41*10923SEvan.Yan@Sun.COM void pciehpc_get_slot_state(pcie_hp_slot_t *slot_p); 42*10923SEvan.Yan@Sun.COM void pciehpc_set_slot_name(pcie_hp_ctrl_t *ctrl_p); 43*10923SEvan.Yan@Sun.COM uint8_t pciehpc_reg_get8(pcie_hp_ctrl_t *ctrl_p, uint_t off); 44*10923SEvan.Yan@Sun.COM uint16_t pciehpc_reg_get16(pcie_hp_ctrl_t *ctrl_p, uint_t off); 45*10923SEvan.Yan@Sun.COM uint32_t pciehpc_reg_get32(pcie_hp_ctrl_t *ctrl_p, uint_t off); 46*10923SEvan.Yan@Sun.COM void pciehpc_reg_put8(pcie_hp_ctrl_t *ctrl_p, uint_t off, uint8_t val); 47*10923SEvan.Yan@Sun.COM void pciehpc_reg_put16(pcie_hp_ctrl_t *ctrl_p, uint_t off, uint16_t val); 48*10923SEvan.Yan@Sun.COM void pciehpc_reg_put32(pcie_hp_ctrl_t *ctrl_p, uint_t off, uint32_t val); 49*10923SEvan.Yan@Sun.COM #if defined(__i386) || defined(__amd64) 50*10923SEvan.Yan@Sun.COM extern void pciehpc_update_ops(pcie_hp_ctrl_t *ctrl_p); 51*10923SEvan.Yan@Sun.COM #endif /* defined(__i386) || defined(__amd64) */ 52881Sjohnny 53881Sjohnny #ifdef __cplusplus 54881Sjohnny } 55881Sjohnny #endif 56881Sjohnny 57881Sjohnny #endif /* _SYS_HOTPLUG_PCI_PCIEHPC_H */ 58