From 98b5c269433f178bf2596441ee04f8004e528ed4 Mon Sep 17 00:00:00 2001
From: Ilya Yanok <ilya.yanok@cogentembedded.com>
Date: Tue, 6 Nov 2012 13:06:31 +0000
Subject: am335x_evm: enable NAND support

Enable NAND support for AM335X boards.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
---
 include/configs/am335x_evm.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

(limited to 'include/configs')

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index b6e48f8a63..ded1cabab0 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -274,4 +274,16 @@
 #define CONFIG_PHYLIB
 #define CONFIG_PHY_SMSC
 
+#define CONFIG_NAND
+/* NAND support */
+#ifdef CONFIG_NAND
+#define CONFIG_CMD_NAND
+#define CONFIG_NAND_OMAP_GPMC
+#define GPMC_NAND_ECC_LP_x16_LAYOUT	1
+#define CONFIG_SYS_NAND_BASE		(0x08000000)	/* physical address */
+							/* to access nand at */
+							/* CS0 */
+#define CONFIG_SYS_MAX_NAND_DEVICE	1		/* Max number of NAND */
+#endif							/* devices */
+
 #endif	/* ! __CONFIG_AM335X_EVM_H */
-- 
cgit v1.2.1


From b4606c6cea2a0efc8b9d4056f7971a64754b0f91 Mon Sep 17 00:00:00 2001
From: Ilya Yanok <ilya.yanok@cogentembedded.com>
Date: Tue, 6 Nov 2012 13:06:35 +0000
Subject: am335x_evm: enable SPL NAND support

Enable booting from NAND support from AM335x boards as well as
environment in NAND.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
---
 include/configs/am335x_evm.h | 38 ++++++++++++++++++++++++++++++++++++--
 1 file changed, 36 insertions(+), 2 deletions(-)

(limited to 'include/configs')

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index ded1cabab0..6abe544b77 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -240,6 +240,35 @@
 #define CONFIG_SYS_SPI_U_BOOT_SIZE	0x40000
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"
 
+#define CONFIG_SPL_BOARD_INIT
+#define CONFIG_SPL_NAND_AM33XX_BCH
+#define CONFIG_SPL_NAND_SUPPORT
+#define CONFIG_SYS_NAND_5_ADDR_CYCLE
+#define CONFIG_SYS_NAND_PAGE_COUNT	(CONFIG_SYS_NAND_BLOCK_SIZE / \
+					 CONFIG_SYS_NAND_PAGE_SIZE)
+#define CONFIG_SYS_NAND_PAGE_SIZE	2048
+#define CONFIG_SYS_NAND_OOBSIZE		64
+#define CONFIG_SYS_NAND_BLOCK_SIZE	(128*1024)
+#define CONFIG_SYS_NAND_BAD_BLOCK_POS	NAND_LARGE_BADBLOCK_POS
+#define CONFIG_SYS_NAND_ECCPOS		{ 2, 3, 4, 5, 6, 7, 8, 9, \
+					 10, 11, 12, 13, 14, 15, 16, 17, \
+					 18, 19, 20, 21, 22, 23, 24, 25, \
+					 26, 27, 28, 29, 30, 31, 32, 33, \
+					 34, 35, 36, 37, 38, 39, 40, 41, \
+					 42, 43, 44, 45, 46, 47, 48, 49, \
+					 50, 51, 52, 53, 54, 55, 56, 57, }
+
+#define CONFIG_SYS_NAND_ECCSIZE		512
+#define CONFIG_SYS_NAND_ECCBYTES	14
+
+#define CONFIG_SYS_NAND_ECCSTEPS	4
+#define	CONFIG_SYS_NAND_ECCTOTAL	(CONFIG_SYS_NAND_ECCBYTES * \
+						CONFIG_SYS_NAND_ECCSTEPS)
+
+#define	CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_TEXT_BASE
+
+#define CONFIG_SYS_NAND_U_BOOT_OFFS	0x80000
+
 /*
  * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
  * 64 bytes before this address should be set aside for u-boot.img's
@@ -283,7 +312,12 @@
 #define CONFIG_SYS_NAND_BASE		(0x08000000)	/* physical address */
 							/* to access nand at */
 							/* CS0 */
-#define CONFIG_SYS_MAX_NAND_DEVICE	1		/* Max number of NAND */
-#endif							/* devices */
+#define CONFIG_SYS_MAX_NAND_DEVICE	1		/* Max number of NAND
+							   devices */
+#undef CONFIG_ENV_IS_NOWHERE
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET		0x260000 /* environment starts here */
+#define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
+#endif
 
 #endif	/* ! __CONFIG_AM335X_EVM_H */
