Go to the documentation of this file.
18 #define SYNC_CMD_VAL 2
19 #define SYNC_CMD_LEN 2
27 #define ADDR_CMD_LEN 4
32 #define PIC_SIGN_REG_ADDR 0x7
33 #define PIC_SIGN_VALUE 0xcd
35 #define STATUS_REG_ADDR 0
36 #define WDT_EN_MASK 0x01
37 #define CMND_EN_MASK 0x02
38 #define DIS_BYPASS_CAP_MASK 0x04
39 #define DFLT_PWRON_MASK 0x08
40 #define BYPASS_OFF_MASK 0x10
41 #define BYPASS_FLAG_MASK 0x20
42 #define STD_NIC_MASK (DIS_BYPASS_CAP_MASK | BYPASS_OFF_MASK | DFLT_PWRON_MASK)
43 #define WD_EXP_FLAG_MASK 0x40
44 #define DFLT_PWROFF_MASK 0x80
45 #define STD_NIC_PWOFF_MASK (DIS_BYPASS_CAP_MASK | BYPASS_OFF_MASK | DFLT_PWRON_MASK | DFLT_PWROFF_MASK)
47 #define PRODUCT_CAP_REG_ADDR 0x5
48 #define BYPASS_SUPPORT_MASK 0x01
49 #define TAP_SUPPORT_MASK 0x02
50 #define NORMAL_UNSUPPORT_MASK 0x04
51 #define DISC_SUPPORT_MASK 0x08
52 #define TPL2_SUPPORT_MASK 0x10
53 #define DISC_PORT_SUPPORT_MASK 0x20
55 #define STATUS_TAP_REG_ADDR 0x6
56 #define WDTE_TAP_BPN_MASK 0x01
57 #define DIS_TAP_CAP_MASK 0x04
58 #define DFLT_PWRON_TAP_MASK 0x08
59 #define TAP_OFF_MASK 0x10
60 #define TAP_FLAG_MASK 0x20
61 #define TX_DISA_MASK 0x40
62 #define TX_DISB_MASK 0x80
64 #define STD_NIC_TAP_MASK (DIS_TAP_CAP_MASK | TAP_OFF_MASK | DFLT_PWRON_TAP_MASK)
66 #define STATUS_DISC_REG_ADDR 13
67 #define WDTE_DISC_BPN_MASK 0x01
68 #define STD_NIC_ON_MASK 0x02
69 #define DIS_DISC_CAP_MASK 0x04
70 #define DFLT_PWRON_DISC_MASK 0x08
71 #define DISC_OFF_MASK 0x10
72 #define DISC_FLAG_MASK 0x20
73 #define TPL2_FLAG_MASK 0x40
74 #define STD_NIC_DISC_MASK DIS_DISC_CAP_MASK
76 #define CONT_CONFIG_REG_ADDR 12
77 #define EN_HW_RESET_MASK 0x2
78 #define WAIT_AT_PWUP_MASK 0x1
80 #define VER_REG_ADDR 0x1
81 #define BP_FW_VER_A0 0xa0
82 #define BP_FW_VER_A1 0xa1
84 #define INT_VER_MASK 0xf0
85 #define EXT_VER_MASK 0xf
87 #define PXG2BPI_VER 0x0
88 #define PXG2TBPI_VER 0x1
89 #define PXE2TBPI_VER 0x2
90 #define PXG4BPFI_VER 0x4
91 #define BP_FW_EXT_VER7 0x6
92 #define BP_FW_EXT_VER8 0x8
93 #define BP_FW_EXT_VER9 0x9
97 #define CMND_REG_ADDR 10
98 #define WDT_REG_ADDR 4
99 #define TMRL_REG_ADDR 2
100 #define TMRH_REG_ADDR 3
103 #define WDT_INTERVAL 1
104 #define WDT_CMND_INTERVAL 200
105 #define CMND_INTERVAL 200
106 #define PULSE_TIME 100
109 #define INIT_CMND_INTERVAL 40
110 #define PULSE_INTERVAL 5
111 #define WDT_TIME_CNT 3
115 #define CMND_OFF_INT 0xf
116 #define PWROFF_BYPASS_ON_INT 0x5
117 #define BYPASS_ON_INT 0x6
118 #define DIS_BYPASS_CAP_INT 0x4
119 #define RESET_WDT_INT 0x1
123 #define BYPASS_DELAY_INT 4
124 #define CMND_INTERVAL_INT 2
129 #define BYPASS_ON 0xa
130 #define BYPASS_OFF 0x8
131 #define PORT_LINK_EN 0xe
132 #define PORT_LINK_DIS 0xc
134 #define TIMEOUT_UNIT 100
135 #define TIMEOUT_MAX_STEP 15
136 #define WDT_TIMEOUT_MIN 100
137 #define WDT_TIMEOUT_MAX 3276800
138 #define WDT_AUTO_MIN_INT 500
139 #define WDT_TIMEOUT_DEF WDT_TIMEOUT_MIN
141 #define WDT_RELOAD 0x9
142 #define RESET_CONT 0x20
143 #define DIS_BYPASS_CAP 0x22
144 #define EN_BYPASS_CAP 0x24
145 #define BYPASS_STATE_PWRON 0x26
146 #define NORMAL_STATE_PWRON 0x28
147 #define BYPASS_STATE_PWROFF 0x27
148 #define NORMAL_STATE_PWROFF 0x29
151 #define TAP_STATE_PWRON 0x2a
152 #define DIS_TAP_CAP 0x2c
153 #define EN_TAP_CAP 0x2e
154 #define STD_NIC_OFF 0x86
155 #define STD_NIC_ON 0x84
157 #define DISC_OFF 0x8a
158 #define DISC_STATE_PWRON 0x87
159 #define DIS_DISC_CAP 0x88
160 #define EN_DISC_CAP 0x89
162 #define TPL2_OFF 0x8b
163 #define BP_WAIT_AT_PWUP_EN 0x80
164 #define BP_WAIT_AT_PWUP_DIS 0x81
165 #define BP_HW_RESET_EN 0x82
166 #define BP_HW_RESET_DIS 0x83
173 #define TX_DISA_PWRUP 0xA2
174 #define TX_DISB_PWRUP 0xA3
175 #define TX_ENA_PWRUP 0xA4
176 #define TX_ENB_PWRUP 0xA5
178 #define BYPASS_CAP_DELAY 21
179 #define DFLT_PWRON_DELAY 10
180 #define LATCH_DELAY 13
181 #define EEPROM_WR_DELAY 8
183 #define BP_LINK_MON_DELAY 4
185 #define BP_FW_EXT_VER0 0xa0
186 #define BP_FW_EXT_VER1 0xa1
187 #define BP_FW_EXT_VER2 0xb1
190 #define BP_NOT_CAP -1
191 #define WDT_STATUS_EXP -2
192 #define WDT_STATUS_UNKNOWN -1
193 #define WDT_STATUS_EN 1
194 #define WDT_STATUS_DIS 0
197 #define ETH_P_BPTEST 0xabba
199 #define BPTEST_DATA_LEN 60