linux/drivers/net/ethernet/rocker/rocker_hw.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * drivers/net/ethernet/rocker/rocker_hw.h - Rocker switch device driver
 * Copyright (c) 2014-2016 Jiri Pirko <[email protected]>
 * Copyright (c) 2014 Scott Feldman <[email protected]>
 */

#ifndef _ROCKER_HW_H
#define _ROCKER_HW_H

#include <linux/types.h>

/* Return codes */
enum {};

#define ROCKER_FP_PORTS_MAX

#define PCI_DEVICE_ID_REDHAT_ROCKER

#define ROCKER_PCI_BAR0_SIZE

/* MSI-X vectors */
enum {};

/* Rocker bogus registers */
#define ROCKER_BOGUS_REG0
#define ROCKER_BOGUS_REG1
#define ROCKER_BOGUS_REG2
#define ROCKER_BOGUS_REG3

/* Rocker test registers */
#define ROCKER_TEST_REG
#define ROCKER_TEST_REG64
#define ROCKER_TEST_IRQ
#define ROCKER_TEST_DMA_ADDR
#define ROCKER_TEST_DMA_SIZE
#define ROCKER_TEST_DMA_CTRL

/* Rocker test register ctrl */
#define ROCKER_TEST_DMA_CTRL_CLEAR
#define ROCKER_TEST_DMA_CTRL_FILL
#define ROCKER_TEST_DMA_CTRL_INVERT

/* Rocker DMA ring register offsets */
#define ROCKER_DMA_DESC_ADDR(x)
#define ROCKER_DMA_DESC_SIZE(x)
#define ROCKER_DMA_DESC_HEAD(x)
#define ROCKER_DMA_DESC_TAIL(x)
#define ROCKER_DMA_DESC_CTRL(x)
#define ROCKER_DMA_DESC_CREDITS(x)
#define ROCKER_DMA_DESC_RES1(x)

/* Rocker dma ctrl register bits */
#define ROCKER_DMA_DESC_CTRL_RESET

/* Rocker DMA ring types */
enum rocker_dma_type {};

/* Rocker DMA ring size limits and default sizes */
#define ROCKER_DMA_SIZE_MIN
#define ROCKER_DMA_SIZE_MAX
#define ROCKER_DMA_CMD_DEFAULT_SIZE
#define ROCKER_DMA_EVENT_DEFAULT_SIZE
#define ROCKER_DMA_TX_DEFAULT_SIZE
#define ROCKER_DMA_TX_DESC_SIZE
#define ROCKER_DMA_RX_DEFAULT_SIZE
#define ROCKER_DMA_RX_DESC_SIZE

/* Rocker DMA descriptor struct */
struct rocker_desc {};

#define ROCKER_DMA_DESC_COMP_ERR_GEN

/* Rocker DMA TLV struct */
struct rocker_tlv {};

/* TLVs */
enum {};

enum {};

enum {};

enum {};

enum rocker_port_mode {};

enum {};

enum {};

enum {};

enum {};

enum {};

#define ROCKER_RX_FLAGS_IPV4
#define ROCKER_RX_FLAGS_IPV6
#define ROCKER_RX_FLAGS_CSUM_CALC
#define ROCKER_RX_FLAGS_IPV4_CSUM_GOOD
#define ROCKER_RX_FLAGS_IP_FRAG
#define ROCKER_RX_FLAGS_TCP
#define ROCKER_RX_FLAGS_UDP
#define ROCKER_RX_FLAGS_TCP_UDP_CSUM_GOOD
#define ROCKER_RX_FLAGS_FWD_OFFLOAD

enum {};

#define ROCKER_TX_OFFLOAD_NONE
#define ROCKER_TX_OFFLOAD_IP_CSUM
#define ROCKER_TX_OFFLOAD_TCP_UDP_CSUM
#define ROCKER_TX_OFFLOAD_L3_CSUM
#define ROCKER_TX_OFFLOAD_TSO

#define ROCKER_TX_FRAGS_MAX

enum {};

enum {};

/* cmd info nested for OF-DPA msgs */
enum {};

/* OF-DPA table IDs */

enum rocker_of_dpa_table_id {};

/* OF-DPA flow stats */
enum {};

/* OF-DPA group types */
enum rocker_of_dpa_group_type {};

/* OF-DPA group L2 overlay types */
enum rocker_of_dpa_overlay_type {};

/* OF-DPA group ID encoding */
#define ROCKER_GROUP_TYPE_SHIFT
#define ROCKER_GROUP_TYPE_MASK
#define ROCKER_GROUP_VLAN_SHIFT
#define ROCKER_GROUP_VLAN_MASK
#define ROCKER_GROUP_PORT_SHIFT
#define ROCKER_GROUP_PORT_MASK
#define ROCKER_GROUP_TUNNEL_ID_SHIFT
#define ROCKER_GROUP_TUNNEL_ID_MASK
#define ROCKER_GROUP_SUBTYPE_SHIFT
#define ROCKER_GROUP_SUBTYPE_MASK
#define ROCKER_GROUP_INDEX_SHIFT
#define ROCKER_GROUP_INDEX_MASK
#define ROCKER_GROUP_INDEX_LONG_SHIFT
#define ROCKER_GROUP_INDEX_LONG_MASK

#define ROCKER_GROUP_TYPE_GET(group_id)
#define ROCKER_GROUP_TYPE_SET(type)
#define ROCKER_GROUP_VLAN_GET(group_id)
#define ROCKER_GROUP_VLAN_SET(vlan_id)
#define ROCKER_GROUP_PORT_GET(group_id)
#define ROCKER_GROUP_PORT_SET(port)
#define ROCKER_GROUP_INDEX_GET(group_id)
#define ROCKER_GROUP_INDEX_SET(index)
#define ROCKER_GROUP_INDEX_LONG_GET(group_id)
#define ROCKER_GROUP_INDEX_LONG_SET(index)

#define ROCKER_GROUP_NONE
#define ROCKER_GROUP_L2_INTERFACE(vlan_id, port)
#define ROCKER_GROUP_L2_REWRITE(index)
#define ROCKER_GROUP_L2_MCAST(vlan_id, index)
#define ROCKER_GROUP_L2_FLOOD(vlan_id, index)
#define ROCKER_GROUP_L3_UNICAST(index)

/* Rocker general purpose registers */
#define ROCKER_CONTROL
#define ROCKER_PORT_PHYS_COUNT
#define ROCKER_PORT_PHYS_LINK_STATUS
#define ROCKER_PORT_PHYS_ENABLE
#define ROCKER_SWITCH_ID

/* Rocker control bits */
#define ROCKER_CONTROL_RESET

#endif