static void phy_dport_clear(a_uint32_t dev_id, a_uint32_t phy_id, a_uint32_t dport_addr, a_uint16_t val_mask) { a_uint16_t phy_data; sw_error_t rv; HSL_PHY_SET(rv, dev_id, phy_id, F1_DEBUG_PORT_ADDRESS, dport_addr); HSL_PHY_GET(rv, dev_id, phy_id, F1_DEBUG_PORT_DATA, &phy_data); phy_data &= ~val_mask; HSL_PHY_SET(rv, dev_id, phy_id, F1_DEBUG_PORT_DATA, phy_data); }
static a_uint16_t _phy_reg_read(a_uint32_t dev_id, a_uint32_t phy_addr, a_uint32_t reg) { sw_error_t rv; a_uint16_t val; HSL_PHY_GET(rv, dev_id, phy_addr, reg, &val); if (SW_OK != rv) return 0xFFFF; return val; }