Lines Matching refs:hal

166 	val = sc->hal.mtkswitch_read(sc, MTKSWITCH_REG32(reg));  in mtkswitch_reg_read()
178 tmp = sc->hal.mtkswitch_read(sc, MTKSWITCH_REG32(reg)); in mtkswitch_reg_write()
186 sc->hal.mtkswitch_write(sc, MTKSWITCH_REG32(reg), tmp); in mtkswitch_reg_write()
229 val = sc->hal.mtkswitch_read(sc, MTKSWITCH_PCR(port)); in mtkswitch_port_init()
231 sc->hal.mtkswitch_write(sc, MTKSWITCH_PCR(port), val); in mtkswitch_port_init()
234 val = sc->hal.mtkswitch_read(sc, MTKSWITCH_PVC(port)); in mtkswitch_port_init()
236 sc->hal.mtkswitch_write(sc, MTKSWITCH_PVC(port), val); in mtkswitch_port_init()
243 sc->hal.mtkswitch_write(sc, MTKSWITCH_PMCR(port), val); in mtkswitch_port_init()
253 val = sc->hal.mtkswitch_read(sc, MTKSWITCH_PMSR(port)); in mtkswitch_get_port_status()
281 while (sc->hal.mtkswitch_read(sc, MTKSWITCH_ATC) & ATC_BUSY); in mtkswitch_atu_flush()
282 sc->hal.mtkswitch_write(sc, MTKSWITCH_ATC, ATC_BUSY | in mtkswitch_atu_flush()
284 while (sc->hal.mtkswitch_read(sc, MTKSWITCH_ATC) & ATC_BUSY); in mtkswitch_atu_flush()
307 err = sc->hal.mtkswitch_vlan_set_pvid(sc, p->es_port, in mtkswitch_port_vlan_setup()
328 sc->hal.mtkswitch_vlan_get_pvid(sc, p->es_port, &p->es_pvid); in mtkswitch_port_vlan_get()
345 while (sc->hal.mtkswitch_read(sc, MTKSWITCH_VTCR) & VTCR_BUSY); in mtkswitch_invalidate_vlan()
346 sc->hal.mtkswitch_write(sc, MTKSWITCH_VTCR, VTCR_BUSY | in mtkswitch_invalidate_vlan()
348 while (sc->hal.mtkswitch_read(sc, MTKSWITCH_VTCR) & VTCR_BUSY); in mtkswitch_invalidate_vlan()
362 val = sc->hal.mtkswitch_read(sc, MTKSWITCH_VTIM(i)); in mtkswitch_vlan_init_hw()
365 sc->hal.mtkswitch_write(sc, MTKSWITCH_VTIM(i), val); in mtkswitch_vlan_init_hw()
380 sc->hal.mtkswitch_write(sc, MTKSWITCH_VAWD1, val); in mtkswitch_vlan_init_hw()
381 sc->hal.mtkswitch_write(sc, MTKSWITCH_VAWD2, 0); in mtkswitch_vlan_init_hw()
383 sc->hal.mtkswitch_write(sc, MTKSWITCH_VTCR, val); in mtkswitch_vlan_init_hw()
387 sc->hal.mtkswitch_vlan_set_pvid(sc, i, 1); in mtkswitch_vlan_init_hw()
413 v->es_vid = (sc->hal.mtkswitch_read(sc, in mtkswitch_vlan_getvgroup()
420 while (sc->hal.mtkswitch_read(sc, MTKSWITCH_VTCR) & VTCR_BUSY); in mtkswitch_vlan_getvgroup()
421 sc->hal.mtkswitch_write(sc, MTKSWITCH_VTCR, VTCR_BUSY | in mtkswitch_vlan_getvgroup()
423 while ((val = sc->hal.mtkswitch_read(sc, MTKSWITCH_VTCR)) & VTCR_BUSY); in mtkswitch_vlan_getvgroup()
429 val = sc->hal.mtkswitch_read(sc, MTKSWITCH_VAWD1); in mtkswitch_vlan_getvgroup()
438 val = sc->hal.mtkswitch_read(sc, MTKSWITCH_VAWD2); in mtkswitch_vlan_getvgroup()
464 while (sc->hal.mtkswitch_read(sc, MTKSWITCH_VTCR) & VTCR_BUSY); in mtkswitch_vlan_setvgroup()
466 val = sc->hal.mtkswitch_read(sc, in mtkswitch_vlan_setvgroup()
470 sc->hal.mtkswitch_write(sc, MTKSWITCH_VTIM(v->es_vlangroup), in mtkswitch_vlan_setvgroup()
479 sc->hal.mtkswitch_write(sc, MTKSWITCH_VAWD1, val); in mtkswitch_vlan_setvgroup()
486 sc->hal.mtkswitch_write(sc, MTKSWITCH_VAWD2, val); in mtkswitch_vlan_setvgroup()
489 sc->hal.mtkswitch_write(sc, MTKSWITCH_VTCR, VTCR_BUSY | in mtkswitch_vlan_setvgroup()
491 while ((val = sc->hal.mtkswitch_read(sc, MTKSWITCH_VTCR)) & VTCR_BUSY); in mtkswitch_vlan_setvgroup()
507 *pvid = sc->hal.mtkswitch_read(sc, MTKSWITCH_PPBV1(port)); in mtkswitch_vlan_get_pvid()
520 sc->hal.mtkswitch_write(sc, MTKSWITCH_PPBV1(port), val); in mtkswitch_vlan_set_pvid()
521 sc->hal.mtkswitch_write(sc, MTKSWITCH_PPBV2(port), val); in mtkswitch_vlan_set_pvid()
539 sc->hal.mtkswitch_read = mtkswitch_reg_read32_mt7621; in mtk_attach_switch_mt7620()
540 sc->hal.mtkswitch_write = mtkswitch_reg_write32_mt7621; in mtk_attach_switch_mt7620()
543 sc->hal.mtkswitch_read = mtkswitch_reg_read32; in mtk_attach_switch_mt7620()
544 sc->hal.mtkswitch_write = mtkswitch_reg_write32; in mtk_attach_switch_mt7620()
547 sc->hal.mtkswitch_reset = mtkswitch_reset; in mtk_attach_switch_mt7620()
548 sc->hal.mtkswitch_hw_setup = mtkswitch_hw_setup; in mtk_attach_switch_mt7620()
549 sc->hal.mtkswitch_hw_global_setup = mtkswitch_hw_global_setup; in mtk_attach_switch_mt7620()
550 sc->hal.mtkswitch_port_init = mtkswitch_port_init; in mtk_attach_switch_mt7620()
551 sc->hal.mtkswitch_get_port_status = mtkswitch_get_port_status; in mtk_attach_switch_mt7620()
552 sc->hal.mtkswitch_atu_flush = mtkswitch_atu_flush; in mtk_attach_switch_mt7620()
553 sc->hal.mtkswitch_port_vlan_setup = mtkswitch_port_vlan_setup; in mtk_attach_switch_mt7620()
554 sc->hal.mtkswitch_port_vlan_get = mtkswitch_port_vlan_get; in mtk_attach_switch_mt7620()
555 sc->hal.mtkswitch_vlan_init_hw = mtkswitch_vlan_init_hw; in mtk_attach_switch_mt7620()
556 sc->hal.mtkswitch_vlan_getvgroup = mtkswitch_vlan_getvgroup; in mtk_attach_switch_mt7620()
557 sc->hal.mtkswitch_vlan_setvgroup = mtkswitch_vlan_setvgroup; in mtk_attach_switch_mt7620()
558 sc->hal.mtkswitch_vlan_get_pvid = mtkswitch_vlan_get_pvid; in mtk_attach_switch_mt7620()
559 sc->hal.mtkswitch_vlan_set_pvid = mtkswitch_vlan_set_pvid; in mtk_attach_switch_mt7620()
560 sc->hal.mtkswitch_phy_read = mtkswitch_phy_read; in mtk_attach_switch_mt7620()
561 sc->hal.mtkswitch_phy_write = mtkswitch_phy_write; in mtk_attach_switch_mt7620()
562 sc->hal.mtkswitch_reg_read = mtkswitch_reg_read; in mtk_attach_switch_mt7620()
563 sc->hal.mtkswitch_reg_write = mtkswitch_reg_write; in mtk_attach_switch_mt7620()