[U-Boot] [PATCH 14/31] powerpc: mgcoge, mgsuvd: make some definitions in keymile-common.h conditional

Heiko Schocher hs at denx.de
Wed Jan 28 10:39:43 CET 2009


in order to be able to "patch" some definitions
of keymile's config files very easy,
these definitions are surrounded by ifdefs

Signed-off-by: Thomas Herzmann <thomas.herzmann at keymile.com>
Signed-off-by: Heiko Schocher <hs at denx.de>
---
 include/configs/keymile-common.h |   31 ++++++++++++++++++++++++++++++-
 include/configs/mgcoge.h         |    2 --
 include/configs/mgsuvd.h         |    2 --
 3 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/include/configs/keymile-common.h b/include/configs/keymile-common.h
index 2e324fe..417f6b0 100644
--- a/include/configs/keymile-common.h
+++ b/include/configs/keymile-common.h
@@ -136,9 +136,29 @@
 #define CONFIG_BOOTP_GATEWAY
 #define CONFIG_BOOTP_HOSTNAME

+/* define this to use the keymile's io muxing feature */
+/*#define CONFIG_IO_MUXING */
+
+#ifdef CONFIG_IO_MUXING
+#define	CONFIG_KM_DEF_ENV_IOMUX \
+	"nc=setenv ethact HDLC ETHERNET \0" \
+	"nce=setenv ethact SCC ETHERNET \0"	\
+	"stderr=serial,nc \0"	\
+	"stdin=serial,nc \0" \
+	"stdout=serial,nc \0" \
+	"tftpsrcp=69 \0" \
+	"tftpdstp=69 \0"
+#else
+#define	CONFIG_KM_DEF_ENV_IOMUX \
+	"stderr=serial \0" \
+	"stdin=serial \0"	 \
+	"stdout=serial \0"
+#endif
+
 #define xstr(s)	str(s)
 #define str(s)	#s

+#ifndef CONFIG_KM_DEF_ENV
 #define CONFIG_KM_DEF_ENV	\
 	"netdev=eth0\0"							\
 	"baudrate=115200\0"						\
@@ -157,9 +177,17 @@
 		"cp.b ${u-boot_addr_r} " xstr(BOOTFLASH_START) 		\
 		"  ${filesize};"					\
 		"protect on " xstr(BOOTFLASH_START) "  +${filesize}\0"	\
+	"load_fdt=tftp ${fdt_addr_r} ${fdt_file}; "			\
+		"setenv actual_fdt_addr ${fdt_addr_r} \0" 		\
+	"load_kernel=tftp ${kernel_addr_r} ${kernel_file}; " 		\
+		"setenv actual_kernel_addr ${kernel_addr_r} \0" 	\
 	"ramargs=setenv bootargs root=/dev/ram rw\0"			\
 	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
 		"nfsroot=${serverip}:${rootpath}\0"			\
+	"mtdargs=setenv bootargs root=${actual_rootfs} rw "		\
+		"rootfstype=jffs2 \0" 					\
+	"altmtdargs=setenv bootargs root=${backup_rootfs} rw "		\
+		"rootfstype=jffs2 \0" 					\
 	"addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"		\
 	"addip=setenv bootargs ${bootargs} "				\
 		"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"	\
@@ -215,7 +243,8 @@
 	"new_esw=tftp ${autoscr_ws} ${new_esw_script}; "		\
 		"iminfo ${autoscr_ws}; autoscr ${autoscr_ws} \0"	\
 	"bootlimit=0 \0" 						\
+	CONFIG_KM_DEF_ENV_IOMUX						\
 	""
-
+#endif /* CONFIG_KM_DEF_ENV */

 #endif /* __CONFIG_KEYMILE_H */
diff --git a/include/configs/mgcoge.h b/include/configs/mgcoge.h
index 070fe53..fad5c09 100644
--- a/include/configs/mgcoge.h
+++ b/include/configs/mgcoge.h
@@ -87,8 +87,6 @@
 	"rootpath=/opt/eldk/ppc_82xx\0"					\
 	"addcon=setenv bootargs ${bootargs} "				\
 		"console=ttyCPM0,${baudrate}\0"				\
-	"tftpsrcp=69\0"							\
-	"tftpdstp=69\0"							\
 	"mtdids=nor0=boot,nor1=app \0"					\
 	"mtdparts=mtdparts=boot:384k(u-boot),128k(env),128k(envred),"	\
 		"3456k(free);app:3m(esw0),10m(rootfs0),3m(esw1),"	\
diff --git a/include/configs/mgsuvd.h b/include/configs/mgsuvd.h
index 700878f..bf4e8b0 100644
--- a/include/configs/mgsuvd.h
+++ b/include/configs/mgsuvd.h
@@ -61,8 +61,6 @@
 	"rootpath=/opt/eldk/ppc_8xx\0"					\
 	"addcon=setenv bootargs ${bootargs} "				\
 		"console=ttyCPM0,${baudrate}\0"				\
-	"tftpsrcp=69\0"							\
-	"tftpdstp=69\0"							\
 	"mtdids=nor0=app \0"						\
 	"mtdparts=mtdparts=app:384k(u-boot),128k(env),128k(envred),"	\
 		"128k(free),1536k(esw0),8704k(rootfs0),1536k(esw1),"	\
-- 
1.6.0.6

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list