linux/drivers/net/ethernet/apm/xgene-v2/mac.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Applied Micro X-Gene SoC Ethernet v2 Driver
 *
 * Copyright (c) 2017, Applied Micro Circuits Corporation
 * Author(s): Iyappan Subramanian <[email protected]>
 *	      Keyur Chudgar <[email protected]>
 */

#ifndef __XGENE_ENET_V2_MAC_H__
#define __XGENE_ENET_V2_MAC_H__

/* Register offsets */
#define MAC_CONFIG_1
#define MAC_CONFIG_2
#define MII_MGMT_CONFIG
#define MII_MGMT_COMMAND
#define MII_MGMT_ADDRESS
#define MII_MGMT_CONTROL
#define MII_MGMT_STATUS
#define MII_MGMT_INDICATORS
#define INTERFACE_CONTROL
#define STATION_ADDR0
#define STATION_ADDR1

#define RGMII_REG_0
#define ICM_CONFIG0_REG_0
#define ICM_CONFIG2_REG_0
#define ECM_CONFIG0_REG_0

/* Register fields */
#define SOFT_RESET
#define TX_EN
#define RX_EN
#define PAD_CRC
#define CRC_EN
#define FULL_DUPLEX

#define INTF_MODE_POS
#define INTF_MODE_LEN
#define HD_MODE_POS
#define HD_MODE_LEN
#define CFG_MACMODE_POS
#define CFG_MACMODE_LEN
#define CFG_WAITASYNCRD_POS
#define CFG_WAITASYNCRD_LEN
#define CFG_SPEED_125_POS
#define CFG_WFIFOFULLTHR_POS
#define CFG_WFIFOFULLTHR_LEN
#define MGMT_CLOCK_SEL_POS
#define MGMT_CLOCK_SEL_LEN
#define PHY_ADDR_POS
#define PHY_ADDR_LEN
#define REG_ADDR_POS
#define REG_ADDR_LEN
#define MII_MGMT_BUSY
#define MII_READ_CYCLE
#define CFG_WAITASYNCRD_EN

static inline void xgene_set_reg_bits(u32 *var, int pos, int len, u32 val)
{}

static inline u32 xgene_get_reg_bits(u32 var, int pos, int len)
{}

#define SET_REG_BITS(var, field, val)

#define SET_REG_BIT(var, field, val)

#define GET_REG_BITS(var, field)

#define GET_REG_BIT(var, field)

struct xge_pdata;

void xge_mac_reset(struct xge_pdata *pdata);
void xge_mac_set_speed(struct xge_pdata *pdata);
void xge_mac_enable(struct xge_pdata *pdata);
void xge_mac_disable(struct xge_pdata *pdata);
void xge_mac_init(struct xge_pdata *pdata);
void xge_mac_set_station_addr(struct xge_pdata *pdata);

#endif /* __XGENE_ENET_V2_MAC_H__ */