aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/switchtec.h
diff options
context:
space:
mode:
authorLogan Gunthorpe <logang@deltatee.com>2020-01-14 20:56:46 -0700
committerBjorn Helgaas <bhelgaas@google.com>2020-01-15 11:00:38 -0600
commita3321ca394082f403b447646d81c18ff6b39f4a6 (patch)
treefe3299a3342adf9d050b158f7aed3fa1e7202cec /include/linux/switchtec.h
parentPCI/switchtec: Separate Gen3 register structures into unions (diff)
downloadlinux-dev-a3321ca394082f403b447646d81c18ff6b39f4a6.tar.xz
linux-dev-a3321ca394082f403b447646d81c18ff6b39f4a6.zip
PCI/switchtec: Add Gen4 system info register support
Add the Gen4-specific system info registers and ensure their usage is guarded by a check on the device's generation. Link: https://lore.kernel.org/r/20200115035648.2578-6-logang@deltatee.com Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'include/linux/switchtec.h')
-rw-r--r--include/linux/switchtec.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/linux/switchtec.h b/include/linux/switchtec.h
index 32a20d10b02e..d012520e5cc5 100644
--- a/include/linux/switchtec.h
+++ b/include/linux/switchtec.h
@@ -34,6 +34,7 @@ enum {
enum switchtec_gen {
SWITCHTEC_GEN3,
+ SWITCHTEC_GEN4,
};
struct mrpc_regs {
@@ -125,12 +126,54 @@ struct sys_info_regs_gen3 {
u8 component_revision;
} __packed;
+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;