#ifndef _SYS_HOTPLUG_PCI_PCIEHPC_H
#define _SYS_HOTPLUG_PCI_PCIEHPC_H
#ifdef _KERNEL
#include <sys/ddi_hp.h>
#include <sys/pcie_impl.h>
#include <sys/stdbool.h>
#include <sys/hotplug/pci/pcie_hp.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _KERNEL
int pciehpc_init(dev_info_t *dip, caddr_t arg);
int pciehpc_uninit(dev_info_t *dip);
int pciehpc_intr(dev_info_t *dip);
int pciehpc_hp_ops(dev_info_t *dip, char *cn_name, ddi_hp_op_t op, void *arg,
void *result);
void pciehpc_get_slot_state(pcie_hp_slot_t *slot_p);
void pciehpc_set_slot_name(pcie_hp_ctrl_t *ctrl_p);
uint8_t pciehpc_reg_get8(pcie_hp_ctrl_t *ctrl_p, uint_t off);
uint16_t pciehpc_reg_get16(pcie_hp_ctrl_t *ctrl_p, uint_t off);
uint32_t pciehpc_reg_get32(pcie_hp_ctrl_t *ctrl_p, uint_t off);
void pciehpc_reg_put8(pcie_hp_ctrl_t *ctrl_p, uint_t off, uint8_t val);
void pciehpc_reg_put16(pcie_hp_ctrl_t *ctrl_p, uint_t off, uint16_t val);
void pciehpc_reg_put32(pcie_hp_ctrl_t *ctrl_p, uint_t off, uint32_t val);
void pciehpc_led_init(pcie_hp_slot_t *slot_p);
extern bool pciehpc_slot_kstat_init(pcie_hp_slot_t *);
extern void pciehpc_slot_kstat_fini(pcie_hp_slot_t *);
#if defined(__i386) || defined(__amd64)
extern void pciehpc_update_ops(pcie_hp_ctrl_t *ctrl_p);
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif