Lines Matching refs:ale_entry

1405 cpsw_ale_entry_init(uint32_t *ale_entry)
1407 ale_entry[0] = ale_entry[1] = ale_entry[2] = 0;
1411 cpsw_ale_entry_set_mac(uint32_t *ale_entry, const uint8_t *mac)
1413 ale_entry[0] = mac[2] << 24 | mac[3] << 16 | mac[4] << 8 | mac[5];
1414 ale_entry[1] = mac[0] << 8 | mac[1];
1418 cpsw_ale_entry_set_bcast_mac(uint32_t *ale_entry)
1420 ale_entry[0] = 0xffffffff;
1421 ale_entry[1] = 0x0000ffff;
1425 cpsw_ale_entry_set(uint32_t *ale_entry, ale_entry_field_t field, uint32_t val)
1431 ale_entry[1] |= (val & 0x3) << 28;
1435 ale_entry[1] |= (val & 0x3) << 30;
1439 ale_entry[2] |= (val & 0x7) << 2;
1443 ale_entry[2] |= (val & 0x3) << 2;
1453 cpsw_ale_entry_mac_match(const uint32_t *ale_entry, const uint8_t *mac)
1455 return (((ale_entry[1] >> 8) & 0xff) == mac[0]) &&
1456 (((ale_entry[1] >> 0) & 0xff) == mac[1]) &&
1457 (((ale_entry[0] >>24) & 0xff) == mac[2]) &&
1458 (((ale_entry[0] >>16) & 0xff) == mac[3]) &&
1459 (((ale_entry[0] >> 8) & 0xff) == mac[4]) &&
1460 (((ale_entry[0] >> 0) & 0xff) == mac[5]);
1473 cpsw_ale_read_entry(struct cpsw_softc *sc, uint16_t idx, uint32_t *ale_entry)
1476 ale_entry[0] = cpsw_read_4(sc, CPSW_ALE_TBLW0);
1477 ale_entry[1] = cpsw_read_4(sc, CPSW_ALE_TBLW1);
1478 ale_entry[2] = cpsw_read_4(sc, CPSW_ALE_TBLW2);
1483 const uint32_t *ale_entry)
1485 cpsw_write_4(sc, CPSW_ALE_TBLW0, ale_entry[0]);
1486 cpsw_write_4(sc, CPSW_ALE_TBLW1, ale_entry[1]);
1487 cpsw_write_4(sc, CPSW_ALE_TBLW2, ale_entry[2]);
1495 uint32_t ale_entry[3];
1499 cpsw_ale_read_entry(sc, i, ale_entry);
1500 if (((ale_entry[1] >> 28) & 3) == 1 && /* Address entry */
1501 ((ale_entry[1] >> 8) & 1) == 1) { /* MCast link addr */
1502 ale_entry[0] = ale_entry[1] = ale_entry[2] = 0;
1503 cpsw_ale_write_entry(sc, i, ale_entry);
1513 uint32_t ale_entry[3];
1517 cpsw_ale_read_entry(sc, i, ale_entry);
1520 if (free_index < 0 && ((ale_entry[1] >> 28) & 3) == 0) {
1524 if (cpsw_ale_entry_mac_match(ale_entry, mac)) {
1536 cpsw_ale_entry_init(ale_entry);
1538 cpsw_ale_entry_set_mac(ale_entry, mac);
1539 cpsw_ale_entry_set(ale_entry, ALE_ENTRY_TYPE, ALE_TYPE_ADDRESS);
1540 cpsw_ale_entry_set(ale_entry, ALE_MCAST_FWD_STATE, ALE_FWSTATE_FWONLY);
1541 cpsw_ale_entry_set(ale_entry, ALE_PORT_MASK, portmask);
1543 cpsw_ale_write_entry(sc, i, ale_entry);
1552 uint32_t ale_entry[3];
1557 cpsw_ale_entry_init(ale_entry);
1560 cpsw_ale_entry_set_mac(ale_entry, mac);
1561 cpsw_ale_entry_set(ale_entry, ALE_ENTRY_TYPE, ALE_TYPE_ADDRESS);
1562 cpsw_ale_entry_set(ale_entry, ALE_PORT_NUMBER, 0);
1563 cpsw_ale_write_entry(sc, 0, ale_entry);
1570 cpsw_ale_entry_init(ale_entry);
1571 cpsw_ale_entry_set_bcast_mac(ale_entry);
1572 cpsw_ale_entry_set(ale_entry, ALE_ENTRY_TYPE, ALE_TYPE_ADDRESS);
1573 cpsw_ale_entry_set(ale_entry, ALE_MCAST_FWD_STATE, ALE_FWSTATE_FWONLY);
1574 cpsw_ale_entry_set(ale_entry, ALE_PORT_MASK, ALE_PORT_MASK_ALL);
1575 cpsw_ale_write_entry(sc, 1, ale_entry);