coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
atl1e.c File Reference
#include <device/mmio.h>
#include <device/device.h>
#include <cbfs.h>
#include <console/console.h>
#include <device/pci.h>
#include <device/pci_ops.h>
#include <types.h>
Include dependency graph for atl1e.c:

Go to the source code of this file.

Macros

#define REG_SPI_FLASH_CTRL   0x200
 
#define SPI_FLASH_CTRL_EN_VPD   0x2000
 
#define REG_PCIE_CAP_LIST   0x58
 
#define REG_MAC_STA_ADDR   0x1488
 
#define MACLEN   17
 

Functions

static u8 get_hex_digit (const u8 c)
 
static enum cb_err fetch_mac_string_cbfs (u8 *macstrbuf)
 
static void get_mac_address (u8 *macaddr, const u8 *strbuf)
 
static void program_mac_address (u32 mem_base)
 
static int atl1e_eeprom_exist (u32 mem_base)
 
static void atl1e_init (struct device *dev)
 

Variables

static struct device_operations atl1e_ops
 
static const struct pci_driver atl1e_driver __pci_driver
 
struct chip_operations drivers_net_ops
 

Macro Definition Documentation

◆ MACLEN

#define MACLEN   17

Definition at line 40 of file atl1e.c.

◆ REG_MAC_STA_ADDR

#define REG_MAC_STA_ADDR   0x1488

Definition at line 20 of file atl1e.c.

◆ REG_PCIE_CAP_LIST

#define REG_PCIE_CAP_LIST   0x58

Definition at line 18 of file atl1e.c.

◆ REG_SPI_FLASH_CTRL

#define REG_SPI_FLASH_CTRL   0x200

Definition at line 15 of file atl1e.c.

◆ SPI_FLASH_CTRL_EN_VPD

#define SPI_FLASH_CTRL_EN_VPD   0x2000

Definition at line 16 of file atl1e.c.

Function Documentation

◆ atl1e_eeprom_exist()

static int atl1e_eeprom_exist ( u32  mem_base)
static

Definition at line 95 of file atl1e.c.

References read32(), REG_PCIE_CAP_LIST, REG_SPI_FLASH_CTRL, SPI_FLASH_CTRL_EN_VPD, value, and write32().

Here is the call graph for this function:

◆ atl1e_init()

static void atl1e_init ( struct device dev)
static

Definition at line 106 of file atl1e.c.

◆ fetch_mac_string_cbfs()

static enum cb_err fetch_mac_string_cbfs ( u8 macstrbuf)
static

Definition at line 22 of file atl1e.c.

References BIOS_ERR, c, and printk.

Referenced by program_mac_address().

Here is the caller graph for this function:

◆ get_hex_digit()

static u8 get_hex_digit ( const u8  c)
static

Definition at line 22 of file atl1e.c.

Referenced by get_mac_address().

Here is the caller graph for this function:

◆ get_mac_address()

static void get_mac_address ( u8 macaddr,
const u8 strbuf 
)
static

Definition at line 51 of file atl1e.c.

References BIOS_ERR, get_hex_digit(), offset, and printk.

Referenced by program_mac_address().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ program_mac_address()

static void program_mac_address ( u32  mem_base)
static

Definition at line 71 of file atl1e.c.

References BIOS_DEBUG, BIOS_ERR, CB_SUCCESS, fetch_mac_string_cbfs(), get_mac_address(), MACLEN, printk, REG_MAC_STA_ADDR, value, and write32().

Here is the call graph for this function:

Variable Documentation

◆ __pci_driver

const struct pci_driver atl1e_driver __pci_driver
static
Initial value:
= {
.ops = &atl1e_ops,
.vendor = 0x1969,
.device = 0x1026,
}
static struct device_operations atl1e_ops
Definition: atl1e.c:142

Definition at line 106 of file atl1e.c.

◆ atl1e_ops

struct device_operations atl1e_ops
static
Initial value:
= {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = atl1e_init,
}
static void atl1e_init(struct device *dev)
Definition: atl1e.c:106
void pci_dev_enable_resources(struct device *dev)
Definition: pci_device.c:721
void pci_dev_read_resources(struct device *dev)
Definition: pci_device.c:534
void pci_dev_set_resources(struct device *dev)
Definition: pci_device.c:691

Definition at line 106 of file atl1e.c.

◆ drivers_net_ops

struct chip_operations drivers_net_ops
Initial value:
= {
}

Definition at line 106 of file atl1e.c.