summaryrefslogtreecommitdiff
path: root/board/ti/ks2_evm/board_k2g.c
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2017-03-13 15:04:32 +0200
committerTom Rini <trini@konsulko.com>2017-03-20 17:57:15 -0400
commit752a8311e9c13af807ff9a32fbb2491282a41c8a (patch)
tree5ce9af67bfc00be491b1c16f289befe1db2aaac8 /board/ti/ks2_evm/board_k2g.c
parent66e04fb503baa67a444401e8562ebace48800b97 (diff)
ARM: k2g: setup PRU ethernet MAC addresses
PRU ethernet MAC address range is present in the board EEPROM. Parse it and setup eth?addr environment variables. Signed-off-by: Roger Quadros <rogerq@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/ti/ks2_evm/board_k2g.c')
-rw-r--r--board/ti/ks2_evm/board_k2g.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c
index 372fc35a5c..79e110ef48 100644
--- a/board/ti/ks2_evm/board_k2g.c
+++ b/board/ti/ks2_evm/board_k2g.c
@@ -12,6 +12,7 @@
#include <asm/arch/psc_defs.h>
#include <asm/arch/mmc_host_def.h>
#include "mux-k2g.h"
+#include "../common/board_detect.h"
#define SYS_CLK 24000000
@@ -149,6 +150,24 @@ int board_early_init_f(void)
}
#endif
+#ifdef CONFIG_BOARD_LATE_INIT
+int board_late_init(void)
+{
+#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_TI_I2C_BOARD_DETECT)
+ int rc;
+
+ rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
+ CONFIG_EEPROM_CHIP_ADDRESS);
+ if (rc)
+ printf("ti_i2c_eeprom_init failed %d\n", rc);
+
+ board_ti_set_ethaddr(1);
+#endif
+
+ return 0;
+}
+#endif
+
#ifdef CONFIG_SPL_BUILD
void spl_init_keystone_plls(void)
{