diff options
author | Sanjay R Mehta <sanju.mehta@amd.com> | 2019-09-15 17:08:35 +0000 |
---|---|---|
committer | Jon Mason <jdmason@kudzu.us> | 2019-09-23 17:20:40 -0400 |
commit | a1472e73e3d791eb5eddeceb99f7dc5c17ca98ce (patch) | |
tree | 1b6f267d37d1d97ccbee5ca6e96fe9d304db9eb6 /drivers/ntb/hw/amd/ntb_hw_amd.h | |
parent | ntb_hw_amd: Add a new NTB PCI device ID (diff) | |
download | linux-dev-a1472e73e3d791eb5eddeceb99f7dc5c17ca98ce.tar.xz linux-dev-a1472e73e3d791eb5eddeceb99f7dc5c17ca98ce.zip |
ntb_hw_amd: Add memory window support for new AMD hardware
The AMD new hardware uses BAR23 and BAR45 as memory windows
as compared to previos where BAR1, BAR23 and BAR45 is used
for memory windows.
This patch add support for both AMD hardwares.
Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers/ntb/hw/amd/ntb_hw_amd.h')
-rw-r--r-- | drivers/ntb/hw/amd/ntb_hw_amd.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/ntb/hw/amd/ntb_hw_amd.h b/drivers/ntb/hw/amd/ntb_hw_amd.h index 3aac994f3e77..139a307147bc 100644 --- a/drivers/ntb/hw/amd/ntb_hw_amd.h +++ b/drivers/ntb/hw/amd/ntb_hw_amd.h @@ -92,7 +92,6 @@ static inline void _write64(u64 val, void __iomem *mmio) enum { /* AMD NTB Capability */ - AMD_MW_CNT = 3, AMD_DB_CNT = 16, AMD_MSIX_VECTOR_CNT = 24, AMD_SPADS_CNT = 16, @@ -169,6 +168,11 @@ enum { AMD_PEER_OFFSET = 0x400, }; +struct ntb_dev_data { + const unsigned char mw_count; + const unsigned int mw_idx; +}; + struct amd_ntb_dev; struct amd_ntb_vec { @@ -184,6 +188,7 @@ struct amd_ntb_dev { u32 cntl_sta; u32 peer_sta; + struct ntb_dev_data *dev_data; unsigned char mw_count; unsigned char spad_count; unsigned char db_count; |