Lines Matching refs:mac_regs
88 void *addr = vptr->mac_regs; in velocity_set_power_state()
104 static void mac_get_cam_mask(struct mac_regs __iomem *regs, u8 *mask) in mac_get_cam_mask()
131 static void mac_set_cam_mask(struct mac_regs __iomem *regs, u8 *mask) in mac_set_cam_mask()
149 static void mac_set_vlan_cam_mask(struct mac_regs __iomem *regs, u8 *mask) in mac_set_vlan_cam_mask()
175 static void mac_set_cam(struct mac_regs __iomem *regs, int idx, const u8 *addr) in mac_set_cam()
199 static void mac_set_vlan_cam(struct mac_regs __iomem *regs, int idx, in mac_set_vlan_cam()
230 static void mac_wol_reset(struct mac_regs __iomem *regs) in mac_wol_reset()
506 struct mac_regs __iomem *regs = vptr->mac_regs; in velocity_init_cam_filter()
568 struct mac_regs __iomem *regs = vptr->mac_regs; in velocity_rx_reset()
627 static void safe_disable_mii_autopoll(struct mac_regs __iomem *regs) in safe_disable_mii_autopoll()
647 static void enable_mii_autopoll(struct mac_regs __iomem *regs) in enable_mii_autopoll()
679 static int velocity_mii_read(struct mac_regs __iomem *regs, u8 index, u16 *data) in velocity_mii_read()
712 static u32 mii_check_media_mode(struct mac_regs __iomem *regs) in mii_check_media_mode()
757 static int velocity_mii_write(struct mac_regs __iomem *regs, u8 mii_addr, u16 data) in velocity_mii_write()
799 MII_REG_BITS_OFF(ADVERTISE_PAUSE_CAP, MII_ADVERTISE, vptr->mac_regs); in set_mii_flow_control()
800 MII_REG_BITS_ON(ADVERTISE_PAUSE_ASYM, MII_ADVERTISE, vptr->mac_regs); in set_mii_flow_control()
804 MII_REG_BITS_ON(ADVERTISE_PAUSE_CAP, MII_ADVERTISE, vptr->mac_regs); in set_mii_flow_control()
805 MII_REG_BITS_ON(ADVERTISE_PAUSE_ASYM, MII_ADVERTISE, vptr->mac_regs); in set_mii_flow_control()
809 MII_REG_BITS_ON(ADVERTISE_PAUSE_CAP, MII_ADVERTISE, vptr->mac_regs); in set_mii_flow_control()
810 MII_REG_BITS_OFF(ADVERTISE_PAUSE_ASYM, MII_ADVERTISE, vptr->mac_regs); in set_mii_flow_control()
814 MII_REG_BITS_OFF(ADVERTISE_PAUSE_CAP, MII_ADVERTISE, vptr->mac_regs); in set_mii_flow_control()
815 MII_REG_BITS_OFF(ADVERTISE_PAUSE_ASYM, MII_ADVERTISE, vptr->mac_regs); in set_mii_flow_control()
830 if (MII_REG_BITS_IS_ON(BMCR_ANENABLE, MII_BMCR, vptr->mac_regs)) in mii_set_auto_on()
831 MII_REG_BITS_ON(BMCR_ANRESTART, MII_BMCR, vptr->mac_regs); in mii_set_auto_on()
833 MII_REG_BITS_ON(BMCR_ANENABLE, MII_BMCR, vptr->mac_regs); in mii_set_auto_on()
836 static u32 check_connection_type(struct mac_regs __iomem *regs) in check_connection_type()
881 struct mac_regs __iomem *regs = vptr->mac_regs; in velocity_set_media_mode()
883 vptr->mii_status = mii_check_media_mode(vptr->mac_regs); in velocity_set_media_mode()
889 MII_REG_BITS_ON(AUXCR_MDPPS, MII_NCONFIG, vptr->mac_regs); in velocity_set_media_mode()
899 …_100FULL | ADVERTISE_100HALF | ADVERTISE_10FULL | ADVERTISE_10HALF, MII_ADVERTISE, vptr->mac_regs); in velocity_set_media_mode()
900 MII_REG_BITS_ON(ADVERTISE_1000FULL | ADVERTISE_1000HALF, MII_CTRL1000, vptr->mac_regs); in velocity_set_media_mode()
901 MII_REG_BITS_ON(BMCR_SPEED1000, MII_BMCR, vptr->mac_regs); in velocity_set_media_mode()
943 velocity_mii_read(vptr->mac_regs, MII_CTRL1000, &CTRL1000); in velocity_set_media_mode()
949 velocity_mii_write(vptr->mac_regs, MII_CTRL1000, CTRL1000); in velocity_set_media_mode()
957 velocity_mii_read(vptr->mac_regs, MII_ADVERTISE, &ANAR); in velocity_set_media_mode()
970 velocity_mii_write(vptr->mac_regs, MII_ADVERTISE, ANAR); in velocity_set_media_mode()
1057 struct mac_regs __iomem *regs = vptr->mac_regs; in enable_flow_control_ability()
1108 struct mac_regs __iomem *regs = vptr->mac_regs; in velocity_soft_reset()
1139 struct mac_regs __iomem *regs = vptr->mac_regs; in velocity_set_multi()
1192 MII_ADVERTISE, vptr->mac_regs); in mii_init()
1195 vptr->mac_regs); in mii_init()
1198 vptr->mac_regs); in mii_init()
1199 MII_REG_BITS_ON(PLED_LALBE, MII_TPISTATUS, vptr->mac_regs); in mii_init()
1205 MII_REG_BITS_OFF((ADVERTISE_PAUSE_ASYM | ADVERTISE_PAUSE_CAP), MII_ADVERTISE, vptr->mac_regs); in mii_init()
1212 MII_REG_BITS_ON(TCSR_ECHODIS, MII_SREVISION, vptr->mac_regs); in mii_init()
1214 MII_REG_BITS_OFF(TCSR_ECHODIS, MII_SREVISION, vptr->mac_regs); in mii_init()
1218 MII_REG_BITS_ON(PLED_LALBE, MII_TPISTATUS, vptr->mac_regs); in mii_init()
1225 MII_REG_BITS_ON((ADVERTISE_PAUSE_ASYM | ADVERTISE_PAUSE_CAP), MII_ADVERTISE, vptr->mac_regs); in mii_init()
1232 MII_REG_BITS_ON(TCSR_ECHODIS, MII_SREVISION, vptr->mac_regs); in mii_init()
1234 MII_REG_BITS_OFF(TCSR_ECHODIS, MII_SREVISION, vptr->mac_regs); in mii_init()
1242 MII_REG_BITS_ON(PSCR_ACRSTX, MII_REG_PSCR, vptr->mac_regs); in mii_init()
1246 MII_REG_BITS_ON((ADVERTISE_PAUSE_ASYM | ADVERTISE_PAUSE_CAP), MII_ADVERTISE, vptr->mac_regs); in mii_init()
1251 velocity_mii_read(vptr->mac_regs, MII_BMCR, &BMCR); in mii_init()
1254 velocity_mii_write(vptr->mac_regs, MII_BMCR, BMCR); in mii_init()
1278 writeb(txqueue_timer, &vptr->mac_regs->TQETMR); in setup_queue_timers()
1279 writeb(rxqueue_timer, &vptr->mac_regs->RQETMR); in setup_queue_timers()
1292 struct mac_regs __iomem *regs = vptr->mac_regs; in setup_adaptive_interrupts()
1331 struct mac_regs __iomem *regs = vptr->mac_regs; in velocity_init_registers()
1448 struct mac_regs __iomem *regs = vptr->mac_regs; in velocity_give_many_rx_descs()
1824 struct mac_regs __iomem *regs = vptr->mac_regs; in velocity_error()
1837 struct mac_regs __iomem *regs = vptr->mac_regs; in velocity_error()
1896 mac_rx_queue_wake(vptr->mac_regs); in velocity_error()
2173 mac_enable_int(vptr->mac_regs); in velocity_poll()
2197 isr_status = mac_read_isr(vptr->mac_regs); in velocity_intr()
2206 mac_write_isr(vptr->mac_regs, isr_status); in velocity_intr()
2209 mac_disable_int(vptr->mac_regs); in velocity_intr()
2256 mac_enable_int(vptr->mac_regs); in velocity_open()
2273 struct mac_regs __iomem *regs = vptr->mac_regs; in velocity_shutdown()
2347 mac_enable_int(vptr->mac_regs); in velocity_change_mtu()
2391 struct mac_regs __iomem *regs = vptr->mac_regs; in velocity_mii_ioctl()
2401 if (velocity_mii_read(vptr->mac_regs, miidata->reg_num & 0x1f, &(miidata->val_out)) < 0) in velocity_mii_ioctl()
2406 err = velocity_mii_write(vptr->mac_regs, miidata->reg_num & 0x1f, miidata->val_in); in velocity_mii_ioctl()
2408 check_connection_type(vptr->mac_regs); in velocity_mii_ioctl()
2624 mac_tx_queue_wake(vptr->mac_regs, qnum); in velocity_xmit()
2747 struct mac_regs __iomem *regs = vptr->mac_regs; in velocity_get_link()
2768 struct mac_regs __iomem *regs; in velocity_probe()
2817 vptr->mac_regs = regs; in velocity_probe()
2843 vptr->phy_id = MII_GET_PHY_ID(vptr->mac_regs); in velocity_probe()
2902 iounmap(vptr->mac_regs); in velocity_remove()
3017 struct mac_regs __iomem *regs = vptr->mac_regs; in velocity_set_wol()
3072 MII_REG_BITS_ON(AUXCR_MDPPS, MII_NCONFIG, vptr->mac_regs); in velocity_set_wol()
3074 MII_REG_BITS_OFF(ADVERTISE_1000FULL | ADVERTISE_1000HALF, MII_CTRL1000, vptr->mac_regs); in velocity_set_wol()
3078 MII_REG_BITS_ON(BMCR_ANRESTART, MII_BMCR, vptr->mac_regs); in velocity_set_wol()
3112 struct mac_regs __iomem *regs = vptr->mac_regs; in velocity_save_context()
3172 struct mac_regs __iomem *regs = vptr->mac_regs; in velocity_restore_context()
3214 mac_wol_reset(vptr->mac_regs); in velocity_resume()
3219 mac_disable_int(vptr->mac_regs); in velocity_resume()
3225 mac_tx_queue_wake(vptr->mac_regs, i); in velocity_resume()
3228 mac_enable_int(vptr->mac_regs); in velocity_resume()
3301 struct mac_regs __iomem *regs = vptr->mac_regs; in velocity_get_link_ksettings()
3305 status = check_connection_type(vptr->mac_regs); in velocity_get_link_ksettings()
3381 curr_status = check_connection_type(vptr->mac_regs); in velocity_set_link_ksettings()
3564 mac_disable_int(vptr->mac_regs); in velocity_set_coalesce()
3568 mac_write_int_mask(vptr->int_mask, vptr->mac_regs); in velocity_set_coalesce()
3569 mac_clear_isr(vptr->mac_regs); in velocity_set_coalesce()
3570 mac_enable_int(vptr->mac_regs); in velocity_set_coalesce()