Lines Matching +full:0 +full:xc400
39 AQ_LINK_STAT = 0xe800,
42 AQ_XAUI_RX_CFG = 0xc400,
43 AQ_XAUI_KX_CFG = 0xc440,
44 AQ_XAUI_TX_CFG = 0xe400,
47 AQ_100M_CTRL = 0x0010,
48 AQ_10G_CTRL = 0x0020,
49 AQ_1G_CTRL = 0xc400,
50 AQ_ANEG_STAT = 0xc800,
53 AQ_FW_VERSION = 0x0020,
54 AQ_THERMAL_THR = 0xc421,
55 AQ_THERMAL1 = 0xc820,
56 AQ_THERMAL2 = 0xc821,
57 AQ_IFLAG_GLOBAL = 0xfc00,
58 AQ_IMASK_GLOBAL = 0xff00,
61 #define AQBIT(x) (1 << (0x##x))
68 for (i = 0; i < ARRAY_SIZE(regs); i++) { \
71 } while (0)
74 for (i = 0; i < ARRAY_SIZE(regs); i++) { \
77 } while (0)
80 * Return value is temperature in celsius, 0xffff for error or don't know.
88 v == 0xffff || (v & 1) != 1) in aq100x_temperature()
89 return (0xffff); in aq100x_temperature()
92 return (0xffff); in aq100x_temperature()
100 return mdio_write(phy, MDIO_DEV_VEND1, AQ_THERMAL_THR, 0x6c00); in aq100x_set_defaults()
121 {MDIO_DEV_VEND1, 0xd400, AQBIT(e)}, in aq100x_intr_enable()
122 {MDIO_DEV_VEND1, 0xff01, AQBIT(2)}, in aq100x_intr_enable()
123 {MDIO_DEV_VEND1, AQ_IMASK_GLOBAL, AQBIT(0)} in aq100x_intr_enable()
128 return (0); in aq100x_intr_enable()
139 {MDIO_DEV_VEND1, 0xd400, 0}, in aq100x_intr_disable()
140 {MDIO_DEV_VEND1, 0xff01, 0}, in aq100x_intr_disable()
141 {MDIO_DEV_VEND1, AQ_IMASK_GLOBAL, 0} in aq100x_intr_disable()
146 return (0); in aq100x_intr_disable()
156 {MDIO_DEV_VEND1, 0xcc00}, in aq100x_intr_clear()
162 return (0); in aq100x_intr_clear()
171 err = mdio_read(phy, MDIO_DEV_VEND1, 0xfc01, &cause); in aq100x_vendor_intr()
176 err = mdio_read(phy, MDIO_DEV_VEND1, 0xcc00, &v); in aq100x_vendor_intr()
185 phy->addr ? F_GPIO10_OUT_VAL : F_GPIO6_OUT_VAL, 0); in aq100x_vendor_intr()
195 " (0x%x)\n", phy->addr, cause); in aq100x_vendor_intr()
197 return (0); in aq100x_vendor_intr()
204 int err, rc = 0; in aq100x_intr_handler()
211 if (cause & AQBIT(0)) { in aq100x_intr_handler()
215 cause &= ~AQBIT(0); in aq100x_intr_handler()
219 CH_WARN(phy->adapter, "PHY%d: unhandled interrupt (0x%x)\n", in aq100x_intr_handler()
232 off ? BMCR_PDOWN : 0); in aq100x_power_down()
246 CH_WARN(phy->adapter, "PHY%d: power-up timed out (0x%x).\n", in aq100x_power_down()
251 return (0); in aq100x_power_down()
259 err = aq100x_power_down(phy, 0); in aq100x_autoneg_enable()
280 adv = 0; in aq100x_advertise()
289 adv = 0; in aq100x_advertise()
300 adv = 0; in aq100x_advertise()
309 err = t3_mdio_change_bits(phy, MDIO_DEV_ANEG, AQ_100M_CTRL, 0xfe0, adv); in aq100x_advertise()
318 BMCR_LOOPBACK, enable ? BMCR_LOOPBACK : 0); in aq100x_set_loopback()
339 BMCR_RESET | BMCR_ANENABLE | BMCR_ANRESTART, 0); in aq100x_set_speed_duplex()
348 return (0); in aq100x_set_speed_duplex()
356 unsigned int v, link = 0; in aq100x_get_link_status()
361 if (v == 0xffff || !(v & 1)) in aq100x_get_link_status()
367 if (v & 0x8000) in aq100x_get_link_status()
374 if ((v & 0x20) == 0) in aq100x_get_link_status()
382 switch (v & 0x6) { in aq100x_get_link_status()
383 case 0x6: *speed = SPEED_10000; in aq100x_get_link_status()
385 case 0x4: *speed = SPEED_1000; in aq100x_get_link_status()
387 case 0x2: *speed = SPEED_100; in aq100x_get_link_status()
389 case 0x0: *speed = SPEED_10; in aq100x_get_link_status()
399 err = mdio_read(phy, MDIO_DEV_ANEG, 0x13, &lpa); in aq100x_get_link_status()
416 *fc = 0; in aq100x_get_link_status()
444 return (0); in aq100x_get_link_status()
480 t3_set_reg_field(adapter, A_T3DBG_GPIO_EN, gpio, 0); in t3_aq100x_phy_prep()
491 if (err || v == 0xffff) { in t3_aq100x_phy_prep()
495 CH_WARN(adapter, "PHY%d: reset failed (0x%x, 0x%x).\n", in t3_aq100x_phy_prep()
505 CH_WARN(adapter, "PHY%d: reset timed out (0x%x).\n", in t3_aq100x_phy_prep()
513 if (v < 0x115) in t3_aq100x_phy_prep()
515 v >> 8, v & 0xff); in t3_aq100x_phy_prep()
519 if ((v & BMCR_PDOWN) == 0) in t3_aq100x_phy_prep()
526 v = v2 = 0; in t3_aq100x_phy_prep()
529 if (v != 0x1b || v2 != 0x1b) in t3_aq100x_phy_prep()
531 "(0x%x, 0x%x).\n", phy_addr, v, v2); in t3_aq100x_phy_prep()
532 v = 0; in t3_aq100x_phy_prep()
534 if ((v & 0xf) != 0xf) in t3_aq100x_phy_prep()
536 "(0x%x).\n", phy_addr, v); in t3_aq100x_phy_prep()