-- 
cgit v1.2.1


From d7aff44a00e5de3de2ed18a3329edf5ff9d3aada Mon Sep 17 00:00:00 2001
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
Date: Sun, 11 Nov 2012 23:20:58 +0000
Subject: omap3_beagle.h: Fix comment for true/false return value.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
---
 include/configs/omap3_beagle.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'include/configs')

diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 7a3cc16a09..741cbd9cef 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -287,7 +287,7 @@
 		"else run userbutton_nonxm; fi;\0" \
 	"userbutton_xm=gpio input 4;\0" \
 	"userbutton_nonxm=gpio input 7;\0"
-/* "run userbutton" will return 1 (false) if is pressed and 0 (false) if not */
+/* "run userbutton" will return 1 (false) if pressed and 0 (true) if not */
 #define CONFIG_BOOTCOMMAND \
 	"mmc dev ${mmcdev}; if mmc rescan; then " \
 		"if run userbutton; then " \
-- 
cgit v1.2.1


From 31f5b651fad3d3999d8bd62f228d940bf1b42276 Mon Sep 17 00:00:00 2001
From: Stefano Babic <sbabic@denx.de>
Date: Fri, 23 Nov 2012 05:19:25 +0000
Subject: OMAP3: TAM3517: add macros for reading eeprom

Added macros to read SOM information from the I2C
EEPROM.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 include/configs/tam3517-common.h | 58 +++++++++++++++++++++++++++++-----------
 1 file changed, 43 insertions(+), 15 deletions(-)

(limited to 'include/configs')

diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index dd7757cb97..a3e84a3c75 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -357,7 +357,6 @@
  * I2C EEPROM
  */
 #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
-
 /*
  * The I2C EEPROM on the TAM3517 contains
  * mac address and production data
@@ -383,24 +382,29 @@ struct tam3517_module_info {
 	unsigned char _rev[100];
 };
 
-#define TAM3517_READ_MAC_FROM_EEPROM	\
-do {					\
-	struct tam3517_module_info info;\
-	char buf[80], ethname[20];	\
-	int i;				\
+#define TAM3517_READ_EEPROM(info, ret) \
+do {								\
 	i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);	\
 	if (eeprom_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0,		\
-			(void *)&info, sizeof(info)))		\
-		break;						\
+		(void *)info, sizeof(*info)))			\
+		ret = 1;					\
+	else							\
+		ret = 0;					\
+} while (0)
+
+#define TAM3517_READ_MAC_FROM_EEPROM(info)			\
+do {								\
+	char buf[80], ethname[20];				\
+	int i;							\
 	memset(buf, 0, sizeof(buf));				\
-	for (i = 0 ; i < ARRAY_SIZE(info.eth_addr); i++) {	\
+	for (i = 0 ; i < ARRAY_SIZE((info)->eth_addr); i++) {	\
 		sprintf(buf, "%02X:%02X:%02X:%02X:%02X:%02X",	\
-			info.eth_addr[i][5],			\
-			info.eth_addr[i][4],			\
-			info.eth_addr[i][3],			\
-			info.eth_addr[i][2],			\
-			info.eth_addr[i][1],			\
-			info.eth_addr[i][0]);			\
+			(info)->eth_addr[i][5],			\
+			(info)->eth_addr[i][4],			\
+			(info)->eth_addr[i][3],			\
+			(info)->eth_addr[i][2],			\
+			(info)->eth_addr[i][1],			\
+			(info)->eth_addr[i][0]);			\
 								\
 		if (i)						\
 			sprintf(ethname, "eth%daddr", i);	\
@@ -410,6 +414,30 @@ do {					\
 		setenv(ethname, buf);				\
 	}							\
 } while (0)
+
+/* The following macros are taken from Technexion's documentation */
+#define TAM3517_sequence_number(info) \
+	((info)->sequence_number % 0x1000000000000LL)
+#define TAM3517_week_of_year(info) (((info)->sequence_number >> 48) % 0x100)
+#define TAM3517_year(info) ((info)->sequence_number >> 56)
+#define TAM3517_revision_fixed(info) ((info)->revision % 0x100)
+#define TAM3517_revision_major(info) (((info)->revision >> 8) % 0x100)
+#define TAM3517_revision_tn(info) ((info)->revision >> 16)
+
+#define TAM3517_PRINT_SOM_INFO(info)				\
+do {								\
+	printf("Vendor:%s\n", (info)->customer);		\
+	printf("SOM:   %s\n", (info)->product);			\
+	printf("SeqNr: %02llu%02llu%012llu\n",			\
+		TAM3517_year(info),				\
+		TAM3517_week_of_year(info),			\
+		TAM3517_sequence_number(info));			\
+	printf("Rev:   TN%u %u.%u\n",				\
+		TAM3517_revision_tn(info),			\
+		TAM3517_revision_major(info),			\
+		TAM3517_revision_fixed(info));			\
+} while (0)
+
 #endif
 
 #endif /* __TAM3517_H */
