#define dev_fmt(fmt) …
#include <linux/bitfield.h>
#include <linux/dmi.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/jiffies.h>
#include <linux/kthread.h>
#include <linux/pci.h>
#include <linux/pm_runtime.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include "../pci.h"
#include "pciehp.h"
static const struct dmi_system_id inband_presence_disabled_dmi_table[] = …;
static inline struct pci_dev *ctrl_dev(struct controller *ctrl)
{ … }
static irqreturn_t pciehp_isr(int irq, void *dev_id);
static irqreturn_t pciehp_ist(int irq, void *dev_id);
static int pciehp_poll(void *data);
static inline int pciehp_request_irq(struct controller *ctrl)
{ … }
static inline void pciehp_free_irq(struct controller *ctrl)
{ … }
static int pcie_poll_cmd(struct controller *ctrl, int timeout)
{ … }
static void pcie_wait_cmd(struct controller *ctrl)
{ … }
#define CC_ERRATUM_MASK …
static void pcie_do_write_cmd(struct controller *ctrl, u16 cmd,
u16 mask, bool wait)
{ … }
static void pcie_write_cmd(struct controller *ctrl, u16 cmd, u16 mask)
{ … }
static void pcie_write_cmd_nowait(struct controller *ctrl, u16 cmd, u16 mask)
{ … }
int pciehp_check_link_active(struct controller *ctrl)
{ … }
static bool pci_bus_check_dev(struct pci_bus *bus, int devfn)
{ … }
static void pcie_wait_for_presence(struct pci_dev *pdev)
{ … }
int pciehp_check_link_status(struct controller *ctrl)
{ … }
static int __pciehp_link_set(struct controller *ctrl, bool enable)
{ … }
static int pciehp_link_enable(struct controller *ctrl)
{ … }
int pciehp_get_raw_indicator_status(struct hotplug_slot *hotplug_slot,
u8 *status)
{ … }
int pciehp_get_attention_status(struct hotplug_slot *hotplug_slot, u8 *status)
{ … }
void pciehp_get_power_status(struct controller *ctrl, u8 *status)
{ … }
void pciehp_get_latch_status(struct controller *ctrl, u8 *status)
{ … }
int pciehp_card_present(struct controller *ctrl)
{ … }
int pciehp_card_present_or_link_active(struct controller *ctrl)
{ … }
int pciehp_query_power_fault(struct controller *ctrl)
{ … }
int pciehp_set_raw_indicator_status(struct hotplug_slot *hotplug_slot,
u8 status)
{ … }
void pciehp_set_indicators(struct controller *ctrl, int pwr, int attn)
{ … }
int pciehp_power_on_slot(struct controller *ctrl)
{ … }
void pciehp_power_off_slot(struct controller *ctrl)
{ … }
static void pciehp_ignore_dpc_link_change(struct controller *ctrl,
struct pci_dev *pdev, int irq)
{ … }
static irqreturn_t pciehp_isr(int irq, void *dev_id)
{ … }
static irqreturn_t pciehp_ist(int irq, void *dev_id)
{ … }
static int pciehp_poll(void *data)
{ … }
static void pcie_enable_notification(struct controller *ctrl)
{ … }
static void pcie_disable_notification(struct controller *ctrl)
{ … }
void pcie_clear_hotplug_events(struct controller *ctrl)
{ … }
void pcie_enable_interrupt(struct controller *ctrl)
{ … }
void pcie_disable_interrupt(struct controller *ctrl)
{ … }
int pciehp_slot_reset(struct pcie_device *dev)
{ … }
int pciehp_reset_slot(struct hotplug_slot *hotplug_slot, bool probe)
{ … }
int pcie_init_notification(struct controller *ctrl)
{ … }
void pcie_shutdown_notification(struct controller *ctrl)
{ … }
static inline void dbg_ctrl(struct controller *ctrl)
{ … }
#define FLAG(x, y) …
static inline int pcie_hotplug_depth(struct pci_dev *dev)
{ … }
struct controller *pcie_init(struct pcie_device *dev)
{ … }
void pciehp_release_ctrl(struct controller *ctrl)
{ … }
static void quirk_cmd_compl(struct pci_dev *pdev)
{ … }
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID,
PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl);
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, 0x010e,
PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl);
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, 0x0110,
PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl);
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, 0x0400,
PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl);
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, 0x0401,
PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl);
DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_HXT, 0x0401,
PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl);