Lines Matching refs:alu_table
469 u32 alu_table[4]; in ksz9477_fdb_add() local
495 ksz9477_read_table(dev, alu_table); in ksz9477_fdb_add()
498 alu_table[0] = ALU_V_STATIC_VALID; in ksz9477_fdb_add()
499 alu_table[1] |= BIT(port); in ksz9477_fdb_add()
501 alu_table[1] |= ALU_V_USE_FID; in ksz9477_fdb_add()
502 alu_table[2] = (vid << ALU_V_FID_S); in ksz9477_fdb_add()
503 alu_table[2] |= ((addr[0] << 8) | addr[1]); in ksz9477_fdb_add()
504 alu_table[3] = ((addr[2] << 24) | (addr[3] << 16)); in ksz9477_fdb_add()
505 alu_table[3] |= ((addr[4] << 8) | addr[5]); in ksz9477_fdb_add()
507 ksz9477_write_table(dev, alu_table); in ksz9477_fdb_add()
525 u32 alu_table[4]; in ksz9477_fdb_del() local
550 ksz_read32(dev, REG_SW_ALU_VAL_A, &alu_table[0]); in ksz9477_fdb_del()
551 if (alu_table[0] & ALU_V_STATIC_VALID) { in ksz9477_fdb_del()
552 ksz_read32(dev, REG_SW_ALU_VAL_B, &alu_table[1]); in ksz9477_fdb_del()
553 ksz_read32(dev, REG_SW_ALU_VAL_C, &alu_table[2]); in ksz9477_fdb_del()
554 ksz_read32(dev, REG_SW_ALU_VAL_D, &alu_table[3]); in ksz9477_fdb_del()
557 alu_table[1] &= ~BIT(port); in ksz9477_fdb_del()
560 if ((alu_table[1] & ALU_V_PORT_MAP) == 0) { in ksz9477_fdb_del()
561 alu_table[0] = 0; in ksz9477_fdb_del()
562 alu_table[1] = 0; in ksz9477_fdb_del()
563 alu_table[2] = 0; in ksz9477_fdb_del()
564 alu_table[3] = 0; in ksz9477_fdb_del()
567 alu_table[0] = 0; in ksz9477_fdb_del()
568 alu_table[1] = 0; in ksz9477_fdb_del()
569 alu_table[2] = 0; in ksz9477_fdb_del()
570 alu_table[3] = 0; in ksz9477_fdb_del()
573 ksz9477_write_table(dev, alu_table); in ksz9477_fdb_del()
588 static void ksz9477_convert_alu(struct alu_struct *alu, u32 *alu_table) in ksz9477_convert_alu() argument
590 alu->is_static = !!(alu_table[0] & ALU_V_STATIC_VALID); in ksz9477_convert_alu()
591 alu->is_src_filter = !!(alu_table[0] & ALU_V_SRC_FILTER); in ksz9477_convert_alu()
592 alu->is_dst_filter = !!(alu_table[0] & ALU_V_DST_FILTER); in ksz9477_convert_alu()
593 alu->prio_age = (alu_table[0] >> ALU_V_PRIO_AGE_CNT_S) & in ksz9477_convert_alu()
595 alu->mstp = alu_table[0] & ALU_V_MSTP_M; in ksz9477_convert_alu()
597 alu->is_override = !!(alu_table[1] & ALU_V_OVERRIDE); in ksz9477_convert_alu()
598 alu->is_use_fid = !!(alu_table[1] & ALU_V_USE_FID); in ksz9477_convert_alu()
599 alu->port_forward = alu_table[1] & ALU_V_PORT_MAP; in ksz9477_convert_alu()
601 alu->fid = (alu_table[2] >> ALU_V_FID_S) & ALU_V_FID_M; in ksz9477_convert_alu()
603 alu->mac[0] = (alu_table[2] >> 8) & 0xFF; in ksz9477_convert_alu()
604 alu->mac[1] = alu_table[2] & 0xFF; in ksz9477_convert_alu()
605 alu->mac[2] = (alu_table[3] >> 24) & 0xFF; in ksz9477_convert_alu()
606 alu->mac[3] = (alu_table[3] >> 16) & 0xFF; in ksz9477_convert_alu()
607 alu->mac[4] = (alu_table[3] >> 8) & 0xFF; in ksz9477_convert_alu()
608 alu->mac[5] = alu_table[3] & 0xFF; in ksz9477_convert_alu()
616 u32 alu_table[4]; in ksz9477_fdb_dump() local
644 ksz9477_read_table(dev, alu_table); in ksz9477_fdb_dump()
646 ksz9477_convert_alu(&alu, alu_table); in ksz9477_fdb_dump()