[U-Boot] [PATCH V2 7/7] am335x_evm: enable networking in SPL

Ilya Yanok ilya.yanok at cogentembedded.com
Tue Jun 26 13:01:26 CEST 2012


This patch adds support for networking in SPL on TI AM335x based
boards.

CC: Tom Rini <trini at ti.com>
Signed-off-by: Ilya Yanok <ilya.yanok at cogentembedded.com>
---
 board/ti/am335x/evm.c        |   12 ++++++++++++
 include/configs/am335x_evm.h |    5 ++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/board/ti/am335x/evm.c b/board/ti/am335x/evm.c
index 16a52a0..5e09919 100644
--- a/board/ti/am335x/evm.c
+++ b/board/ti/am335x/evm.c
@@ -119,6 +119,18 @@ int board_init(void)
 	return 0;
 }
 
+#ifdef CONFIG_SPL_BUILD
+int spl_board_init(void)
+{
+	enable_i2c0_pin_mux();
+	i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+	if (read_eeprom() < 0)
+		printf("Could not get board ID.\n");
+
+	return 0;
+}
+#endif
+
 #ifdef CONFIG_DRIVER_TI_CPSW
 static void cpsw_control(int enabled)
 {
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 3f22f8a..c644968 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -127,8 +127,9 @@
 
 /* Defines for SPL */
 #define CONFIG_SPL
+#define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_TEXT_BASE		0x402F0400
-#define CONFIG_SPL_MAX_SIZE		(46 * 1024)
+#define CONFIG_SPL_MAX_SIZE		(101 * 1024)
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SPL_BSS_START_ADDR	0x80000000
@@ -147,6 +148,8 @@
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_YMODEM_SUPPORT
+#define CONFIG_SPL_NET_SUPPORT
+#define CONFIG_SPL_ETH_SUPPORT
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"
 
 /*
-- 
1.7.9.5



More information about the U-Boot mailing list