[U-Boot-Users] [PATCH]ppc_4xx: Netstal HCU4 board. Added POST. Various fixes

Niklaus Giger niklausgiger at gmx.ch
Mon Jan 14 14:36:28 CET 2008


Various fixes. Reduced rom_size from 384 to 320 kB.
Environment is now in flash.
Added POST, support for OF.

Signed-off-by: Niklaus Giger <niklaus.giger at netstal.com>
---
 board/netstal/hcu4/config.mk |    2 +-
 include/configs/hcu4.h       |   33 ++++++++++++++++++++-------------
 2 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/board/netstal/hcu4/config.mk b/board/netstal/hcu4/config.mk
index 376609a..2c0d595 100644
--- a/board/netstal/hcu4/config.mk
+++ b/board/netstal/hcu4/config.mk
@@ -21,7 +21,7 @@
 # Netstal Maschinen AG: HCU4 boards
 #
 
-TEXT_BASE = 0xFFFa0000
+TEXT_BASE = 0xFFFb0000
 
 ifeq ($(debug),1)
 PLATFORM_CPPFLAGS += -DDEBUG -g
diff --git a/include/configs/hcu4.h b/include/configs/hcu4.h
index 0e259bb..037bda5 100644
--- a/include/configs/hcu4.h
+++ b/include/configs/hcu4.h
@@ -46,7 +46,7 @@
  * Base addresses -- Note these are effective addresses where the
  * actual resources get mapped (not physical addresses)
 *----------------------------------------------------------------------*/
-#define CFG_MONITOR_LEN		(384 * 1024)	/* Reserve 384 kB for Monitor	*/
+#define CFG_MONITOR_LEN	(320 * 1024)	/* Reserve 320 kB for Monitor	*/
 #define CFG_MALLOC_LEN		(256 * 1024)	/* Reserve 256 kB for malloc()	*/
 
 
@@ -105,8 +105,7 @@
  *----------------------------------------------------------------------*/
 
 #undef	CFG_ENV_IS_IN_NVRAM
-#undef  CFG_ENV_IS_IN_FLASH
-#define	CFG_ENV_IS_IN_EEPROM
+#define CFG_ENV_IS_IN_FLASH
 #undef  CFG_ENV_IS_NOWHERE
 
 #ifdef  CFG_ENV_IS_IN_EEPROM
@@ -120,7 +119,7 @@
 /* Put the environment in Flash */
 #define CFG_ENV_SECT_SIZE	0x10000 	/* size of one complete sector	*/
 #define CFG_ENV_ADDR		((-CFG_MONITOR_LEN)-CFG_ENV_SECT_SIZE)
-#define	CFG_ENV_SIZE		0x10000	/* Total Size of Environment Sector	*/
+#define	CFG_ENV_SIZE		8*1024	/* 8 KB Environment Sector	*/
 
 /* Address and size of Redundant Environment Sector	*/
 #define CFG_ENV_ADDR_REDUND	(CFG_ENV_ADDR-CFG_ENV_SECT_SIZE)
@@ -158,7 +157,7 @@
 
 /* Setup some board specific values for the default environment variables */
 #define CONFIG_HOSTNAME		hcu4
-#define CONFIG_IPADDR		172.25.1.42
+#define CONFIG_IPADDR		172.25.1.99
 #define CONFIG_ETHADDR      00:60:13:00:00:00   /* Netstal Machines AG MAC */
 #define CONFIG_OVERWRITE_ETHADDR_ONCE
 #define CONFIG_SERVERIP		172.25.1.3
@@ -180,12 +179,12 @@
 	"rootpath=/home/diagnose/eldk/ppc_4xx\0"			\
 	"bootfile=/tftpboot/hcu4/uImage\0"				\
 	"load=tftp 100000 hcu4/u-boot.bin\0"			\
