170025d76Sjohnny /* 270025d76Sjohnny * CDDL HEADER START 370025d76Sjohnny * 470025d76Sjohnny * The contents of this file are subject to the terms of the 5*26947304SEvan Yan * Common Development and Distribution License (the "License"). 6*26947304SEvan Yan * You may not use this file except in compliance with the License. 770025d76Sjohnny * 870025d76Sjohnny * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 970025d76Sjohnny * or http://www.opensolaris.org/os/licensing. 1070025d76Sjohnny * See the License for the specific language governing permissions 1170025d76Sjohnny * and limitations under the License. 1270025d76Sjohnny * 1370025d76Sjohnny * When distributing Covered Code, include this CDDL HEADER in each 1470025d76Sjohnny * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1570025d76Sjohnny * If applicable, add the following below this CDDL HEADER, with the 1670025d76Sjohnny * fields enclosed by brackets "[]" replaced with your own identifying 1770025d76Sjohnny * information: Portions Copyright [yyyy] [name of copyright owner] 1870025d76Sjohnny * 1970025d76Sjohnny * CDDL HEADER END 2070025d76Sjohnny */ 2170025d76Sjohnny /* 22*26947304SEvan Yan * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 2370025d76Sjohnny * Use is subject to license terms. 2470025d76Sjohnny */ 2570025d76Sjohnny 2670025d76Sjohnny #ifndef _SYS_HOTPLUG_PCI_PCIEHPC_H 2770025d76Sjohnny #define _SYS_HOTPLUG_PCI_PCIEHPC_H 2870025d76Sjohnny 2970025d76Sjohnny #ifdef __cplusplus 3070025d76Sjohnny extern "C" { 3170025d76Sjohnny #endif 3270025d76Sjohnny 3370025d76Sjohnny /* 3470025d76Sjohnny * Interfaces exported by PCI-E nexus Hot Plug Controller extension module 3570025d76Sjohnny */ 36*26947304SEvan Yan int pciehpc_init(dev_info_t *dip, caddr_t arg); 37*26947304SEvan Yan int pciehpc_uninit(dev_info_t *dip); 38*26947304SEvan Yan int pciehpc_intr(dev_info_t *dip); 39*26947304SEvan Yan int pciehpc_hp_ops(dev_info_t *dip, char *cn_name, ddi_hp_op_t op, void *arg, 40*26947304SEvan Yan void *result); 41*26947304SEvan Yan void pciehpc_get_slot_state(pcie_hp_slot_t *slot_p); 42*26947304SEvan Yan void pciehpc_set_slot_name(pcie_hp_ctrl_t *ctrl_p); 43*26947304SEvan Yan uint8_t pciehpc_reg_get8(pcie_hp_ctrl_t *ctrl_p, uint_t off); 44*26947304SEvan Yan uint16_t pciehpc_reg_get16(pcie_hp_ctrl_t *ctrl_p, uint_t off); 45*26947304SEvan Yan uint32_t pciehpc_reg_get32(pcie_hp_ctrl_t *ctrl_p, uint_t off); 46*26947304SEvan Yan void pciehpc_reg_put8(pcie_hp_ctrl_t *ctrl_p, uint_t off, uint8_t val); 47*26947304SEvan Yan void pciehpc_reg_put16(pcie_hp_ctrl_t *ctrl_p, uint_t off, uint16_t val); 48*26947304SEvan Yan void pciehpc_reg_put32(pcie_hp_ctrl_t *ctrl_p, uint_t off, uint32_t val); 49*26947304SEvan Yan #if defined(__i386) || defined(__amd64) 50*26947304SEvan Yan extern void pciehpc_update_ops(pcie_hp_ctrl_t *ctrl_p); 51*26947304SEvan Yan #endif /* defined(__i386) || defined(__amd64) */ 5270025d76Sjohnny 5370025d76Sjohnny #ifdef __cplusplus 5470025d76Sjohnny } 5570025d76Sjohnny #endif 5670025d76Sjohnny 5770025d76Sjohnny #endif /* _SYS_HOTPLUG_PCI_PCIEHPC_H */ 58