aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2016-10-20 15:29:24 +0530
committerLokesh Vutla <lokeshvutla@ti.com>2016-10-21 22:46:31 +0530
commit798b946b613d2b1a01db2e6b85de43b2dc1614dd (patch)
tree017218356775b216de0c4b4e0025d2eb9b8f133f /board
parente67296ef18d732b85072b6cb0d2235ffc78c0eb4 (diff)
downloadjacinto6evm-798b946b613d2b1a01db2e6b85de43b2dc1614dd.tar.gz
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>
Diffstat (limited to 'board')
-rw-r--r--board/ti/ks2_evm/board_k2g.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c
index e1586a9b93..03af5719cf 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
@@ -159,12 +160,24 @@ int board_early_init_f(void)
#ifdef CONFIG_BOARD_LATE_INIT
int board_late_init(void)
{
+ __maybe_unused int rc;
+
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
if (board_is_k2g_gp())
setenv("board_name", "66AK2GGP\0");
else if (board_is_k2g_ice())
setenv("board_name", "66AK2GIC\0");
#endif
+
+#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_TI_I2C_BOARD_DETECT)
+ 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