-	"update=protect off FFFa0000 FFFFFFFF;era FFFa0000 FFFFFFFF;"	\
-		"cp.b 100000 FFFa0000 60000\0"			        \
+	"update=protect off FFFB0000 FFFFFFFF;era FFFC0000 FFFFFFFF;"	\
+		"cp.b 100000 FFFB0000 50000\0"			        \
 	"upd=run load;run update\0"					\
 	"vx=tftp ${loadaddr} hcu4_vx_rom;"				\
-	"setenv bootargs emac(0,0)hcu4_vx_rom e=${ipaddr} "		\
-	" h=${serverip} u=dpu pw=netstal8752 tn=hcu4 f=0x3008;"		\
+	"vx=tftp ${loadaddr} hcu4/hcu4_vx_rom;"				\
+	"setenv bootargs emac(0,0)c:hcu4/hcu4_vx_rom e=${ipaddr} "	\
 	"bootvx ${loadaddr}\0" 						\
 	""
 #define CONFIG_BOOTCOMMAND	"run vx"
@@ -221,7 +220,6 @@
 #include <config_cmd_default.h>
 
 #define CONFIG_CMD_ASKENV
-#define CONFIG_CMD_BSP
 #define CONFIG_CMD_CACHE
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_DIAG
@@ -250,9 +248,10 @@
 				 CFG_POST_ETHER	   | \
 				 CFG_POST_SPR)
 
+#define CFG_POST_UART_TABLE	{UART0_BASE}
 #define CFG_POST_WORD_ADDR	(CFG_GBL_DATA_OFFSET - 0x4)
 #define CONFIG_LOGBUFFER
-#define CFG_POST_CACHE_ADDR	0x7fff0000 /* free virtual address	*/
+#define CFG_POST_CACHE_ADDR	0x00800000 /* free virtual address	*/
 #define CFG_CONSOLE_IS_IN_ENV /* Otherwise it catches logbuffer as output */
 
 /*-----------------------------------------------------------------------
@@ -280,13 +279,14 @@
 
 #define CONFIG_CMDLINE_EDITING	1	/* add command line history	*/
 #define CONFIG_LOOPW            1       /* enable loopw command         */
-#define CONFIG_ZERO_BOOTDELAY_CHECK	/* check for keypress on bootdelay==0 */
 #define CONFIG_VERSION_VARIABLE 1	/* include version env variable */
 
 /*-----------------------------------------------------------------------
  * External Bus Controller (EBC) Setup
  */
 
+#define CFG_EBC_CFG            0x98400000
+
 /* Memory Bank 0 (Flash Bank 0) initialization					*/
 #define CFG_EBC_PB0AP		0x02005400
 #define CFG_EBC_PB0CR		0xFFF18000  /* BAS=0xFFF,BS=1MB,BU=R/W,BW=8bit	*/
@@ -303,7 +303,9 @@
 #define CFG_EBC_PB4AP		0x01800300
 #define CFG_EBC_PB4CR		0x7e0ba000  /* BAS=,BS=MB,BU=R/W,BW=bit	*/
 
-#define CFG_GPIO0_TCR		0x7ffe0000  /* GPIO value */
+#define CFG_GPIO0_OR		0xF27FFFFF  /* GPIO value */
+#define CFG_GPIO0_TCR		0x7FFE0000  /* GPIO value */
+#define CFG_GPIO0_ODR		0x00E897FC  /* GPIO value */
 
 /*
  * For booting Linux, the board info and command line data
@@ -352,4 +354,9 @@
 #define CONFIG_KGDB_BAUDRATE	230400	/* speed to run kgdb serial port */
 #define CONFIG_KGDB_SER_INDEX	2	    /* which serial port to use */
 #endif
+
+/* pass open firmware flat tree */
+#define CONFIG_OF_LIBFDT	1
+#define CONFIG_OF_BOARD_SETUP	1
+
 #endif	/* __CONFIG_H */
-- 
1.5.2.5


-- 
Niklaus Giger
Netstal Maschinen AG
CH-8752 Naefels




More information about the U-Boot mailing list