14 #include <soc/pci_devs.h>
22 #define MAX_NUM_ROOT_PORTS 6
102 RCBA32(0x103C) = (
RCBA32(0x103C) & (~0xff)) | update_val;
163 data |= ((0x30 << 16) | (0x40 << 8));
175 unsigned int new_devfn;
188 "PCH: PCIe map %02x.%1x -> %02x.%1x\n",
200 int enabled_ports = 0;
215 if (rp == 1 || rp == 5 || rp == 6)
230 }
else if (rp == 5 || rp == 6) {
261 if (rp == 1 || rp == 5 || rp == 6)
306 if (((reg32 & 0xff000000) == 0x01000000) || (n > 50))
433 reg32 += (0x2 << 16) | (0x2 << 8);
471 if ((
config->pcie_port_force_aspm & (1 << (rp - 1))))
475 rp, do_aspm ?
"en" :
"dis");
550 if (
CONFIG(PCIEXP_L1_SUB_STATE))
560 if (rp == 1 || rp == 5 || rp == 6)
619 static struct pci_operations
pcie_ops = {
636 0x9c10, 0x9c12, 0x9c14, 0x9c16, 0x9c18, 0x9c1a,
638 0x9c90, 0x9c92, 0x9c94, 0x9c96, 0x9c98, 0x9c9a, 0x2448,
642 static const struct pci_driver pch_pcie
__pci_driver = {
#define printk(level,...)
#define BROADWELL_FAMILY_ULT
const char * dev_path(const struct device *dev)
static DEVTREE_CONST void * config_of(const struct device *dev)
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_and_config8(const struct device *dev, u16 reg, u8 andmask)
static __always_inline void pci_update_config32(const struct device *dev, u16 reg, u32 mask, u32 or)
static __always_inline void pci_update_config8(const struct device *dev, u16 reg, u8 mask, u8 or)
static __always_inline void pci_or_config16(const struct device *dev, u16 reg, u16 ormask)
static __always_inline void pci_or_config8(const struct device *dev, u16 reg, u8 ormask)
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_update_config16(const struct device *dev, u16 reg, u16 mask, u16 or)
static __always_inline void pci_write_config8(const struct device *dev, u16 reg, u8 val)
void pch_iobp_exec(u32 addr, u16 op_code, u8 route_id, u32 *data, u8 *resp)
void pch_iobp_write(u32 address, u32 data)
u32 pch_iobp_read(u32 address)
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
#define BIOS_SPEW
BIOS_SPEW - Excessively verbose output.
#define PCI_BRIDGE_CTL_PARITY
#define PCI_DEVFN(slot, func)
#define PCI_BRIDGE_CONTROL
#define PCI_COMMAND_MASTER
void pci_bus_enable_resources(struct device *dev)
void pci_dev_set_subsystem(struct device *dev, unsigned int vendor, unsigned int device)
void pci_bus_read_resources(struct device *dev)
void pci_dev_set_resources(struct device *dev)
#define PCIE_LTR_MAX_NO_SNOOP_LATENCY_3146US
#define PCIE_LTR_MAX_SNOOP_LATENCY_3146US
void pciexp_scan_bridge(struct device *dev)
#define PCH_DEV_SLOT_PCIE
void pch_disable_devfn(struct device *dev)
#define RPFN_FNSET(port, func)
#define IOBP_PCICFG_WRITE
#define RPFN_FNMASK(port)
static struct device_operations device_ops
#define MAX_NUM_ROOT_PORTS
static struct root_port_config rpc
static void root_port_config_update_gbe_port(void)
static void pch_pcie_early(struct device *dev)
static void root_port_init_config(struct device *dev)
static void pch_pcie_enable(struct device *dev)
static int root_port_is_first(struct device *dev)
static void pch_pcie_device_set_func(int index, int pci_func)
static void root_port_check_disable(struct device *dev)
static void pch_pcie_init(struct device *dev)
static void pcie_add_0x0202000_iobp(u32 reg)
static void pcie_get_ltr_max_latencies(u16 *max_snoop, u16 *max_nosnoop)
static void pcie_iosf_port_grant_count(struct device *dev)
static void root_port_mark_disable(struct device *dev)
static void pcie_enable_clock_gating(void)
static const struct pci_driver pch_pcie __pci_driver
static void root_port_commit_config(void)
static const unsigned short pcie_device_ids[]
static int root_port_number(struct device *dev)
static struct pci_operations pcie_ops
static int root_port_is_last(struct device *dev)
u32 cpu_family_model(void)
int gpio_is_native(int gpio_num)
void(* read_resources)(struct device *dev)
struct device * ports[MAX_NUM_ROOT_PORTS]