Skip to content
Snippets Groups Projects
Commit a66e4fe9 authored by Alessandro Pecugi's avatar Alessandro Pecugi
Browse files

[E09] adapt to new eeprom lib

Adapt the board file of e09 to new API to read mac address from
eeprom introduced in cc0a3644

This fixes the following compilation error that occurs when building
for e09:

  fatal error: ../common/e2promlib.h: No such file or directory
  |    29 | #include "../common/e2promlib.h"
  |       |          ^~~~~~~~~~~~~~~~~~~~~~~
  | compilation terminated.
parent e9d78cf9
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <fs.h> #include <fs.h>
#include <video.h> #include <video.h>
#include "../common/e2promlib.h" #include "../common/seco_eeprom_manager.h"
/* GPIO EXPANDERS Defines */ /* GPIO EXPANDERS Defines */
#define IO_EXP1_BUS 4 #define IO_EXP1_BUS 4
...@@ -89,12 +89,15 @@ static void setup_seco_environment(void) { ...@@ -89,12 +89,15 @@ static void setup_seco_environment(void) {
static void setup_macaddr(void) static void setup_macaddr(void)
{ {
u8 mac_addr[ARP_HLEN]; u8 mac_addr[ARP_HLEN];
struct udevice *i2c_bus;
printf("============================\n"); printf("============================\n");
/* retrieve macaddress from eeprom */ /* retrieve macaddress from eeprom */
uclass_get_device_by_seq(UCLASS_I2C, I2C_EEPROM_BUS, &i2c_bus); if (seco_eeprom_init(I2C_EEPROM_BUS, I2C_EEPROM_ADDR) < 0)
if(e2prom_read_macaddr(i2c_bus, I2C_EEPROM_ADDR, &mac_addr[0]) < 0) {
printf("failed to initialize eeprom\n");
return;
}
if(seco_eeprom_get_macaddr(&mac_addr[0]) < 0)
{ {
printf("failed to get eeprom macaddress\n"); printf("failed to get eeprom macaddress\n");
return; return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment