1 /* SPDX-License-Identifier: GPL-2.0-only */
7 #include <device/device.h>
9 #define I210_PCI_MEM_BAR_OFFSET 0x10
10 #define I210_REG_EECTRL 0x12010 /* Offset for EEPROM control reg */
11 #define I210_FLUPD 0x800000 /* Start flash update bit */
12 #define I210_FLUDONE 0x4000000 /* Flash update done indicator */
13 #define I210_REG_EEREAD 0x12014 /* Offset for EEPROM read reg */
14 #define I210_REG_EEWRITE 0x12018 /* Offset for EEPROM write reg */
15 #define I210_CMDV 0x01 /* command valid bit */
16 #define I210_DONE 0x02 /* command done bit */
17 #define I210_TARGET_CHECKSUM 0xBABA /* resulting checksum */
19 /*define some other useful values here */
20 #define I210_POLL_TIMEOUT_US 300000 /* 300 ms */
21 /*Define some error states here*/
22 #define I210_SUCCESS 0x00000000
23 #define I210_INVALID_PARAM 0x00000001
24 #define I210_NOT_READY 0x00000002
25 #define I210_READ_ERROR 0x00000004
26 #define I210_WRITE_ERROR 0x00000008
27 #define I210_CHECKSUM_ERROR 0x00000010
28 #define I210_FLASH_UPDATE_ERROR 0x00000020
30 #define MAC_ADDR_LEN 6
32 /* We need one function we can call to get a MAC address to use */
33 enum cb_err
mainboard_get_mac_address(struct device
*dev
, uint8_t mac
[MAC_ADDR_LEN
]);
35 #endif /* _INTEL_I210_H_ */