public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 14/31] powerpc: mgcoge, mgsuvd: make some definitions in keymile-common.h conditional
Date: Wed, 28 Jan 2009 10:39:43 +0100	[thread overview]
Message-ID: <498027DF.1030309@denx.de> (raw)

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@keymile.com>
Signed-off-by: Heiko Schocher <hs@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

                 reply	other threads:[~2009-01-28  9:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=498027DF.1030309@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox