diff options
Diffstat (limited to 'drivers/scsi/mvsas/mv_94xx.h')
-rw-r--r-- | drivers/scsi/mvsas/mv_94xx.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/drivers/scsi/mvsas/mv_94xx.h b/drivers/scsi/mvsas/mv_94xx.h index 8835befe2c0e..33af2a1fb729 100644 --- a/drivers/scsi/mvsas/mv_94xx.h +++ b/drivers/scsi/mvsas/mv_94xx.h | |||
@@ -30,6 +30,14 @@ | |||
30 | 30 | ||
31 | #define MAX_LINK_RATE SAS_LINK_RATE_6_0_GBPS | 31 | #define MAX_LINK_RATE SAS_LINK_RATE_6_0_GBPS |
32 | 32 | ||
33 | enum VANIR_REVISION_ID { | ||
34 | VANIR_A0_REV = 0xA0, | ||
35 | VANIR_B0_REV = 0x01, | ||
36 | VANIR_C0_REV = 0x02, | ||
37 | VANIR_C1_REV = 0x03, | ||
38 | VANIR_C2_REV = 0xC2, | ||
39 | }; | ||
40 | |||
33 | enum hw_registers { | 41 | enum hw_registers { |
34 | MVS_GBL_CTL = 0x04, /* global control */ | 42 | MVS_GBL_CTL = 0x04, /* global control */ |
35 | MVS_GBL_INT_STAT = 0x00, /* global irq status */ | 43 | MVS_GBL_INT_STAT = 0x00, /* global irq status */ |
@@ -126,6 +134,10 @@ enum sas_sata_vsp_regs { | |||
126 | VSR_PHY_MODE11 = 0x0B * 4, /* Phy Mode */ | 134 | VSR_PHY_MODE11 = 0x0B * 4, /* Phy Mode */ |
127 | VSR_PHY_VS0 = 0x0C * 4, /* Vednor Specific 0 */ | 135 | VSR_PHY_VS0 = 0x0C * 4, /* Vednor Specific 0 */ |
128 | VSR_PHY_VS1 = 0x0D * 4, /* Vednor Specific 1 */ | 136 | VSR_PHY_VS1 = 0x0D * 4, /* Vednor Specific 1 */ |
137 | |||
138 | VSR_PHY_FFE_CONTROL = 0x10C, | ||
139 | VSR_PHY_DFE_UPDATE_CRTL = 0x110, | ||
140 | VSR_REF_CLOCK_CRTL = 0x1A0, | ||
129 | }; | 141 | }; |
130 | 142 | ||
131 | enum chip_register_bits { | 143 | enum chip_register_bits { |
@@ -169,6 +181,41 @@ enum pci_interrupt_cause { | |||
169 | IRQ_PCIE_ERR = (1 << 31), | 181 | IRQ_PCIE_ERR = (1 << 31), |
170 | }; | 182 | }; |
171 | 183 | ||
184 | union reg_phy_cfg { | ||
185 | u32 v; | ||
186 | struct { | ||
187 | u32 phy_reset:1; | ||
188 | u32 sas_support:1; | ||
189 | u32 sata_support:1; | ||
190 | u32 sata_host_mode:1; | ||
191 | /* | ||
192 | * bit 2: 6Gbps support | ||
193 | * bit 1: 3Gbps support | ||
194 | * bit 0: 1.5Gbps support | ||
195 | */ | ||
196 | u32 speed_support:3; | ||
197 | u32 snw_3_support:1; | ||
198 | u32 tx_lnk_parity:1; | ||
199 | /* | ||
200 | * bit 5: G1 (1.5Gbps) Without SSC | ||
201 | * bit 4: G1 (1.5Gbps) with SSC | ||
202 | * bit 3: G2 (3.0Gbps) Without SSC | ||
203 | * bit 2: G2 (3.0Gbps) with SSC | ||
204 | * bit 1: G3 (6.0Gbps) without SSC | ||
205 | * bit 0: G3 (6.0Gbps) with SSC | ||
206 | */ | ||
207 | u32 tx_spt_phs_lnk_rate:6; | ||
208 | /* 8h: 1.5Gbps 9h: 3Gbps Ah: 6Gbps */ | ||
209 | u32 tx_lgcl_lnk_rate:4; | ||
210 | u32 tx_ssc_type:1; | ||
211 | u32 sata_spin_up_spt:1; | ||
212 | u32 sata_spin_up_en:1; | ||
213 | u32 bypass_oob:1; | ||
214 | u32 disable_phy:1; | ||
215 | u32 rsvd:8; | ||
216 | } u; | ||
217 | }; | ||
218 | |||
172 | #define MAX_SG_ENTRY 255 | 219 | #define MAX_SG_ENTRY 255 |
173 | 220 | ||
174 | struct mvs_prd_imt { | 221 | struct mvs_prd_imt { |
@@ -185,6 +232,17 @@ struct mvs_prd { | |||
185 | struct mvs_prd_imt im_len; | 232 | struct mvs_prd_imt im_len; |
186 | } __attribute__ ((packed)); | 233 | } __attribute__ ((packed)); |
187 | 234 | ||
235 | /* | ||
236 | * these registers are accessed through port vendor | ||
237 | * specific address/data registers | ||
238 | */ | ||
239 | enum sas_sata_phy_regs { | ||
240 | GENERATION_1_SETTING = 0x118, | ||
241 | GENERATION_1_2_SETTING = 0x11C, | ||
242 | GENERATION_2_3_SETTING = 0x120, | ||
243 | GENERATION_3_4_SETTING = 0x124, | ||
244 | }; | ||
245 | |||
188 | #define SPI_CTRL_REG_94XX 0xc800 | 246 | #define SPI_CTRL_REG_94XX 0xc800 |
189 | #define SPI_ADDR_REG_94XX 0xc804 | 247 | #define SPI_ADDR_REG_94XX 0xc804 |
190 | #define SPI_WR_DATA_REG_94XX 0xc808 | 248 | #define SPI_WR_DATA_REG_94XX 0xc808 |