15 #define REG_SPI_FLASH_CTRL 0x200
16 #define SPI_FLASH_CTRL_EN_VPD 0x2000
18 #define REG_PCIE_CAP_LIST 0x58
20 #define REG_MAC_STA_ADDR 0x1488
34 "%c - 0x%02x\n", (
char)
c,
c);
56 if ((strbuf[2] !=
':') || (strbuf[5] !=
':') ||
57 (strbuf[8] !=
':') || (strbuf[11] !=
':') ||
58 (strbuf[14] !=
':')) {
63 for (i = 0; i < 6; i++) {
75 u8 mac[6] = { 0x90, 0xe6, 0xba, 0x24, 0xf9, 0xd2 };
80 " using default 90:e6:ba:24:f9:d2\n");
87 value = (mac[2] << 24) | (mac[3] << 16) | (mac[4] << 8) | (mac[5] << 0);
89 value = (mac[0] << 8) | (mac[1] << 0);
103 return ((
value & 0xff00) == 0x6c00) ? 1 : 0;
111 if (nic_res ==
NULL) {
149 static const struct pci_driver atl1e_driver
__pci_driver = {
156 CHIP_NAME(
"Atheros AR8121/AR8113/AR8114")
static void write32(void *addr, uint32_t val)
static uint32_t read32(const void *addr)
static int atl1e_eeprom_exist(u32 mem_base)
struct chip_operations drivers_net_ops
#define SPI_FLASH_CTRL_EN_VPD
#define REG_SPI_FLASH_CTRL
#define REG_PCIE_CAP_LIST
static u8 get_hex_digit(const u8 c)
static enum cb_err fetch_mac_string_cbfs(u8 *macstrbuf)
static void atl1e_init(struct device *dev)
static struct device_operations atl1e_ops
static void program_mac_address(u32 mem_base)
static const struct pci_driver atl1e_driver __pci_driver
static void get_mac_address(u8 *macaddr, const u8 *strbuf)
cb_err
coreboot error codes
@ CB_ERR
Generic error code.
@ CB_SUCCESS
Call completed successfully.
static size_t cbfs_load(const char *name, void *buf, size_t size)
#define printk(level,...)
struct resource * probe_resource(const struct device *dev, unsigned int index)
See if a resource structure already exists for a given index.
static __always_inline void pci_write_config16(const struct device *dev, u16 reg, u16 val)
#define BIOS_INFO
BIOS_INFO - Expected events.
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
#define PCI_COMMAND_MEMORY
#define PCI_BASE_ADDRESS_0
void pci_dev_enable_resources(struct device *dev)
void pci_dev_read_resources(struct device *dev)
void pci_dev_set_resources(struct device *dev)
void(* read_resources)(struct device *dev)
#define c(value, pmcreg, dst_bits)