brintos

brintos / linux-shallow public Read only

0
0
Text · 1.1 KiB · a1472f8 Raw
42 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2/* Copyright (c) 2019, Vladimir Oltean <olteanv@gmail.com>3 */4#ifndef _SJA1105_DYNAMIC_CONFIG_H5#define _SJA1105_DYNAMIC_CONFIG_H6 7#include "sja1105.h"8#include <linux/packing.h>9 10/* Special index that can be used for sja1105_dynamic_config_read */11#define SJA1105_SEARCH		-112 13struct sja1105_dyn_cmd;14 15struct sja1105_dynamic_table_ops {16	/* This returns size_t just to keep same prototype as the17	 * static config ops, of which we are reusing some functions.18	 */19	size_t (*entry_packing)(void *buf, void *entry_ptr, enum packing_op op);20	void (*cmd_packing)(void *buf, struct sja1105_dyn_cmd *cmd,21			    enum packing_op op);22	size_t max_entry_count;23	size_t packed_size;24	u64 addr;25	u8 access;26};27 28struct sja1105_mgmt_entry {29	u64 tsreg;30	u64 takets;31	u64 macaddr;32	u64 destports;33	u64 enfport;34	u64 index;35};36 37extern const struct sja1105_dynamic_table_ops sja1105et_dyn_ops[BLK_IDX_MAX_DYN];38extern const struct sja1105_dynamic_table_ops sja1105pqrs_dyn_ops[BLK_IDX_MAX_DYN];39extern const struct sja1105_dynamic_table_ops sja1110_dyn_ops[BLK_IDX_MAX_DYN];40 41#endif42