[U-Boot] [PATCH] omap3: Derive config for Beagleboard-XM sans NAND support

Sanjeev Premi spremi at ymail.com
Sun Jan 5 15:32:07 CET 2014


Beagleboard XM doesn't have a NAND chip.
Let the configuration reflect so.

Signed-off-by: Sanjeev Premi <spremi at ymail.com>
Cc: Tom Rini <trini at ti.com>
---

 Patch was created and tested against:
   183acb70: Prepare v2013.10

 Forward ported to latest master for submission.

 Difference in binary sizes:   MLO     u-boot.img
   Before                      47932   337784
   After                       44676   277700

 boards.cfg                     |  1 +
 include/configs/omap3_beagle.h | 23 +++++++++++++++++++++--
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/boards.cfg b/boards.cfg
index c602a16..3a6fb87 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -332,6 +332,7 @@ Active  arm         armv7          omap3       technexion      twister
 Active  arm         armv7          omap3       teejet          mt_ventoux          mt_ventoux                           -                                                                                                                                 Stefano Babic <sbabic at denx.de>
 Active  arm         armv7          omap3       ti              am3517crane         am3517_crane                         -                                                                                                                                 Nagendra T S  <nagendra at mistralsolutions.com>
 Active  arm         armv7          omap3       ti              beagle              omap3_beagle                         -                                                                                                                                 Tom Rini <trini at ti.com>
+Active  arm         armv7          omap3       ti              beagle              omap3_beagle_xm                      omap3_beagle:BEAGLE_XM                                                                                                            Tom Rini <trini at ti.com>
 Active  arm         armv7          omap3       ti              evm                 omap3_evm                            -                                                                                                                                 Tom Rini <trini at ti.com>
 Active  arm         armv7          omap3       ti              evm                 omap3_evm_quick_mmc                  -                                                                                                                                 -
 Active  arm         armv7          omap3       ti              evm                 omap3_evm_quick_nand                 -                                                                                                                                 -
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 3acb854..51f9cfd 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -129,21 +129,31 @@
 
 #define CONFIG_CMD_ASKENV
 
+#ifdef CONFIG_BEAGLE_XM
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV	0
+#else
+#define CONFIG_ENV_IS_IN_NAND
+#endif	/* CONFIG_BEAGLE_XM */
+
 #define CONFIG_CMD_CACHE
 #define CONFIG_CMD_EXT2		/* EXT2 Support			*/
 #define CONFIG_CMD_FAT		/* FAT support			*/
 #define CONFIG_CMD_FS_GENERIC	/* Generic FS support */
+
+#ifndef CONFIG_BEAGLE_XM
 #define CONFIG_CMD_MTDPARTS	/* Enable MTD parts commands */
 #define CONFIG_MTD_DEVICE	/* needed for mtdparts commands */
 #define MTDIDS_DEFAULT			"nand0=nand"
 #define MTDPARTS_DEFAULT		"mtdparts=nand:512k(x-loader),"\
 					"1920k(u-boot),128k(u-boot-env),"\
 					"4m(kernel),-(fs)"
+#define CONFIG_CMD_NAND		/* NAND support			*/
+#endif	/* CONFIG_BEAGLE_XM */
 
 #define CONFIG_CMD_I2C		/* I2C serial bus support	*/
 #define CONFIG_CMD_MMC		/* MMC support			*/
 #define CONFIG_USB_STORAGE	/* USB storage support		*/
-#define CONFIG_CMD_NAND		/* NAND support			*/
 #define CONFIG_CMD_LED		/* LED support			*/
 #define CONFIG_CMD_NET      /* bootp, tftpboot, rarpboot    */
 #define CONFIG_CMD_NFS      /* NFS support          */
@@ -173,6 +183,7 @@
 /*
  * Board NAND Info.
  */
+#ifndef CONFIG_BEAGLE_XM
 #define CONFIG_SYS_NAND_QUIET_TEST	1
 #define CONFIG_NAND_OMAP_GPMC
 #define CONFIG_SYS_NAND_ADDR		NAND_BASE	/* physical address */
@@ -184,6 +195,7 @@
 
 #define CONFIG_SYS_MAX_NAND_DEVICE	1		/* Max number of NAND */
 							/* devices */
+#endif	/* CONFIG_BEAGLE_XM */
 
 /* Environment information */
 #define CONFIG_BOOTDELAY		3
@@ -351,6 +363,7 @@
 
 /* **** PISMO SUPPORT *** */
 
+#ifndef CONFIG_BEAGLE_XM
 /* Configure the PISMO */
 #define PISMO1_NAND_SIZE		GPMC_SIZE_128M
 #define PISMO1_ONEN_SIZE		GPMC_SIZE_128M
@@ -365,13 +378,13 @@
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
 #define CONFIG_SYS_ONENAND_BASE		ONENAND_MAP
 
-#define CONFIG_ENV_IS_IN_NAND		1
 #define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */
 #define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */
 
 #define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */
 #define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET
 #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET
+#endif	/* CONFIG_BEAGLE_XM */
 
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
 #define CONFIG_SYS_INIT_RAM_ADDR	0x4020f800
@@ -408,16 +421,21 @@
 #define CONFIG_SPL_MMC_SUPPORT
 #define CONFIG_SPL_FAT_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
+
+#ifndef CONFIG_BEAGLE_XM
 #define CONFIG_SPL_NAND_SUPPORT
 #define CONFIG_SPL_NAND_BASE
 #define CONFIG_SPL_NAND_DRIVERS
 #define CONFIG_SPL_NAND_ECC
+#endif	/* CONFIG_BEAGLE_XM */
+
 #define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_POWER_SUPPORT
 #define CONFIG_SPL_OMAP3_ID_NAND
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"
 
 /* NAND boot config */
+#ifndef CONFIG_BEAGLE_XM
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_COUNT	64
 #define CONFIG_SYS_NAND_PAGE_SIZE	2048
@@ -431,6 +449,7 @@
 #define CONFIG_NAND_OMAP_ECCSCHEME	OMAP_ECC_HAM1_CODE_HW
 #define CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x80000
+#endif	/* CONFIG_BEAGLE_XM */
 
 /*
  * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
-- 
1.8.3.1



More information about the U-Boot mailing list