#include <linux/rtnetlink.h>
#include "net_driver.h"
#include "phy.h"
#include "efx.h"
#include "nic.h"
#include "workarounds.h"
#define FALCON_BOARD_TYPE(_rev) …
#define FALCON_BOARD_MAJOR(_rev) …
#define FALCON_BOARD_MINOR(_rev) …
#define FALCON_BOARD_SFE4001 …
#define FALCON_BOARD_SFE4002 …
#define FALCON_BOARD_SFE4003 …
#define FALCON_BOARD_SFN4112F …
#define FALCON_BOARD_TEMP_BIAS …
#define FALCON_BOARD_TEMP_CRIT …
#define FALCON_JUNC_TEMP_MIN …
#define FALCON_JUNC_TEMP_MAX …
#define FALCON_JUNC_TEMP_CRIT …
#define LM87_REG_TEMP_HW_INT_LOCK …
#define LM87_REG_TEMP_HW_EXT_LOCK …
#define LM87_REG_TEMP_HW_INT …
#define LM87_REG_TEMP_HW_EXT …
#define LM87_REG_TEMP_EXT1 …
#define LM87_REG_TEMP_INT …
#define LM87_REG_ALARMS1 …
#define LM87_REG_ALARMS2 …
#define LM87_IN_LIMITS(nr, _min, _max) …
#define LM87_AIN_LIMITS(nr, _min, _max) …
#define LM87_TEMP_INT_LIMITS(_min, _max) …
#define LM87_TEMP_EXT1_LIMITS(_min, _max) …
#define LM87_ALARM_TEMP_INT …
#define LM87_ALARM_TEMP_EXT1 …
#if IS_ENABLED(CONFIG_SENSORS_LM87)
static int ef4_poke_lm87(struct i2c_client *client, const u8 *reg_values)
{ … }
static const u8 falcon_lm87_common_regs[] = …;
static int ef4_init_lm87(struct ef4_nic *efx, const struct i2c_board_info *info,
const u8 *reg_values)
{ … }
static void ef4_fini_lm87(struct ef4_nic *efx)
{ … }
static int ef4_check_lm87(struct ef4_nic *efx, unsigned mask)
{ … }
#else
static inline int
ef4_init_lm87(struct ef4_nic *efx, const struct i2c_board_info *info,
const u8 *reg_values)
{
return 0;
}
static inline void ef4_fini_lm87(struct ef4_nic *efx)
{
}
static inline int ef4_check_lm87(struct ef4_nic *efx, unsigned mask)
{
return 0;
}
#endif
#define PCA9539 …
#define P0_IN …
#define P0_OUT …
#define P0_INVERT …
#define P0_CONFIG …
#define P0_EN_1V0X_LBN …
#define P0_EN_1V0X_WIDTH …
#define P0_EN_1V2_LBN …
#define P0_EN_1V2_WIDTH …
#define P0_EN_2V5_LBN …
#define P0_EN_2V5_WIDTH …
#define P0_EN_3V3X_LBN …
#define P0_EN_3V3X_WIDTH …
#define P0_EN_5V_LBN …
#define P0_EN_5V_WIDTH …
#define P0_SHORTEN_JTAG_LBN …
#define P0_SHORTEN_JTAG_WIDTH …
#define P0_X_TRST_LBN …
#define P0_X_TRST_WIDTH …
#define P0_DSP_RESET_LBN …
#define P0_DSP_RESET_WIDTH …
#define P1_IN …
#define P1_OUT …
#define P1_INVERT …
#define P1_CONFIG …
#define P1_AFE_PWD_LBN …
#define P1_AFE_PWD_WIDTH …
#define P1_DSP_PWD25_LBN …
#define P1_DSP_PWD25_WIDTH …
#define P1_RESERVED_LBN …
#define P1_RESERVED_WIDTH …
#define P1_SPARE_LBN …
#define P1_SPARE_WIDTH …
#define MAX664X_REG_RSL …
#define MAX664X_REG_WLHO …
static void sfe4001_poweroff(struct ef4_nic *efx)
{ … }
static int sfe4001_poweron(struct ef4_nic *efx)
{ … }
static ssize_t phy_flash_cfg_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t phy_flash_cfg_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RW(phy_flash_cfg);
static void sfe4001_fini(struct ef4_nic *efx)
{ … }
static int sfe4001_check_hw(struct ef4_nic *efx)
{ … }
static const struct i2c_board_info sfe4001_hwmon_info = …;
static int sfe4001_init(struct ef4_nic *efx)
{ … }
static u8 sfe4002_lm87_channel = …;
static const u8 sfe4002_lm87_regs[] = …;
static const struct i2c_board_info sfe4002_hwmon_info = …;
#define SFE4002_FAULT_LED …
#define SFE4002_RX_LED …
#define SFE4002_TX_LED …
static void sfe4002_init_phy(struct ef4_nic *efx)
{ … }
static void sfe4002_set_id_led(struct ef4_nic *efx, enum ef4_led_mode mode)
{ … }
static int sfe4002_check_hw(struct ef4_nic *efx)
{ … }
static int sfe4002_init(struct ef4_nic *efx)
{ … }
static u8 sfn4112f_lm87_channel = …;
static const u8 sfn4112f_lm87_regs[] = …;
static const struct i2c_board_info sfn4112f_hwmon_info = …;
#define SFN4112F_ACT_LED …
#define SFN4112F_LINK_LED …
static void sfn4112f_init_phy(struct ef4_nic *efx)
{ … }
static void sfn4112f_set_id_led(struct ef4_nic *efx, enum ef4_led_mode mode)
{ … }
static int sfn4112f_check_hw(struct ef4_nic *efx)
{ … }
static int sfn4112f_init(struct ef4_nic *efx)
{ … }
static u8 sfe4003_lm87_channel = …;
static const u8 sfe4003_lm87_regs[] = …;
static const struct i2c_board_info sfe4003_hwmon_info = …;
#define SFE4003_RED_LED_GPIO …
#define SFE4003_LED_ON …
#define SFE4003_LED_OFF …
static void sfe4003_set_id_led(struct ef4_nic *efx, enum ef4_led_mode mode)
{ … }
static void sfe4003_init_phy(struct ef4_nic *efx)
{ … }
static int sfe4003_check_hw(struct ef4_nic *efx)
{ … }
static int sfe4003_init(struct ef4_nic *efx)
{ … }
static const struct falcon_board_type board_types[] = …;
int falcon_probe_board(struct ef4_nic *efx, u16 revision_info)
{ … }