linux/drivers/pci/hotplug/cpci_hotplug.h

/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * CompactPCI Hot Plug Core Functions
 *
 * Copyright (C) 2002 SOMA Networks, Inc.
 * Copyright (C) 2001 Greg Kroah-Hartman ([email protected])
 * Copyright (C) 2001 IBM Corp.
 *
 * All rights reserved.
 *
 * Send feedback to <[email protected]>
 */

#ifndef _CPCI_HOTPLUG_H
#define _CPCI_HOTPLUG_H

#include <linux/types.h>
#include <linux/pci.h>
#include <linux/pci_hotplug.h>

/* PICMG 2.1 R2.0 HS CSR bits: */
#define HS_CSR_INS
#define HS_CSR_EXT
#define HS_CSR_PI
#define HS_CSR_LOO
#define HS_CSR_PIE
#define HS_CSR_EIM
#define HS_CSR_DHA

struct slot {};

struct cpci_hp_controller_ops {};

struct cpci_hp_controller {};

static inline const char *slot_name(struct slot *slot)
{}

static inline struct slot *to_slot(struct hotplug_slot *hotplug_slot)
{}

int cpci_hp_register_controller(struct cpci_hp_controller *controller);
int cpci_hp_unregister_controller(struct cpci_hp_controller *controller);
int cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last);
int cpci_hp_unregister_bus(struct pci_bus *bus);
int cpci_hp_start(void);
int cpci_hp_stop(void);

/* Global variables */
extern int cpci_debug;

/*
 * Internal function prototypes, these functions should not be used by
 * board/chassis drivers.
 */
u8 cpci_get_attention_status(struct slot *slot);
u16 cpci_get_hs_csr(struct slot *slot);
int cpci_set_attention_status(struct slot *slot, int status);
int cpci_check_and_clear_ins(struct slot *slot);
int cpci_check_ext(struct slot *slot);
int cpci_clear_ext(struct slot *slot);
int cpci_led_on(struct slot *slot);
int cpci_led_off(struct slot *slot);
int cpci_configure_slot(struct slot *slot);
int cpci_unconfigure_slot(struct slot *slot);

#ifdef CONFIG_HOTPLUG_PCI_CPCI
int cpci_hotplug_init(int debug);
#else
static inline int cpci_hotplug_init(int debug) { return 0; }
#endif

#endif	/* _CPCI_HOTPLUG_H */