diff options
author | Logan Gunthorpe <logang@deltatee.com> | 2020-01-14 20:56:43 -0700 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2020-01-15 11:00:37 -0600 |
commit | b13313a01a6a607bd92268822d498d5c7356ca71 (patch) | |
tree | dd530cfc69f4c20d4051e7600cb01d6e4df2e5f6 /include/linux/switchtec.h | |
parent | fcccd282b633ab9fc7d53ff8ccf82ab5c30a0985 (diff) |
PCI/switchtec: Add 'generation' variable
Add a generation variable passed through the device ID table and test for
Gen3-specific registers. This will allow us to add Gen4 and other devices
that extend the programming model.
Link: https://lore.kernel.org/r/20200115035648.2578-3-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.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/switchtec.h b/include/linux/switchtec.h index 4ee450487fe4..d0b5816549ed 100644 --- a/include/linux/switchtec.h +++ b/include/linux/switchtec.h @@ -32,6 +32,10 @@ enum { SWITCHTEC_GAS_PFF_CSR_OFFSET = 0x134000, }; +enum switchtec_gen { + SWITCHTEC_GEN3, +}; + struct mrpc_regs { u8 input_data[SWITCHTEC_MRPC_PAYLOAD_SIZE]; u8 output_data[SWITCHTEC_MRPC_PAYLOAD_SIZE]; @@ -358,6 +362,8 @@ struct switchtec_dev { struct device dev; struct cdev cdev; + enum switchtec_gen gen; + int partition; int partition_count; int pff_csr_count; |