Lines Matching refs:dat1
548 static int lan9303_alr_make_entry_raw(struct lan9303 *chip, u32 dat0, u32 dat1) in lan9303_alr_make_entry_raw() argument
551 lan9303_write_switch_reg(chip, LAN9303_SWE_ALR_WR_DAT_1, dat1); in lan9303_alr_make_entry_raw()
560 typedef void alr_loop_cb_t(struct lan9303 *chip, u32 dat0, u32 dat1,
573 u32 dat0, dat1; in lan9303_alr_loop() local
577 lan9303_read_switch_reg(chip, LAN9303_SWE_ALR_RD_DAT_1, &dat1); in lan9303_alr_loop()
578 if (dat1 & LAN9303_ALR_DAT1_END_OF_TABL) in lan9303_alr_loop()
581 alrport = (dat1 & LAN9303_ALR_DAT1_PORT_MASK) >> in lan9303_alr_loop()
585 cb(chip, dat0, dat1, portmap, ctx); in lan9303_alr_loop()
594 static void alr_reg_to_mac(u32 dat0, u32 dat1, u8 mac[6]) in alr_reg_to_mac() argument
600 mac[4] = (dat1 >> 0) & 0xff; in alr_reg_to_mac()
601 mac[5] = (dat1 >> 8) & 0xff; in alr_reg_to_mac()
610 u32 dat1, int portmap, void *ctx) in alr_loop_cb_del_port_learned() argument
615 if (((BIT(port) & portmap) == 0) || (dat1 & LAN9303_ALR_DAT1_STATIC)) in alr_loop_cb_del_port_learned()
619 dat1 &= ~LAN9303_ALR_DAT1_VALID; /* delete entry */ in alr_loop_cb_del_port_learned()
620 lan9303_alr_make_entry_raw(chip, dat0, dat1); in alr_loop_cb_del_port_learned()
630 u32 dat1, int portmap, void *ctx) in alr_loop_cb_fdb_port_dump() argument
639 alr_reg_to_mac(dat0, dat1, mac); in alr_loop_cb_fdb_port_dump()
640 is_static = !!(dat1 & LAN9303_ALR_DAT1_STATIC); in alr_loop_cb_fdb_port_dump()
648 u32 dat0, dat1, alr_port; in lan9303_alr_set_entry() local
651 dat1 = LAN9303_ALR_DAT1_STATIC; in lan9303_alr_set_entry()
653 dat1 |= LAN9303_ALR_DAT1_VALID; in lan9303_alr_set_entry()
656 dat1 |= LAN9303_ALR_DAT1_AGE_OVERRID; in lan9303_alr_set_entry()
659 dat1 &= ~LAN9303_ALR_DAT1_PORT_MASK; in lan9303_alr_set_entry()
660 dat1 |= alr_port << LAN9303_ALR_DAT1_PORT_BITOFFS; in lan9303_alr_set_entry()
668 dat1 |= (mac[4] << 0); in lan9303_alr_set_entry()
669 dat1 |= (mac[5] << 8); in lan9303_alr_set_entry()
671 lan9303_alr_make_entry_raw(chip, dat0, dat1); in lan9303_alr_set_entry()