Lines Matching refs:hal

164 	val = sc->hal.mtkswitch_read(sc, MTKSWITCH_REG32(reg));  in mtkswitch_reg_read()
176 tmp = sc->hal.mtkswitch_read(sc, MTKSWITCH_REG32(reg)); in mtkswitch_reg_write()
184 sc->hal.mtkswitch_write(sc, MTKSWITCH_REG32(reg), tmp); in mtkswitch_reg_write()
227 val = sc->hal.mtkswitch_read(sc, MTKSWITCH_PCR(port)); in mtkswitch_port_init()
229 sc->hal.mtkswitch_write(sc, MTKSWITCH_PCR(port), val); in mtkswitch_port_init()
232 val = sc->hal.mtkswitch_read(sc, MTKSWITCH_PVC(port)); in mtkswitch_port_init()
234 sc->hal.mtkswitch_write(sc, MTKSWITCH_PVC(port), val); in mtkswitch_port_init()
241 sc->hal.mtkswitch_write(sc, MTKSWITCH_PMCR(port), val); in mtkswitch_port_init()
251 val = sc->hal.mtkswitch_read(sc, MTKSWITCH_PMSR(port)); in mtkswitch_get_port_status()
279 while (sc->hal.mtkswitch_read(sc, MTKSWITCH_ATC) & ATC_BUSY); in mtkswitch_atu_flush()
280 sc->hal.mtkswitch_write(sc, MTKSWITCH_ATC, ATC_BUSY | in mtkswitch_atu_flush()
282 while (sc->hal.mtkswitch_read(sc, MTKSWITCH_ATC) & ATC_BUSY); in mtkswitch_atu_flush()
305 err = sc->hal.mtkswitch_vlan_set_pvid(sc, p->es_port, in mtkswitch_port_vlan_setup()
326 sc->hal.mtkswitch_vlan_get_pvid(sc, p->es_port, &p->es_pvid); in mtkswitch_port_vlan_get()
343 while (sc->hal.mtkswitch_read(sc, MTKSWITCH_VTCR) & VTCR_BUSY); in mtkswitch_invalidate_vlan()
344 sc->hal.mtkswitch_write(sc, MTKSWITCH_VTCR, VTCR_BUSY | in mtkswitch_invalidate_vlan()
346 while (sc->hal.mtkswitch_read(sc, MTKSWITCH_VTCR) & VTCR_BUSY); in mtkswitch_invalidate_vlan()
360 val = sc->hal.mtkswitch_read(sc, MTKSWITCH_VTIM(i)); in mtkswitch_vlan_init_hw()
363 sc->hal.mtkswitch_write(sc, MTKSWITCH_VTIM(i), val); in mtkswitch_vlan_init_hw()
378 sc->hal.mtkswitch_write(sc, MTKSWITCH_VAWD1, val); in mtkswitch_vlan_init_hw()
379 sc->hal.mtkswitch_write(sc, MTKSWITCH_VAWD2, 0); in mtkswitch_vlan_init_hw()
381 sc->hal.mtkswitch_write(sc, MTKSWITCH_VTCR, val); in mtkswitch_vlan_init_hw()
385 sc->hal.mtkswitch_vlan_set_pvid(sc, i, 1); in mtkswitch_vlan_init_hw()
411 v->es_vid = (sc->hal.mtkswitch_read(sc, in mtkswitch_vlan_getvgroup()
418 while (sc->hal.mtkswitch_read(sc, MTKSWITCH_VTCR) & VTCR_BUSY); in mtkswitch_vlan_getvgroup()
419 sc->hal.mtkswitch_write(sc, MTKSWITCH_VTCR, VTCR_BUSY | in mtkswitch_vlan_getvgroup()
421 while ((val = sc->hal.mtkswitch_read(sc, MTKSWITCH_VTCR)) & VTCR_BUSY); in mtkswitch_vlan_getvgroup()
427 val = sc->hal.mtkswitch_read(sc, MTKSWITCH_VAWD1); in mtkswitch_vlan_getvgroup()
436 val = sc->hal.mtkswitch_read(sc, MTKSWITCH_VAWD2); in mtkswitch_vlan_getvgroup()
462 while (sc->hal.mtkswitch_read(sc, MTKSWITCH_VTCR) & VTCR_BUSY); in mtkswitch_vlan_setvgroup()
464 val = sc->hal.mtkswitch_read(sc, in mtkswitch_vlan_setvgroup()
468 sc->hal.mtkswitch_write(sc, MTKSWITCH_VTIM(v->es_vlangroup), in mtkswitch_vlan_setvgroup()
477 sc->hal.mtkswitch_write(sc, MTKSWITCH_VAWD1, val); in mtkswitch_vlan_setvgroup()
484 sc->hal.mtkswitch_write(sc, MTKSWITCH_VAWD2, val); in mtkswitch_vlan_setvgroup()
487 sc->hal.mtkswitch_write(sc, MTKSWITCH_VTCR, VTCR_BUSY | in mtkswitch_vlan_setvgroup()
489 while ((val = sc->hal.mtkswitch_read(sc, MTKSWITCH_VTCR)) & VTCR_BUSY); in mtkswitch_vlan_setvgroup()
505 *pvid = sc->hal.mtkswitch_read(sc, MTKSWITCH_PPBV1(port)); in mtkswitch_vlan_get_pvid()
518 sc->hal.mtkswitch_write(sc, MTKSWITCH_PPBV1(port), val); in mtkswitch_vlan_set_pvid()
519 sc->hal.mtkswitch_write(sc, MTKSWITCH_PPBV2(port), val); in mtkswitch_vlan_set_pvid()
537 sc->hal.mtkswitch_read = mtkswitch_reg_read32_mt7621; in mtk_attach_switch_mt7620()
538 sc->hal.mtkswitch_write = mtkswitch_reg_write32_mt7621; in mtk_attach_switch_mt7620()
541 sc->hal.mtkswitch_read = mtkswitch_reg_read32; in mtk_attach_switch_mt7620()
542 sc->hal.mtkswitch_write = mtkswitch_reg_write32; in mtk_attach_switch_mt7620()
545 sc->hal.mtkswitch_reset = mtkswitch_reset; in mtk_attach_switch_mt7620()
546 sc->hal.mtkswitch_hw_setup = mtkswitch_hw_setup; in mtk_attach_switch_mt7620()
547 sc->hal.mtkswitch_hw_global_setup = mtkswitch_hw_global_setup; in mtk_attach_switch_mt7620()
548 sc->hal.mtkswitch_port_init = mtkswitch_port_init; in mtk_attach_switch_mt7620()
549 sc->hal.mtkswitch_get_port_status = mtkswitch_get_port_status; in mtk_attach_switch_mt7620()
550 sc->hal.mtkswitch_atu_flush = mtkswitch_atu_flush; in mtk_attach_switch_mt7620()
551 sc->hal.mtkswitch_port_vlan_setup = mtkswitch_port_vlan_setup; in mtk_attach_switch_mt7620()
552 sc->hal.mtkswitch_port_vlan_get = mtkswitch_port_vlan_get; in mtk_attach_switch_mt7620()
553 sc->hal.mtkswitch_vlan_init_hw = mtkswitch_vlan_init_hw; in mtk_attach_switch_mt7620()
554 sc->hal.mtkswitch_vlan_getvgroup = mtkswitch_vlan_getvgroup; in mtk_attach_switch_mt7620()
555 sc->hal.mtkswitch_vlan_setvgroup = mtkswitch_vlan_setvgroup; in mtk_attach_switch_mt7620()
556 sc->hal.mtkswitch_vlan_get_pvid = mtkswitch_vlan_get_pvid; in mtk_attach_switch_mt7620()
557 sc->hal.mtkswitch_vlan_set_pvid = mtkswitch_vlan_set_pvid; in mtk_attach_switch_mt7620()
558 sc->hal.mtkswitch_phy_read = mtkswitch_phy_read; in mtk_attach_switch_mt7620()
559 sc->hal.mtkswitch_phy_write = mtkswitch_phy_write; in mtk_attach_switch_mt7620()
560 sc->hal.mtkswitch_reg_read = mtkswitch_reg_read; in mtk_attach_switch_mt7620()
561 sc->hal.mtkswitch_reg_write = mtkswitch_reg_write; in mtk_attach_switch_mt7620()