21 static const char *names[] = {
"RP01",
38 u16 link_width_p0, link_width_p4;
39 u8 slot_power_limit = 10;
60 switch ((reg32 >> 2) & 3) {
77 if (link_width_p0 == 4)
78 slot_power_limit = 40;
79 else if (link_width_p0 == 2)
80 slot_power_limit = 20;
84 if (link_width_p4 == 4)
85 slot_power_limit = 40;
86 else if (link_width_p4 == 2)
87 slot_power_limit = 20;
91 if (link_width_p0 == 1)
96 if (link_width_p0 <= 2)
100 if (link_width_p4 == 1)
105 if (link_width_p4 <= 2)
117 reg32 |= (1 << 16) | (1 << 15);
123 reg32 &= ~((1 << 17) | (1 << 16) | (1 << 15));
135 reg32 &= ~((1 << 15) | (1 << 16));
136 reg32 &= ~(0xff << 7);
137 reg32 |= (slot_power_limit << 7);
245 0x1c18, 0x1c1a, 0x1c1c, 0x1c1e,
246 0x1e10, 0x1e12, 0x1e14, 0x1e16,
247 0x1e18, 0x1e1a, 0x1e1c, 0x1e1e,
250 static const struct pci_driver pch_pcie
__pci_driver = {
#define printk(level,...)
static __always_inline void pci_or_config32(const struct device *dev, u16 reg, u32 ormask)
static __always_inline void pci_write_config32(const struct device *dev, u16 reg, u32 val)
static __always_inline void pci_and_config16(const struct device *dev, u16 reg, u16 andmask)
static __always_inline void pci_update_config32(const struct device *dev, u16 reg, u32 mask, u32 or)
static __always_inline void pci_or_config16(const struct device *dev, u16 reg, u16 ormask)
static __always_inline u16 pci_read_config16(const struct device *dev, u16 reg)
static __always_inline u32 pci_read_config32(const struct device *dev, u16 reg)
static __always_inline u8 pci_read_config8(const struct device *dev, u16 reg)
static __always_inline void pci_write_config16(const struct device *dev, u16 reg, u16 val)
static __always_inline void pci_write_config8(const struct device *dev, u16 reg, u8 val)
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define PCI_BRIDGE_CTL_PARITY
#define PCI_BRIDGE_CONTROL
#define PCI_COMMAND_MASTER
void pci_bus_enable_resources(struct device *dev)
void pci_bus_read_resources(struct device *dev)
struct pci_operations pci_dev_ops_pci
Default device operation for PCI devices.
void pci_dev_set_resources(struct device *dev)
void pciexp_hotplug_scan_bridge(struct device *dev)
void pciexp_scan_bridge(struct device *dev)
static struct device_operations device_ops
static const char * pch_pcie_acpi_name(const struct device *dev)
static void pch_pcie_pm_early(struct device *dev)
static void pch_pcie_pm_late(struct device *dev)
static void pci_init(struct device *dev)
static void pch_pcie_enable(struct device *dev)
static const unsigned short pci_device_ids[]
static void pch_pciexp_scan_bridge(struct device *dev)
static const struct pci_driver pch_pcie __pci_driver
void(* read_resources)(struct device *dev)
DEVTREE_CONST void * chip_info