-- 
cgit v1.2.1


From cdd0729ead6845262c3b22f6f5a51d67dd0010ed Mon Sep 17 00:00:00 2001
From: Yegor Yefremov <yegorslists@googlemail.com>
Date: Mon, 26 Nov 2012 04:03:16 +0000
Subject: am335x: cpsw: make phy address configurable

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 include/configs/am335x_evm.h | 1 +
 1 file changed, 1 insertion(+)

(limited to 'include/configs')

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 6abe544b77..aed40c8927 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -301,6 +301,7 @@
 #define CONFIG_NET_MULTI
 #define CONFIG_PHY_GIGE
 #define CONFIG_PHYLIB
+#define CONFIG_PHY_ADDR			0
 #define CONFIG_PHY_SMSC
 
 #define CONFIG_NAND
-- 
cgit v1.2.1


From abcbe2eb00dbb18d42bc505363115146c14a7ea0 Mon Sep 17 00:00:00 2001
From: Thomas Weber <thomas@tomweber.eu>
Date: Tue, 27 Nov 2012 10:32:40 +0000
Subject: OMAP3: Remove unused PHYS_SDRAM_1_SIZE

Remove the unused PHYS_SDRAM_1_SIZE from OMAP3 config files.

Signed-off-by: Thomas Weber <thomas@tomweber.eu>
---
 include/configs/cm_t35.h         | 1 -
 include/configs/dig297.h         | 1 -
 include/configs/igep00x0.h       | 1 -
 include/configs/mcx.h            | 1 -
 include/configs/omap3_mvblx.h    | 1 -
 include/configs/omap3_pandora.h  | 1 -
 include/configs/omap3_sdp3430.h  | 1 -
 include/configs/omap3_zoom1.h    | 1 -
 include/configs/omap3_zoom2.h    | 1 -
 include/configs/tam3517-common.h | 1 -
 include/configs/tricorder.h      | 1 -
 11 files changed, 11 deletions(-)

(limited to 'include/configs')

diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index 568ae8e097..7c503d2b8c 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -282,7 +282,6 @@
  */
 #define CONFIG_NR_DRAM_BANKS	1	/* CS1 is never populated */
 #define PHYS_SDRAM_1		OMAP34XX_SDRC_CS0
-#define PHYS_SDRAM_1_SIZE	(32 << 20)	/* at least 32 MiB */
 
 /*-----------------------------------------------------------------------
  * FLASH and environment organization
diff --git a/include/configs/dig297.h b/include/configs/dig297.h
index dda758269a..721b91c4df 100644
--- a/include/configs/dig297.h
+++ b/include/configs/dig297.h
@@ -263,7 +263,6 @@
  */
 #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */
 #define PHYS_SDRAM_1		OMAP34XX_SDRC_CS0
-#define PHYS_SDRAM_1_SIZE	(32 << 20)	/* at least 32 MiB */
 #define PHYS_SDRAM_2		OMAP34XX_SDRC_CS1
 
 /*-----------------------------------------------------------------------
diff --git a/include/configs/igep00x0.h b/include/configs/igep00x0.h
index c81ab7622e..85eed8e17c 100644
--- a/include/configs/igep00x0.h
+++ b/include/configs/igep00x0.h
@@ -236,7 +236,6 @@
  */
 #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */
 #define PHYS_SDRAM_1		OMAP34XX_SDRC_CS0
-#define PHYS_SDRAM_1_SIZE	(32 << 20)	/* at least 32 meg */
 #define PHYS_SDRAM_2		OMAP34XX_SDRC_CS1
 
 /*
diff --git a/include/configs/mcx.h b/include/configs/mcx.h
index bf49cc1381..a436149a57 100644
--- a/include/configs/mcx.h
+++ b/include/configs/mcx.h
@@ -323,7 +323,6 @@
  */
 #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */
 #define PHYS_SDRAM_1		OMAP34XX_SDRC_CS0
-#define PHYS_SDRAM_1_SIZE	(32 << 20)	/* at least 32 MiB */
 #define PHYS_SDRAM_2		OMAP34XX_SDRC_CS1
 
 /*
diff --git a/include/configs/omap3_mvblx.h b/include/configs/omap3_mvblx.h
index 67af314652..09a0b2f719 100644
--- a/include/configs/omap3_mvblx.h
+++ b/include/configs/omap3_mvblx.h
@@ -251,7 +251,6 @@
  */
 #define CONFIG_NR_DRAM_BANKS	1
 #define PHYS_SDRAM_1		OMAP34XX_SDRC_CS0
