summaryrefslogtreecommitdiff
path: root/board/xilinx/zynq/board.c
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@gmail.com>2016-01-26 17:57:03 (GMT)
committerMichal Simek <michal.simek@xilinx.com>2016-04-04 18:27:54 (GMT)
commita509a1d40264516821d0ba2d1d6a6ab2e1a2acbd (patch)
treeaff88d2bad79e4b7a346d6c8f7a5c84612ae097b /board/xilinx/zynq/board.c
parentb7b3efe75a46c3d6bff43b7b314d1fff90ca65ec (diff)
downloadu-boot-fsl-qoriq-a509a1d40264516821d0ba2d1d6a6ab2e1a2acbd.tar.xz
net: gem: Allow to set the MAC from an EEPROM
Provide board specific option how to read MAC address from ROM. Do it in generic way to be reusable by differnet boards. If this is not enough board specific functions can be created. Signed-off-by: Joe Hershberger <joe.hershberger@gmail.com> # driver part Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'board/xilinx/zynq/board.c')
-rw-r--r--board/xilinx/zynq/board.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index 2f17e97..4c20450 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -98,6 +98,19 @@ int checkboard(void)
}
#endif
+int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
+{
+#if defined(CONFIG_ZYNQ_GEM_EEPROM_ADDR) && \
+ defined(CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET)
+ if (eeprom_read(CONFIG_ZYNQ_GEM_EEPROM_ADDR,
+ CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET,
+ ethaddr, 6))
+ printf("I2C EEPROM MAC address read failed\n");
+#endif
+
+ return 0;
+}
+
int dram_init(void)
{
int node;