Lines Matching +full:0 +full:xc301
28 #define MDIO_QUAKE_LED0_REG (0xD006)
31 #define PCS_FW_HEARTBEAT_REG 0xd7ee
32 #define PCS_FW_HEARTB_LBN 0
34 #define PCS_FW_PRODUCT_CODE_1 0xd7f0
35 #define PCS_FW_VERSION_1 0xd7f3
36 #define PCS_FW_BUILD_1 0xd7f6
37 #define PCS_UC8051_STATUS_REG 0xd7fd
38 #define PCS_UC_STATUS_LBN 0
40 #define PCS_UC_STATUS_FW_SAVE 0x20
41 #define PMA_PMD_MODE_REG 0xc301
43 #define PMA_PMD_FTX_CTRL2_REG 0xc309
45 #define PMA_PMD_VEND1_REG 0xc001
47 #define PCS_VEND1_REG 0xc000
76 int reg, old_counter = 0; in qt2025c_wait_heartbeat()
82 if (reg < 0) in qt2025c_wait_heartbeat()
86 if (old_counter == 0) in qt2025c_wait_heartbeat()
102 return 0; in qt2025c_wait_heartbeat()
113 if (reg < 0) in qt2025c_wait_fw_status_good()
124 return 0; in qt2025c_wait_fw_status_good()
130 ef4_mdio_write(efx, 3, 0xe854, 0x00c0); in qt2025c_restart_firmware()
131 ef4_mdio_write(efx, 3, 0xe854, 0x0040); in qt2025c_restart_firmware()
140 if (rc != 0) in qt2025c_wait_reset()
146 * code never progresses beyond 0x00. Try again, once, after in qt2025c_wait_reset()
152 if (rc != 0) in qt2025c_wait_reset()
166 for (i = 0; i < sizeof(firmware_id); i++) in qt2025c_firmware_id()
171 (firmware_id[0] << 8) | firmware_id[1], firmware_id[2], in qt2025c_firmware_id()
172 firmware_id[3] >> 4, firmware_id[3] & 0xf, in qt2025c_firmware_id()
175 phy_data->firmware_ver = ((firmware_id[3] & 0xf0) << 20) | in qt2025c_firmware_id()
176 ((firmware_id[3] & 0x0f) << 16) | in qt2025c_firmware_id()
223 if (phy_data->firmware_ver < 0x02000100) in qt2025c_select_phy_mode()
224 return 0; in qt2025c_select_phy_mode()
230 phy_op_mode = (efx->loopback_mode == LOOPBACK_NONE) ? 0x0038 : 0x0020; in qt2025c_select_phy_mode()
233 reg = ef4_mdio_read(efx, 1, 0xc319); in qt2025c_select_phy_mode()
234 if ((reg & 0x0038) == phy_op_mode) in qt2025c_select_phy_mode()
235 return 0; in qt2025c_select_phy_mode()
236 netif_dbg(efx, hw, efx->net_dev, "Switching PHY to mode 0x%04x\n", in qt2025c_select_phy_mode()
243 ef4_mdio_write(efx, 1, 0xc300, 0x0000); in qt2025c_select_phy_mode()
248 if (board->major == 0 && board->minor < 2) { in qt2025c_select_phy_mode()
249 ef4_mdio_write(efx, 1, 0xc303, 0x4498); in qt2025c_select_phy_mode()
250 for (i = 0; i < 9; i++) { in qt2025c_select_phy_mode()
251 ef4_mdio_write(efx, 1, 0xc303, 0x4488); in qt2025c_select_phy_mode()
252 ef4_mdio_write(efx, 1, 0xc303, 0x4480); in qt2025c_select_phy_mode()
253 ef4_mdio_write(efx, 1, 0xc303, 0x4490); in qt2025c_select_phy_mode()
254 ef4_mdio_write(efx, 1, 0xc303, 0x4498); in qt2025c_select_phy_mode()
257 ef4_mdio_write(efx, 1, 0xc303, 0x0920); in qt2025c_select_phy_mode()
258 ef4_mdio_write(efx, 1, 0xd008, 0x0004); in qt2025c_select_phy_mode()
259 for (i = 0; i < 9; i++) { in qt2025c_select_phy_mode()
260 ef4_mdio_write(efx, 1, 0xc303, 0x0900); in qt2025c_select_phy_mode()
261 ef4_mdio_write(efx, 1, 0xd008, 0x0005); in qt2025c_select_phy_mode()
262 ef4_mdio_write(efx, 1, 0xc303, 0x0920); in qt2025c_select_phy_mode()
263 ef4_mdio_write(efx, 1, 0xd008, 0x0004); in qt2025c_select_phy_mode()
265 ef4_mdio_write(efx, 1, 0xc303, 0x4900); in qt2025c_select_phy_mode()
267 ef4_mdio_write(efx, 1, 0xc303, 0x4900); in qt2025c_select_phy_mode()
268 ef4_mdio_write(efx, 1, 0xc302, 0x0004); in qt2025c_select_phy_mode()
269 ef4_mdio_write(efx, 1, 0xc316, 0x0013); in qt2025c_select_phy_mode()
270 ef4_mdio_write(efx, 1, 0xc318, 0x0054); in qt2025c_select_phy_mode()
271 ef4_mdio_write(efx, 1, 0xc319, phy_op_mode); in qt2025c_select_phy_mode()
272 ef4_mdio_write(efx, 1, 0xc31a, 0x0098); in qt2025c_select_phy_mode()
273 ef4_mdio_write(efx, 3, 0x0026, 0x0e00); in qt2025c_select_phy_mode()
274 ef4_mdio_write(efx, 3, 0x0027, 0x0013); in qt2025c_select_phy_mode()
275 ef4_mdio_write(efx, 3, 0x0028, 0xa528); in qt2025c_select_phy_mode()
276 ef4_mdio_write(efx, 1, 0xd006, 0x000a); in qt2025c_select_phy_mode()
277 ef4_mdio_write(efx, 1, 0xd007, 0x0009); in qt2025c_select_phy_mode()
278 ef4_mdio_write(efx, 1, 0xd008, 0x0004); in qt2025c_select_phy_mode()
283 ef4_mdio_write(efx, 1, 0xc317, 0x00ff); in qt2025c_select_phy_mode()
288 ef4_mdio_write(efx, 1, 0xc300, 0x0002); in qt2025c_select_phy_mode()
296 if (rc < 0) { in qt2025c_select_phy_mode()
303 return 0; in qt2025c_select_phy_mode()
314 if (rc < 0) in qt202x_reset_phy()
323 if (rc < 0) in qt202x_reset_phy()
332 return 0; in qt202x_reset_phy()
349 phy_data->bug17190_timer = 0; in qt202x_phy_probe()
354 return 0; in qt202x_phy_probe()
377 return 0; in qt202x_phy_init()
434 return 0; in qt202x_phy_reconfigure()
455 return 0; in qt202x_phy_get_module_info()
465 reg_base = 0xd000; in qt202x_phy_get_module_eeprom()
468 reg_base = 0x8007; in qt202x_phy_get_module_eeprom()
471 for (i = 0; i < ee->len; i++) { in qt202x_phy_get_module_eeprom()
473 if (rc < 0) in qt202x_phy_get_module_eeprom()
478 return 0; in qt202x_phy_get_module_eeprom()