linux/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils_fw2x.c

// SPDX-License-Identifier: GPL-2.0-only
/* Atlantic Network Driver
 *
 * Copyright (C) 2014-2019 aQuantia Corporation
 * Copyright (C) 2019-2020 Marvell International Ltd.
 */

/* File hw_atl_utils_fw2x.c: Definition of firmware 2.x functions for
 * Atlantic hardware abstraction layer.
 */

#include "../aq_hw.h"
#include "../aq_hw_utils.h"
#include "../aq_pci_func.h"
#include "../aq_ring.h"
#include "../aq_vec.h"
#include "../aq_nic.h"
#include "hw_atl_utils.h"
#include "hw_atl_llh.h"

#define HW_ATL_FW2X_MPI_LED_ADDR
#define HW_ATL_FW2X_MPI_RPC_ADDR

#define HW_ATL_FW2X_MPI_MBOX_ADDR
#define HW_ATL_FW2X_MPI_EFUSE_ADDR
#define HW_ATL_FW2X_MPI_CONTROL_ADDR
#define HW_ATL_FW2X_MPI_CONTROL2_ADDR
#define HW_ATL_FW2X_MPI_STATE_ADDR
#define HW_ATL_FW2X_MPI_STATE2_ADDR

#define HW_ATL_FW3X_EXT_CONTROL_ADDR
#define HW_ATL_FW3X_EXT_STATE_ADDR

#define HW_ATL_FW3X_PTP_ADJ_LSW_ADDR
#define HW_ATL_FW3X_PTP_ADJ_MSW_ADDR

#define HW_ATL_FW2X_CAP_PAUSE
#define HW_ATL_FW2X_CAP_ASYM_PAUSE
#define HW_ATL_FW2X_CAP_SLEEP_PROXY
#define HW_ATL_FW2X_CAP_WOL

#define HW_ATL_FW2X_CTRL_WAKE_ON_LINK
#define HW_ATL_FW2X_CTRL_SLEEP_PROXY
#define HW_ATL_FW2X_CTRL_WOL
#define HW_ATL_FW2X_CTRL_LINK_DROP
#define HW_ATL_FW2X_CTRL_PAUSE
#define HW_ATL_FW2X_CTRL_TEMPERATURE
#define HW_ATL_FW2X_CTRL_ASYMMETRIC_PAUSE
#define HW_ATL_FW2X_CTRL_INT_LOOPBACK
#define HW_ATL_FW2X_CTRL_EXT_LOOPBACK
#define HW_ATL_FW2X_CTRL_DOWNSHIFT
#define HW_ATL_FW2X_CTRL_FORCE_RECONNECT

#define HW_ATL_FW2X_CAP_EEE_1G_MASK
#define HW_ATL_FW2X_CAP_EEE_2G5_MASK
#define HW_ATL_FW2X_CAP_EEE_5G_MASK
#define HW_ATL_FW2X_CAP_EEE_10G_MASK

#define HW_ATL_FW2X_CAP_MACSEC

#define HAL_ATLANTIC_WOL_FILTERS_COUNT
#define HAL_ATLANTIC_UTILS_FW2X_MSG_WOL

#define HW_ATL_FW_VER_LED
#define HW_ATL_FW_VER_MEDIA_CONTROL

struct __packed fw2x_msg_wol_pattern {};

struct __packed fw2x_msg_wol {};

static int aq_fw2x_set_link_speed(struct aq_hw_s *self, u32 speed);
static int aq_fw2x_set_state(struct aq_hw_s *self,
			     enum hal_atl_utils_fw_state_e state);

static u32 aq_fw2x_mbox_get(struct aq_hw_s *self);
static u32 aq_fw2x_rpc_get(struct aq_hw_s *self);
static int aq_fw2x_settings_get(struct aq_hw_s *self, u32 *addr);
static u32 aq_fw2x_state_get(struct aq_hw_s *self);
static u32 aq_fw2x_state2_get(struct aq_hw_s *self);

static int aq_fw2x_init(struct aq_hw_s *self)
{}

static int aq_fw2x_deinit(struct aq_hw_s *self)
{}

static enum hw_atl_fw2x_rate link_speed_mask_2fw2x_ratemask(u32 speed)
{}

static u32 fw2x_to_eee_mask(u32 speed)
{}

static u32 eee_mask_to_fw2x(u32 speed)
{}

static int aq_fw2x_set_link_speed(struct aq_hw_s *self, u32 speed)
{}

static void aq_fw2x_upd_flow_control_bits(struct aq_hw_s *self,
					  u32 *mpi_state, u32 fc)
{}

static void aq_fw2x_upd_eee_rate_bits(struct aq_hw_s *self, u32 *mpi_opts,
				      u32 eee_speeds)
{}

static int aq_fw2x_set_state(struct aq_hw_s *self,
			     enum hal_atl_utils_fw_state_e state)
{}

static int aq_fw2x_update_link_status(struct aq_hw_s *self)
{}

static int aq_fw2x_get_mac_permanent(struct aq_hw_s *self, u8 *mac)
{}

static int aq_fw2x_update_stats(struct aq_hw_s *self)
{}

static int aq_fw2x_get_phy_temp(struct aq_hw_s *self, int *temp)
{}

static int aq_fw2x_set_wol(struct aq_hw_s *self, const u8 *mac)
{}

static int aq_fw2x_set_power(struct aq_hw_s *self, unsigned int power_state,
			     const u8 *mac)
{}

static int aq_fw2x_send_fw_request(struct aq_hw_s *self,
				   const struct hw_fw_request_iface *fw_req,
				   size_t size)
{}

static void aq_fw3x_enable_ptp(struct aq_hw_s *self, int enable)
{}

static void aq_fw3x_adjust_ptp(struct aq_hw_s *self, uint64_t adj)
{}

static int aq_fw2x_led_control(struct aq_hw_s *self, u32 mode)
{}

static int aq_fw2x_set_eee_rate(struct aq_hw_s *self, u32 speed)
{}

static int aq_fw2x_get_eee_rate(struct aq_hw_s *self, u32 *rate,
				u32 *supported_rates)
{}

static int aq_fw2x_renegotiate(struct aq_hw_s *self)
{}

static int aq_fw2x_set_flow_control(struct aq_hw_s *self)
{}

static u32 aq_fw2x_get_flow_control(struct aq_hw_s *self, u32 *fcmode)
{}

static int aq_fw2x_set_phyloopback(struct aq_hw_s *self, u32 mode, bool enable)
{}

static u32 aq_fw2x_mbox_get(struct aq_hw_s *self)
{}

static u32 aq_fw2x_rpc_get(struct aq_hw_s *self)
{}

static int aq_fw2x_settings_get(struct aq_hw_s *self, u32 *addr)
{}

static u32 aq_fw2x_state_get(struct aq_hw_s *self)
{}

static u32 aq_fw2x_state2_get(struct aq_hw_s *self)
{}

static int aq_fw2x_set_downshift(struct aq_hw_s *self, u32 counter)
{}

static int aq_fw2x_set_media_detect(struct aq_hw_s *self, bool on)
{}

static u32 aq_fw2x_get_link_capabilities(struct aq_hw_s *self)
{}

static int aq_fw2x_send_macsec_req(struct aq_hw_s *hw,
				   struct macsec_msg_fw_request *req,
				   struct macsec_msg_fw_response *response)
{}

const struct aq_fw_ops aq_fw_2x_ops =;