pci-v5.6-changes
-----BEGIN PGP SIGNATURE-----
iQJIBAABCgAyFiEEgMe7l+5h9hnxdsnuWYigwDrT+vwFAl40PWgUHGJoZWxnYWFz
QGdvb2dsZS5jb20ACgkQWYigwDrT+vwclA/+Id/7Uc5S0r7xgFQRr3lbn0hHcx7f
oBgmm6kGl8bu77MDiY32WLmPsp9e4BlK2M765cKQL5n20y8CzJ+kthZM8tZEDba4
pnrZnWZ0A2xaBKzJqqYDtCqAeP97noCs4zBLo3JCA6jYCYI5bkvmdMQRlRjTUofO
tkenGE+vexaJsLB7ghNskL3xGMueXLtLf/hXvaC6WGbSI9/zUmliHDL53DoKDPRo
/9TGYDMwItZz+BhmBJz8hAL4naQIhIcDk2mz7CzWkY9xDhCJ1yeEwFvtvJwq0uM2
Nmtq1g6yCB3sjlx+bRzrioLnouflztK1PGRbNugrMkR5XM9HIFmNwaDrqpU11ffA
LQabMpbS3RWH3hbh4LYVMW13hbO+ld7/NG8jMFce2LHBWaGj6YejUQGdifz6vGRk
JnDOgP19v5gWw08ibwkdfYzznPfMXp5IzFdJQFKhK+ugGDSJ8VeXiQ/pWtzghl3z
P/puRw0BiL7ob/FUmhwn4J1Ytml7PZE+cJVN2l4C/CwKxR583GRUDgSHNL7Dky+o
GcH9Tmjt4hQMNYRP01PACUmFYJwDfB+zgQ64a+uJsQwl/j+yfMnc1t/kqdM6yC9J
GgkqLp989G/a3n9w5IC1P8aDYiwRqABvAFzlP9OZcIMUwmWbrhH175Qf6skKYIhH
q9RKcLVXZdRS3mc=
=fQ0E
-----END PGP SIGNATURE-----
Merge tag 'pci-v5.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI updates from Bjorn Helgaas:
"Resource management:
- Improve resource assignment for hot-added nested bridges, e.g.,
Thunderbolt (Nicholas Johnson)
Power management:
- Optionally print config space of devices before suspend (Chen Yu)
- Increase D3 delay for AMD Ryzen5/7 XHCI controllers (Daniel Drake)
Virtualization:
- Generalize DMA alias quirks (James Sewart)
- Add DMA alias quirk for PLX PEX NTB (James Sewart)
- Fix IOV memory leak (Navid Emamdoost)
AER:
- Log which device prevents error recovery (Yicong Yang)
Peer-to-peer DMA:
- Whitelist Intel SkyLake-E (Armen Baloyan)
Broadcom iProc host bridge driver:
- Apply PAXC quirk whether driver is built-in or module (Wei Liu)
Broadcom STB host bridge driver:
- Add Broadcom STB PCIe host controller driver (Jim Quinlan)
Intel Gateway SoC host bridge driver:
- Add driver for Intel Gateway SoC (Dilip Kota)
Intel VMD host bridge driver:
- Add support for DMA aliases on other buses (Jon Derrick)
- Remove dma_map_ops overrides (Jon Derrick)
- Remove now-unused X86_DEV_DMA_OPS (Christoph Hellwig)
NVIDIA Tegra host bridge driver:
- Fix Tegra30 afi_pex2_ctrl register offset (Marcel Ziswiler)
Panasonic UniPhier host bridge driver:
- Remove module code since driver can't be built as a module
(Masahiro Yamada)
Qualcomm host bridge driver:
- Add support for SDM845 PCIe controller (Bjorn Andersson)
TI Keystone host bridge driver:
- Fix "num-viewport" DT property error handling (Kishon Vijay Abraham I)
- Fix link training retries initiation (Yurii Monakov)
- Fix outbound region mapping (Yurii Monakov)
Misc:
- Add Switchtec Gen4 support (Kelvin Cao)
- Add Switchtec Intercomm Notify and Upstream Error Containment
support (Logan Gunthorpe)
- Use dma_set_mask_and_coherent() since Switchtec supports 64-bit
addressing (Wesley Sheng)"
* tag 'pci-v5.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (60 commits)
PCI: Allow adjust_bridge_window() to shrink resource if necessary
PCI: Set resource size directly in adjust_bridge_window()
PCI: Rename extend_bridge_window() to adjust_bridge_window()
PCI: Rename extend_bridge_window() parameter
PCI: Consider alignment of hot-added bridges when assigning resources
PCI: Remove local variable usage in pci_bus_distribute_available_resources()
PCI: Pass size + alignment to pci_bus_distribute_available_resources()
PCI: Rename variables
PCI: vmd: Add two VMD Device IDs
PCI: Remove unnecessary braces
PCI: brcmstb: Add MSI support
PCI: brcmstb: Add Broadcom STB PCIe host controller driver
x86/PCI: Remove X86_DEV_DMA_OPS
PCI: vmd: Remove dma_map_ops overrides
iommu/vt-d: Remove VMD child device sanity check
iommu/vt-d: Use pci_real_dma_dev() for mapping
PCI: Introduce pci_real_dma_dev()
x86/PCI: Expose VMD's pci_dev in struct pci_sysdata
x86/PCI: Add to_pci_sysdata() helper
PCI/AER: Initialize aer_fifo
...
This commit is contained in:
commit
26dca6dbd6
42 changed files with 2801 additions and 520 deletions
|
|
@ -1202,6 +1202,7 @@ int __must_check pci_resize_resource(struct pci_dev *dev, int i, int size);
|
|||
int pci_select_bars(struct pci_dev *dev, unsigned long flags);
|
||||
bool pci_device_is_present(struct pci_dev *pdev);
|
||||
void pci_ignore_hotplug(struct pci_dev *dev);
|
||||
struct pci_dev *pci_real_dma_dev(struct pci_dev *dev);
|
||||
|
||||
int __printf(6, 7) pci_request_irq(struct pci_dev *dev, unsigned int nr,
|
||||
irq_handler_t handler, irq_handler_t thread_fn, void *dev_id,
|
||||
|
|
@ -2310,7 +2311,7 @@ static inline struct eeh_dev *pci_dev_to_eeh_dev(struct pci_dev *pdev)
|
|||
}
|
||||
#endif
|
||||
|
||||
void pci_add_dma_alias(struct pci_dev *dev, u8 devfn);
|
||||
void pci_add_dma_alias(struct pci_dev *dev, u8 devfn_from, unsigned nr_devfns);
|
||||
bool pci_devs_are_dma_aliases(struct pci_dev *dev1, struct pci_dev *dev2);
|
||||
int pci_for_each_dma_alias(struct pci_dev *pdev,
|
||||
int (*fn)(struct pci_dev *pdev,
|
||||
|
|
|
|||
|
|
@ -21,6 +21,11 @@
|
|||
#define SWITCHTEC_EVENT_FATAL BIT(4)
|
||||
|
||||
#define SWITCHTEC_DMA_MRPC_EN BIT(0)
|
||||
|
||||
#define MRPC_GAS_READ 0x29
|
||||
#define MRPC_GAS_WRITE 0x87
|
||||
#define MRPC_CMD_ID(x) ((x) & 0xffff)
|
||||
|
||||
enum {
|
||||
SWITCHTEC_GAS_MRPC_OFFSET = 0x0000,
|
||||
SWITCHTEC_GAS_TOP_CFG_OFFSET = 0x1000,
|
||||
|
|
@ -32,6 +37,11 @@ enum {
|
|||
SWITCHTEC_GAS_PFF_CSR_OFFSET = 0x134000,
|
||||
};
|
||||
|
||||
enum switchtec_gen {
|
||||
SWITCHTEC_GEN3,
|
||||
SWITCHTEC_GEN4,
|
||||
};
|
||||
|
||||
struct mrpc_regs {
|
||||
u8 input_data[SWITCHTEC_MRPC_PAYLOAD_SIZE];
|
||||
u8 output_data[SWITCHTEC_MRPC_PAYLOAD_SIZE];
|
||||
|
|
@ -98,16 +108,37 @@ struct sw_event_regs {
|
|||
} __packed;
|
||||
|
||||
enum {
|
||||
SWITCHTEC_CFG0_RUNNING = 0x04,
|
||||
SWITCHTEC_CFG1_RUNNING = 0x05,
|
||||
SWITCHTEC_IMG0_RUNNING = 0x03,
|
||||
SWITCHTEC_IMG1_RUNNING = 0x07,
|
||||
SWITCHTEC_GEN3_CFG0_RUNNING = 0x04,
|
||||
SWITCHTEC_GEN3_CFG1_RUNNING = 0x05,
|
||||
SWITCHTEC_GEN3_IMG0_RUNNING = 0x03,
|
||||
SWITCHTEC_GEN3_IMG1_RUNNING = 0x07,
|
||||
};
|
||||
|
||||
struct sys_info_regs {
|
||||
u32 device_id;
|
||||
u32 device_version;
|
||||
u32 firmware_version;
|
||||
enum {
|
||||
SWITCHTEC_GEN4_MAP0_RUNNING = 0x00,
|
||||
SWITCHTEC_GEN4_MAP1_RUNNING = 0x01,
|
||||
SWITCHTEC_GEN4_KEY0_RUNNING = 0x02,
|
||||
SWITCHTEC_GEN4_KEY1_RUNNING = 0x03,
|
||||
SWITCHTEC_GEN4_BL2_0_RUNNING = 0x04,
|
||||
SWITCHTEC_GEN4_BL2_1_RUNNING = 0x05,
|
||||
SWITCHTEC_GEN4_CFG0_RUNNING = 0x06,
|
||||
SWITCHTEC_GEN4_CFG1_RUNNING = 0x07,
|
||||
SWITCHTEC_GEN4_IMG0_RUNNING = 0x08,
|
||||
SWITCHTEC_GEN4_IMG1_RUNNING = 0x09,
|
||||
};
|
||||
|
||||
enum {
|
||||
SWITCHTEC_GEN4_KEY0_ACTIVE = 0,
|
||||
SWITCHTEC_GEN4_KEY1_ACTIVE = 1,
|
||||
SWITCHTEC_GEN4_BL2_0_ACTIVE = 0,
|
||||
SWITCHTEC_GEN4_BL2_1_ACTIVE = 1,
|
||||
SWITCHTEC_GEN4_CFG0_ACTIVE = 0,
|
||||
SWITCHTEC_GEN4_CFG1_ACTIVE = 1,
|
||||
SWITCHTEC_GEN4_IMG0_ACTIVE = 0,
|
||||
SWITCHTEC_GEN4_IMG1_ACTIVE = 1,
|
||||
};
|
||||
|
||||
struct sys_info_regs_gen3 {
|
||||
u32 reserved1;
|
||||
u32 vendor_table_revision;
|
||||
u32 table_format_version;
|
||||
|
|
@ -124,26 +155,78 @@ struct sys_info_regs {
|
|||
u8 component_revision;
|
||||
} __packed;
|
||||
|
||||
struct flash_info_regs {
|
||||
struct sys_info_regs_gen4 {
|
||||
u16 gas_layout_ver;
|
||||
u8 evlist_ver;
|
||||
u8 reserved1;
|
||||
u16 mgmt_cmd_set_ver;
|
||||
u16 fabric_cmd_set_ver;
|
||||
u32 reserved2[2];
|
||||
u8 mrpc_uart_ver;
|
||||
u8 mrpc_twi_ver;
|
||||
u8 mrpc_eth_ver;
|
||||
u8 mrpc_inband_ver;
|
||||
u32 reserved3[7];
|
||||
u32 fw_update_tmo;
|
||||
u32 xml_version_cfg;
|
||||
u32 xml_version_img;
|
||||
u32 partition_id;
|
||||
u16 bl2_running;
|
||||
u16 cfg_running;
|
||||
u16 img_running;
|
||||
u16 key_running;
|
||||
u32 reserved4[43];
|
||||
u32 vendor_seeprom_twi;
|
||||
u32 vendor_table_revision;
|
||||
u32 vendor_specific_info[2];
|
||||
u16 p2p_vendor_id;
|
||||
u16 p2p_device_id;
|
||||
u8 p2p_revision_id;
|
||||
u8 reserved5[3];
|
||||
u32 p2p_class_id;
|
||||
u16 subsystem_vendor_id;
|
||||
u16 subsystem_id;
|
||||
u32 p2p_serial_number[2];
|
||||
u8 mac_addr[6];
|
||||
u8 reserved6[2];
|
||||
u32 reserved7[3];
|
||||
char vendor_id[8];
|
||||
char product_id[24];
|
||||
char product_revision[2];
|
||||
u16 reserved8;
|
||||
} __packed;
|
||||
|
||||
struct sys_info_regs {
|
||||
u32 device_id;
|
||||
u32 device_version;
|
||||
u32 firmware_version;
|
||||
union {
|
||||
struct sys_info_regs_gen3 gen3;
|
||||
struct sys_info_regs_gen4 gen4;
|
||||
};
|
||||
} __packed;
|
||||
|
||||
struct partition_info {
|
||||
u32 address;
|
||||
u32 length;
|
||||
};
|
||||
|
||||
struct flash_info_regs_gen3 {
|
||||
u32 flash_part_map_upd_idx;
|
||||
|
||||
struct active_partition_info {
|
||||
struct active_partition_info_gen3 {
|
||||
u32 address;
|
||||
u32 build_version;
|
||||
u32 build_string;
|
||||
} active_img;
|
||||
|
||||
struct active_partition_info active_cfg;
|
||||
struct active_partition_info inactive_img;
|
||||
struct active_partition_info inactive_cfg;
|
||||
struct active_partition_info_gen3 active_cfg;
|
||||
struct active_partition_info_gen3 inactive_img;
|
||||
struct active_partition_info_gen3 inactive_cfg;
|
||||
|
||||
u32 flash_length;
|
||||
|
||||
struct partition_info {
|
||||
u32 address;
|
||||
u32 length;
|
||||
} cfg0;
|
||||
|
||||
struct partition_info cfg0;
|
||||
struct partition_info cfg1;
|
||||
struct partition_info img0;
|
||||
struct partition_info img1;
|
||||
|
|
@ -151,6 +234,40 @@ struct flash_info_regs {
|
|||
struct partition_info vendor[8];
|
||||
};
|
||||
|
||||
struct flash_info_regs_gen4 {
|
||||
u32 flash_address;
|
||||
u32 flash_length;
|
||||
|
||||
struct active_partition_info_gen4 {
|
||||
unsigned char bl2;
|
||||
unsigned char cfg;
|
||||
unsigned char img;
|
||||
unsigned char key;
|
||||
} active_flag;
|
||||
|
||||
u32 reserved[3];
|
||||
|
||||
struct partition_info map0;
|
||||
struct partition_info map1;
|
||||
struct partition_info key0;
|
||||
struct partition_info key1;
|
||||
struct partition_info bl2_0;
|
||||
struct partition_info bl2_1;
|
||||
struct partition_info cfg0;
|
||||
struct partition_info cfg1;
|
||||
struct partition_info img0;
|
||||
struct partition_info img1;
|
||||
struct partition_info nvlog;
|
||||
struct partition_info vendor[8];
|
||||
};
|
||||
|
||||
struct flash_info_regs {
|
||||
union {
|
||||
struct flash_info_regs_gen3 gen3;
|
||||
struct flash_info_regs_gen4 gen4;
|
||||
};
|
||||
};
|
||||
|
||||
enum {
|
||||
SWITCHTEC_NTB_REG_INFO_OFFSET = 0x0000,
|
||||
SWITCHTEC_NTB_REG_CTRL_OFFSET = 0x4000,
|
||||
|
|
@ -196,7 +313,9 @@ struct part_cfg_regs {
|
|||
u32 mrpc_comp_async_data[5];
|
||||
u32 dyn_binding_hdr;
|
||||
u32 dyn_binding_data[5];
|
||||
u32 reserved4[159];
|
||||
u32 intercomm_notify_hdr;
|
||||
u32 intercomm_notify_data[5];
|
||||
u32 reserved4[153];
|
||||
} __packed;
|
||||
|
||||
enum {
|
||||
|
|
@ -320,7 +439,8 @@ struct pff_csr_regs {
|
|||
u32 dpc_data[5];
|
||||
u32 cts_hdr;
|
||||
u32 cts_data[5];
|
||||
u32 reserved3[6];
|
||||
u32 uec_hdr;
|
||||
u32 uec_data[5];
|
||||
u32 hotplug_hdr;
|
||||
u32 hotplug_data[5];
|
||||
u32 ier_hdr;
|
||||
|
|
@ -355,6 +475,8 @@ struct switchtec_dev {
|
|||
struct device dev;
|
||||
struct cdev cdev;
|
||||
|
||||
enum switchtec_gen gen;
|
||||
|
||||
int partition;
|
||||
int partition_count;
|
||||
int pff_csr_count;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue