#include <linux/bitfield.h>
#include <linux/of.h>
#include <linux/firmware.h>
#include <linux/crc-itu-t.h>
#include <linux/nvmem-consumer.h>
#include <linux/unaligned.h>
#include "aquantia.h"
#define UP_RESET_SLEEP …
#define DRAM_BASE_ADDR …
#define IRAM_BASE_ADDR …
#define VERSION_STRING_SIZE …
#define VERSION_STRING_OFFSET …
#define PRIMARY_OFFSET_OFFSET …
#define PRIMARY_OFFSET_SHIFT …
#define PRIMARY_OFFSET(x) …
#define HEADER_OFFSET …
struct aqr_fw_header { … } __packed;
enum aqr_fw_src { … };
static const char * const aqr_fw_src_string[] = …;
static bool aqr_fw_validate_get(size_t size, size_t offset, size_t get_size)
{ … }
static int aqr_fw_get_be16(const u8 *data, size_t offset, size_t size, u16 *value)
{ … }
static int aqr_fw_get_le16(const u8 *data, size_t offset, size_t size, u16 *value)
{ … }
static int aqr_fw_get_le24(const u8 *data, size_t offset, size_t size, u32 *value)
{ … }
static int aqr_fw_load_memory(struct phy_device *phydev, u32 addr,
const u8 *data, size_t len)
{ … }
static int aqr_fw_boot(struct phy_device *phydev, const u8 *data, size_t size,
enum aqr_fw_src fw_src)
{ … }
static int aqr_firmware_load_nvmem(struct phy_device *phydev)
{ … }
static int aqr_firmware_load_fs(struct phy_device *phydev)
{ … }
int aqr_firmware_load(struct phy_device *phydev)
{ … }