-#define PHYS_SDRAM_1_SIZE	(32 << 20)	/* at least 32 MiB */
 #define PHYS_SDRAM_2		OMAP34XX_SDRC_CS1
 
 #define CONFIG_ENV_IS_NOWHERE	1
diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h
index 8a8a5d1cc0..217f306c01 100644
--- a/include/configs/omap3_pandora.h
+++ b/include/configs/omap3_pandora.h
@@ -221,7 +221,6 @@
  */
 #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */
 #define PHYS_SDRAM_1		OMAP34XX_SDRC_CS0
-#define PHYS_SDRAM_1_SIZE	(32 << 20)	/* at least 32 MiB */
 #define PHYS_SDRAM_2		OMAP34XX_SDRC_CS1
 
 #define CONFIG_SYS_TEXT_BASE		0x80008000
diff --git a/include/configs/omap3_sdp3430.h b/include/configs/omap3_sdp3430.h
index 2a890c9c7e..b02ec850b7 100644
--- a/include/configs/omap3_sdp3430.h
+++ b/include/configs/omap3_sdp3430.h
@@ -303,7 +303,6 @@
  */
 #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */
 #define PHYS_SDRAM_1		OMAP34XX_SDRC_CS0
-#define PHYS_SDRAM_1_SIZE	(32 << 20) /* at least 32 meg */
 #define PHYS_SDRAM_2		OMAP34XX_SDRC_CS1
 
 /*--------------------------------------------------------------------------*/
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h
index e152055a64..ee4cbd75c1 100644
--- a/include/configs/omap3_zoom1.h
+++ b/include/configs/omap3_zoom1.h
@@ -252,7 +252,6 @@
  */
 #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */
 #define PHYS_SDRAM_1		OMAP34XX_SDRC_CS0
-#define PHYS_SDRAM_1_SIZE	(32 << 20)	/* at least 32 MiB */
 #define PHYS_SDRAM_2		OMAP34XX_SDRC_CS1
 
 /*-----------------------------------------------------------------------
diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h
index d6814248ed..a6b48a80ce 100644
--- a/include/configs/omap3_zoom2.h
+++ b/include/configs/omap3_zoom2.h
@@ -221,7 +221,6 @@
  */
 #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */
 #define PHYS_SDRAM_1		OMAP34XX_SDRC_CS0
-#define PHYS_SDRAM_1_SIZE	(32 << 20)	/* at least 32 MiB */
 #define PHYS_SDRAM_2		OMAP34XX_SDRC_CS1
 
 /*-----------------------------------------------------------------------
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index a3e84a3c75..c377678929 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -191,7 +191,6 @@
  */
 #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */
 #define PHYS_SDRAM_1		OMAP34XX_SDRC_CS0
-#define PHYS_SDRAM_1_SIZE	(32 << 20)	/* at least 32 MiB */
 #define PHYS_SDRAM_2		OMAP34XX_SDRC_CS1
 
 /*
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index 5859a7337b..c5c058508b 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -247,7 +247,6 @@
 /*  Physical Memory Map  */
 #define CONFIG_NR_DRAM_BANKS		2 /* CS1 may or may not be populated */
 #define PHYS_SDRAM_1			OMAP34XX_SDRC_CS0
-#define PHYS_SDRAM_1_SIZE		(128 << 20)	/* at least 128 MiB */
 #define PHYS_SDRAM_2			OMAP34XX_SDRC_CS1
 
 /* NAND and environment organization  */
-- 
cgit v1.2.1


From 9bd5c1ad0db802c9f8d49d72b443f03431cf6a89 Mon Sep 17 00:00:00 2001
From: Nikita Kiryanov <nikita@compulab.co.il>
Date: Tue, 4 Dec 2012 23:28:26 +0000
Subject: cm-t35: enable zero bootdelay check

Enable zero bootdelay check to make it possible to abort autoboot even if
bootdelay == 0

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
---
 include/configs/cm_t35.h | 1 +
 1 file changed, 1 insertion(+)

(limited to 'include/configs')

diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index 7c503d2b8c..433b447ff9 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -188,6 +188,7 @@
 
 /* Environment information */
 #define CONFIG_BOOTDELAY		10
+#define CONFIG_ZERO_BOOTDELAY_CHECK
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"loadaddr=0x82000000\0" \
-- 
cgit v1.2.1