Lines Matching refs:taprio
1083 static void vsc9959_tas_min_gate_lengths(struct tc_taprio_qopt_offload *taprio, in vsc9959_tas_min_gate_lengths() argument
1098 if (!taprio) in vsc9959_tas_min_gate_lengths()
1101 n = taprio->num_entries; in vsc9959_tas_min_gate_lengths()
1111 entry = &taprio->entries[i % n]; in vsc9959_tas_min_gate_lengths()
1199 static u32 vsc9959_tas_tc_max_sdu(struct tc_taprio_qopt_offload *taprio, int tc) in vsc9959_tas_tc_max_sdu() argument
1201 if (!taprio || !taprio->max_sdu[tc]) in vsc9959_tas_tc_max_sdu()
1204 return taprio->max_sdu[tc] + ETH_HLEN + 2 * VLAN_HLEN + ETH_FCS_LEN; in vsc9959_tas_tc_max_sdu()
1217 struct tc_taprio_qopt_offload *taprio; in vsc9959_tas_guard_bands_update() local
1228 taprio = ocelot_port->taprio; in vsc9959_tas_guard_bands_update()
1275 vsc9959_tas_min_gate_lengths(taprio, min_gate_len); in vsc9959_tas_guard_bands_update()
1278 u32 requested_max_sdu = vsc9959_tas_tc_max_sdu(taprio, tc); in vsc9959_tas_guard_bands_update()
1374 if (ocelot_port->taprio) in vsc9959_sched_speed_set()
1418 struct tc_taprio_qopt_offload *taprio) in vsc9959_qos_port_tas_set() argument
1427 if (taprio->cmd == TAPRIO_CMD_DESTROY) { in vsc9959_qos_port_tas_set()
1428 ocelot_port_mqprio(ocelot, port, &taprio->mqprio); in vsc9959_qos_port_tas_set()
1432 taprio_offload_free(ocelot_port->taprio); in vsc9959_qos_port_tas_set()
1433 ocelot_port->taprio = NULL; in vsc9959_qos_port_tas_set()
1439 } else if (taprio->cmd != TAPRIO_CMD_REPLACE) { in vsc9959_qos_port_tas_set()
1444 ret = ocelot_port_mqprio(ocelot, port, &taprio->mqprio); in vsc9959_qos_port_tas_set()
1448 if (taprio->cycle_time > NSEC_PER_SEC || in vsc9959_qos_port_tas_set()
1449 taprio->cycle_time_extension >= NSEC_PER_SEC) { in vsc9959_qos_port_tas_set()
1454 if (taprio->num_entries > VSC9959_TAS_GCL_ENTRY_MAX) { in vsc9959_qos_port_tas_set()
1495 vsc9959_new_base_time(ocelot, taprio->base_time, in vsc9959_qos_port_tas_set()
1496 taprio->cycle_time, &base_ts); in vsc9959_qos_port_tas_set()
1502 QSYS_PARAM_CFG_REG_3_LIST_LENGTH(taprio->num_entries), in vsc9959_qos_port_tas_set()
1504 ocelot_write(ocelot, taprio->cycle_time, QSYS_PARAM_CFG_REG_4); in vsc9959_qos_port_tas_set()
1505 ocelot_write(ocelot, taprio->cycle_time_extension, QSYS_PARAM_CFG_REG_5); in vsc9959_qos_port_tas_set()
1507 for (i = 0; i < taprio->num_entries; i++) in vsc9959_qos_port_tas_set()
1508 vsc9959_tas_gcl_set(ocelot, i, &taprio->entries[i]); in vsc9959_qos_port_tas_set()
1520 ocelot_port->taprio = taprio_offload_get(taprio); in vsc9959_qos_port_tas_set()
1528 taprio->mqprio.qopt.num_tc = 0; in vsc9959_qos_port_tas_set()
1529 ocelot_port_mqprio(ocelot, port, &taprio->mqprio); in vsc9959_qos_port_tas_set()
1538 struct tc_taprio_qopt_offload *taprio; in vsc9959_tas_clock_adjust() local
1548 taprio = ocelot_port->taprio; in vsc9959_tas_clock_adjust()
1549 if (!taprio) in vsc9959_tas_clock_adjust()
1561 vsc9959_new_base_time(ocelot, taprio->base_time, in vsc9959_tas_clock_adjust()
1562 taprio->cycle_time, &base_ts); in vsc9959_tas_clock_adjust()