diff options
author | raghavendra.koushik@neterion.com <raghavendra.koushik@neterion.com> | 2005-08-03 15:36:55 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-11 00:10:45 -0400 |
commit | 541ae68f6ddf1c27aa6879935ce541f110484202 (patch) | |
tree | f85387531b0e3f5888c296dfab185409ba4c1265 /drivers/net/s2io-regs.h | |
parent | be3a6b02eb68a4d47397b771b6e4aa1f7f0f7ffb (diff) |
[PATCH] S2io: Support for Xframe II NIC
Hi,
This patch provides basic support for the Xframe II adapter.
Includes the following changes:
1. New values to program XAUI interface.
2. Print the PCI/PCI-X mode(bus frequency, width).
3. Remove EOI from reset during intialization.
4. Enable all 8 PCCs if Xframe II adapter.
5. Programs the RLDRAM size depending on the device.
(Note: RLDRAM size on XFARME-I is 64Mb whereas on XFRAME-II it's 32 Mb).
6. Enable extended(64-bit) statistics counters.
7. Program timer interrupt duration based on PCI/PCI-X clock speed.
8. Not required to save/restore PCI config space before/after reset.
Signed-off-by: Ravinandan Arakali <ravinandan.arakali@neterion.com>
Signed-off-by: Raghavendra Koushik <raghavendra.koushik@neterion.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/s2io-regs.h')
-rw-r--r-- | drivers/net/s2io-regs.h | 53 |
1 files changed, 41 insertions, 12 deletions
diff --git a/drivers/net/s2io-regs.h b/drivers/net/s2io-regs.h index 826deb0eb03a..159d87648f64 100644 --- a/drivers/net/s2io-regs.h +++ b/drivers/net/s2io-regs.h | |||
@@ -91,7 +91,21 @@ typedef struct _XENA_dev_config { | |||
91 | SERR_SOURCE_MC | \ | 91 | SERR_SOURCE_MC | \ |
92 | SERR_SOURCE_XGXS) | 92 | SERR_SOURCE_XGXS) |
93 | 93 | ||
94 | u8 unused_0[0x800 - 0x120]; | 94 | u64 pci_mode; |
95 | #define GET_PCI_MODE(val) ((val & vBIT(0xF, 0, 4)) >> 60) | ||
96 | #define PCI_MODE_PCI_33 0 | ||
97 | #define PCI_MODE_PCI_66 0x1 | ||
98 | #define PCI_MODE_PCIX_M1_66 0x2 | ||
99 | #define PCI_MODE_PCIX_M1_100 0x3 | ||
100 | #define PCI_MODE_PCIX_M1_133 0x4 | ||
101 | #define PCI_MODE_PCIX_M2_66 0x5 | ||
102 | #define PCI_MODE_PCIX_M2_100 0x6 | ||
103 | #define PCI_MODE_PCIX_M2_133 0x7 | ||
104 | #define PCI_MODE_UNSUPPORTED BIT(0) | ||
105 | #define PCI_MODE_32_BITS BIT(8) | ||
106 | #define PCI_MODE_UNKNOWN_MODE BIT(9) | ||
107 | |||
108 | u8 unused_0[0x800 - 0x128]; | ||
95 | 109 | ||
96 | /* PCI-X Controller registers */ | 110 | /* PCI-X Controller registers */ |
97 | u64 pic_int_status; | 111 | u64 pic_int_status; |
@@ -223,19 +237,16 @@ typedef struct _XENA_dev_config { | |||
223 | u64 xmsi_data; | 237 | u64 xmsi_data; |
224 | 238 | ||
225 | u64 rx_mat; | 239 | u64 rx_mat; |
240 | #define RX_MAT_SET(ring, msi) vBIT(msi, (8 * ring), 8) | ||
226 | 241 | ||
227 | u8 unused6[0x8]; | 242 | u8 unused6[0x8]; |
228 | 243 | ||
229 | u64 tx_mat0_7; | 244 | u64 tx_mat0_n[0x8]; |
230 | u64 tx_mat8_15; | 245 | #define TX_MAT_SET(fifo, msi) vBIT(msi, (8 * fifo), 8) |
231 | u64 tx_mat16_23; | ||
232 | u64 tx_mat24_31; | ||
233 | u64 tx_mat32_39; | ||
234 | u64 tx_mat40_47; | ||
235 | u64 tx_mat48_55; | ||
236 | u64 tx_mat56_63; | ||
237 | 246 | ||
238 | u8 unused_1[0x10]; | 247 | u8 unused_1[0x8]; |
248 | u64 stat_byte_cnt; | ||
249 | #define STAT_BC(n) vBIT(n,4,12) | ||
239 | 250 | ||
240 | /* Automated statistics collection */ | 251 | /* Automated statistics collection */ |
241 | u64 stat_cfg; | 252 | u64 stat_cfg; |
@@ -269,7 +280,12 @@ typedef struct _XENA_dev_config { | |||
269 | u64 gpio_control; | 280 | u64 gpio_control; |
270 | #define GPIO_CTRL_GPIO_0 BIT(8) | 281 | #define GPIO_CTRL_GPIO_0 BIT(8) |
271 | 282 | ||
272 | u8 unused7[0x600]; | 283 | u8 unused7_1[0x240 - 0x200]; |
284 | |||
285 | u64 wreq_split_mask; | ||
286 | #define WREQ_SPLIT_MASK_SET_MASK(val) vBIT(val, 52, 12) | ||
287 | |||
288 | u8 unused7_2[0x800 - 0x248]; | ||
273 | 289 | ||
274 | /* TxDMA registers */ | 290 | /* TxDMA registers */ |
275 | u64 txdma_int_status; | 291 | u64 txdma_int_status; |
@@ -470,6 +486,7 @@ typedef struct _XENA_dev_config { | |||
470 | #define PRC_CTRL_NO_SNOOP (BIT(22)|BIT(23)) | 486 | #define PRC_CTRL_NO_SNOOP (BIT(22)|BIT(23)) |
471 | #define PRC_CTRL_NO_SNOOP_DESC BIT(22) | 487 | #define PRC_CTRL_NO_SNOOP_DESC BIT(22) |
472 | #define PRC_CTRL_NO_SNOOP_BUFF BIT(23) | 488 | #define PRC_CTRL_NO_SNOOP_BUFF BIT(23) |
489 | #define PRC_CTRL_BIMODAL_INTERRUPT BIT(37) | ||
473 | #define PRC_CTRL_RXD_BACKOFF_INTERVAL(val) vBIT(val,40,24) | 490 | #define PRC_CTRL_RXD_BACKOFF_INTERVAL(val) vBIT(val,40,24) |
474 | 491 | ||
475 | u64 prc_alarm_action; | 492 | u64 prc_alarm_action; |
@@ -742,7 +759,19 @@ typedef struct _XENA_dev_config { | |||
742 | u64 mc_rldram_test_d1; | 759 | u64 mc_rldram_test_d1; |
743 | u8 unused24[0x300 - 0x288]; | 760 | u8 unused24[0x300 - 0x288]; |
744 | u64 mc_rldram_test_d2; | 761 | u64 mc_rldram_test_d2; |
745 | u8 unused25[0x700 - 0x308]; | 762 | |
763 | u8 unused24_1[0x360 - 0x308]; | ||
764 | u64 mc_rldram_ctrl; | ||
765 | #define MC_RLDRAM_ENABLE_ODT BIT(7) | ||
766 | |||
767 | u8 unused24_2[0x640 - 0x368]; | ||
768 | u64 mc_rldram_ref_per_herc; | ||
769 | #define MC_RLDRAM_SET_REF_PERIOD(val) vBIT(val, 0, 16) | ||
770 | |||
771 | u8 unused24_3[0x660 - 0x648]; | ||
772 | u64 mc_rldram_mrs_herc; | ||
773 | |||
774 | u8 unused25[0x700 - 0x668]; | ||
746 | u64 mc_debug_ctrl; | 775 | u64 mc_debug_ctrl; |
747 | 776 | ||
748 | u8 unused26[0x3000 - 0x2f08]; | 777 | u8 unused26[0x3000 - 0x2f08]; |