diff options
author | Dave Jiang <dave.jiang@intel.com> | 2014-08-28 16:53:23 -0400 |
---|---|---|
committer | Jon Mason <jdmason@kudzu.us> | 2014-10-17 07:08:51 -0400 |
commit | ab760a0c5667519b375ea9c5ab3a23501c4817ef (patch) | |
tree | 29d2b7dd165287dd635ff4b320fcb6a9dc5a7eae /drivers/ntb/ntb_hw.h | |
parent | 069684e888da73f175da0f10fe26da4f450d8c18 (diff) |
ntb: Adding split BAR support for Haswell platforms
On the Haswell platform, a split BAR option to allow creation of 2
32bit BARs (4 and 5) from the 64bit BAR 4. Adding support for this
new option.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers/ntb/ntb_hw.h')
-rw-r--r-- | drivers/ntb/ntb_hw.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/ntb/ntb_hw.h b/drivers/ntb/ntb_hw.h index 5380ca16198a..96de5fc95f90 100644 --- a/drivers/ntb/ntb_hw.h +++ b/drivers/ntb/ntb_hw.h | |||
@@ -78,14 +78,16 @@ static inline void writeq(u64 val, void __iomem *addr) | |||
78 | 78 | ||
79 | #define NTB_BAR_MMIO 0 | 79 | #define NTB_BAR_MMIO 0 |
80 | #define NTB_BAR_23 2 | 80 | #define NTB_BAR_23 2 |
81 | #define NTB_BAR_45 4 | 81 | #define NTB_BAR_4 4 |
82 | #define NTB_BAR_5 5 | ||
83 | |||
82 | #define NTB_BAR_MASK ((1 << NTB_BAR_MMIO) | (1 << NTB_BAR_23) |\ | 84 | #define NTB_BAR_MASK ((1 << NTB_BAR_MMIO) | (1 << NTB_BAR_23) |\ |
83 | (1 << NTB_BAR_45)) | 85 | (1 << NTB_BAR_4)) |
86 | #define NTB_SPLITBAR_MASK ((1 << NTB_BAR_MMIO) | (1 << NTB_BAR_23) |\ | ||
87 | (1 << NTB_BAR_4) | (1 << NTB_BAR_5)) | ||
84 | 88 | ||
85 | #define NTB_HB_TIMEOUT msecs_to_jiffies(1000) | 89 | #define NTB_HB_TIMEOUT msecs_to_jiffies(1000) |
86 | 90 | ||
87 | #define NTB_MAX_NUM_MW 2 | ||
88 | |||
89 | enum ntb_hw_event { | 91 | enum ntb_hw_event { |
90 | NTB_EVENT_SW_EVENT0 = 0, | 92 | NTB_EVENT_SW_EVENT0 = 0, |
91 | NTB_EVENT_SW_EVENT1, | 93 | NTB_EVENT_SW_EVENT1, |
@@ -115,7 +117,7 @@ struct ntb_device { | |||
115 | struct pci_dev *pdev; | 117 | struct pci_dev *pdev; |
116 | struct msix_entry *msix_entries; | 118 | struct msix_entry *msix_entries; |
117 | void __iomem *reg_base; | 119 | void __iomem *reg_base; |
118 | struct ntb_mw mw[NTB_MAX_NUM_MW]; | 120 | struct ntb_mw *mw; |
119 | struct { | 121 | struct { |
120 | unsigned char max_mw; | 122 | unsigned char max_mw; |
121 | unsigned char max_spads; | 123 | unsigned char max_spads; |
@@ -128,6 +130,7 @@ struct ntb_device { | |||
128 | void __iomem *rdb; | 130 | void __iomem *rdb; |
129 | void __iomem *bar2_xlat; | 131 | void __iomem *bar2_xlat; |
130 | void __iomem *bar4_xlat; | 132 | void __iomem *bar4_xlat; |
133 | void __iomem *bar5_xlat; | ||
131 | void __iomem *spad_write; | 134 | void __iomem *spad_write; |
132 | void __iomem *spad_read; | 135 | void __iomem *spad_read; |
133 | void __iomem *lnk_cntl; | 136 | void __iomem *lnk_cntl; |
@@ -147,6 +150,7 @@ struct ntb_device { | |||
147 | unsigned char link_width; | 150 | unsigned char link_width; |
148 | unsigned char link_speed; | 151 | unsigned char link_speed; |
149 | unsigned char link_status; | 152 | unsigned char link_status; |
153 | unsigned char split_bar; | ||
150 | 154 | ||
151 | struct delayed_work hb_timer; | 155 | struct delayed_work hb_timer; |
152 | unsigned long last_ts; | 156 | unsigned long last_ts; |