linux/drivers/net/ethernet/microchip/lan966x/lan966x_taprio.c

// SPDX-License-Identifier: GPL-2.0+

#include "lan966x_main.h"

#define LAN966X_TAPRIO_TIMEOUT_MS
#define LAN966X_TAPRIO_ENTRIES_PER_PORT

/* Minimum supported cycle time in nanoseconds */
#define LAN966X_TAPRIO_MIN_CYCLE_TIME_NS

/* Maximum supported cycle time in nanoseconds */
#define LAN966X_TAPRIO_MAX_CYCLE_TIME_NS

/* Total number of TAS GCL entries */
#define LAN966X_TAPRIO_NUM_GCL

/* TAPRIO link speeds for calculation of guard band */
enum lan966x_taprio_link_speed {};

/* TAPRIO list states */
enum lan966x_taprio_state {};

/* TAPRIO GCL command */
enum lan966x_taprio_gcl_cmd {};

static u32 lan966x_taprio_list_index(struct lan966x_port *port, u8 entry)
{}

static u32 lan966x_taprio_list_state_get(struct lan966x_port *port)
{}

static u32 lan966x_taprio_list_index_state_get(struct lan966x_port *port,
					       u32 list)
{}

static void lan966x_taprio_list_state_set(struct lan966x_port *port,
					  u32 state)
{}

static int lan966x_taprio_list_shutdown(struct lan966x_port *port,
					u32 list)
{}

static int lan966x_taprio_shutdown(struct lan966x_port *port)
{}

/* Find a suitable list for a new schedule. First priority is a list in state
 * pending. Second priority is a list in state admin.
 */
static int lan966x_taprio_find_list(struct lan966x_port *port,
				    struct tc_taprio_qopt_offload *qopt,
				    int *new_list, int *obs_list)
{}

static int lan966x_taprio_check(struct tc_taprio_qopt_offload *qopt)
{}

static int lan966x_taprio_gcl_free_get(struct lan966x_port *port,
				       unsigned long *free_list)
{}

static void lan966x_taprio_gcl_setup_entry(struct lan966x_port *port,
					   struct tc_taprio_sched_entry *entry,
					   u32 next_entry)
{}

static int lan966x_taprio_gcl_setup(struct lan966x_port *port,
				    struct tc_taprio_qopt_offload *qopt,
				    int list)
{}

/* Calculate new base_time based on cycle_time. The HW recommends to have the
 * new base time at least 2 * cycle type + current time
 */
static void lan966x_taprio_new_base_time(struct lan966x *lan966x,
					 const u32 cycle_time,
					 const ktime_t org_base_time,
					 ktime_t *new_base_time)
{}

int lan966x_taprio_speed_set(struct lan966x_port *port, int speed)
{}

int lan966x_taprio_add(struct lan966x_port *port,
		       struct tc_taprio_qopt_offload *qopt)
{}

int lan966x_taprio_del(struct lan966x_port *port)
{}

void lan966x_taprio_init(struct lan966x *lan966x)
{}

void lan966x_taprio_deinit(struct lan966x *lan966x)
{}