[U-Boot] Boot failure with a AT91RM9200 based custom board

Peter Kardos kardos.peter.sk at gmail.com
Fri Aug 12 02:24:24 CEST 2016


Greetings,

I'm looking for a AT91RM9200 specialist as I've got stuck porting board 
support from a old u-boot (v1.1.4) to the latest stable (v2016.07)...

I'm using the at91r9200ek board as a template to get things running...

With the patches i can get to the state below and here the board hangs. 
When patch 0004 is omitted, it seems the board doesn't boot at all (I'm 
basing this assumption on the current consumption of the system).

The console shows the following...
initcall: 1001cce0


U-Boot 2016.07-g95a02a7 (Aug 12 2016 - 01:43:34 +0200)

initcall: 1000b5bc
U-Boot code: 10000000 -> 10030338  BSS: -> 1006B424
initcall: 1000b3b4
initcall: 1000bae8
initcall: 1000b5e8
DRAM:  initcall: 100010b8
initcall: 1000b808
Monitor len: 0006B424
Ram size: 04000000
Ram top: 24000000
initcall: 1000b3dc
initcall: 1000b564
TLB table from 23ff0000 to 23ff4000
initcall: 1000b3f4
initcall: 1000b518
Reserving 429k for U-Boot at: 23f84000
initcall: 1000b4ec
Reserving 384k for malloc() at: 23f24000
initcall: 1000b6e8
Reserving 80 Bytes for Board Info at: 23f23fb0
initcall: 1000b3fc
initcall: 1000b4b8
Reserving 192 Bytes for Global Data at: 23f23ef0
initcall: 1000b440
initcall: 1000b414
initcall: 1000b884
initcall: 1000b7e0
initcall: 1000b738

RAM Configuration:
Bank #0: 20000000 64 MiB

DRAM:  64 MiB
initcall: 1000b424
New Stack Pointer is: 23f23ed0
initcall: 1000b6ac
initcall: 1000b640
Relocation Offset is: 13f84000
Relocating to 23f84000, new gd at 23f23ef0, sp at 23f23ed0

Some detail about the board:
AT91RM9200; external boot from /CS0
64Mbyte SDRAM (32bit)
32Mbyte NOR (16bit)
Micrel KSZ8721

Any ideas, pointers, even flame is appreciated. If more info is needed 
I'm happy to deliver
Thanx in advance.
Cheers, Peter
-------------- next part --------------
From fecc3c75294371abe885e9eb3c72e49e3ee498c9 Mon Sep 17 00:00:00 2001
From: kardy <kardy at castiana>
Date: Fri, 12 Aug 2016 01:39:05 +0200
Subject: [PATCH 2/4] Modding the AT91RM9200EK config to match setup and PCB
 used with uboot v1.1.4 Removing unneeded USB cfg

---
 configs/at91rm9200ek_defconfig |  2 --
 include/configs/at91rm9200ek.h | 48 ++++++++++++++++++++----------------------
 2 files changed, 23 insertions(+), 27 deletions(-)

diff --git a/configs/at91rm9200ek_defconfig b/configs/at91rm9200ek_defconfig
index f1303b3..a0499ae 100644
--- a/configs/at91rm9200ek_defconfig
+++ b/configs/at91rm9200ek_defconfig
@@ -5,11 +5,9 @@ CONFIG_BOOTDELAY=3
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
 CONFIG_CMD_BOOTZ=y
-CONFIG_CMD_USB=y
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
-CONFIG_OF_LIBFDT=y
diff --git a/include/configs/at91rm9200ek.h b/include/configs/at91rm9200ek.h
index c92ad85..89876d7 100644
--- a/include/configs/at91rm9200ek.h
+++ b/include/configs/at91rm9200ek.h
@@ -30,6 +30,8 @@
 #define CONFIG_SYS_TEXT_BASE 0x10000000
 #endif
 
+#define CONFIG_SYS_GENERIC_BOARD
+
 /*
  * AT91C_XTAL_CLOCK is the frequency of external xtal in hertz
  * AT91C_MAIN_CLOCK is the frequency of PLLA output
@@ -54,20 +56,24 @@
 
 #define CONFIG_CMDLINE_TAG
 #define CONFIG_SETUP_MEMORY_TAGS
+#define CONFIG_DISPLAY_BOARDINFO
 #define CONFIG_INITRD_TAG
 
 #define CONFIG_BOARD_EARLY_INIT_F
 
+
+
 /*
  * Memory Configuration
  */
 #define CONFIG_NR_DRAM_BANKS		1
 #define CONFIG_SYS_SDRAM_BASE		0x20000000
-#define CONFIG_SYS_SDRAM_SIZE		SZ_32M
+#define CONFIG_SYS_SDRAM_SIZE		SZ_64M
+
+#define CONFIG_SYS_MEMTEST_START        CONFIG_SYS_SDRAM_BASE
+#define CONFIG_SYS_MEMTEST_END          \
+                (CONFIG_SYS_MEMTEST_START + CONFIG_SYS_SDRAM_SIZE - SZ_512K)
 
-#define CONFIG_SYS_MEMTEST_START	CONFIG_SYS_SDRAM_BASE
-#define CONFIG_SYS_MEMTEST_END		\
-		(CONFIG_SYS_MEMTEST_START + CONFIG_SYS_SDRAM_SIZE - SZ_256K)
 
 /*
  * LowLevel Init
@@ -89,7 +95,7 @@
 #define CONFIG_SYS_PIOC_BSR_VAL	0x00000000
 #define CONFIG_SYS_PIOC_PDR_VAL	0xFFFF0000
 #define CONFIG_SYS_EBI_CSA_VAL	0x00000002 /* CS1=CONFIG_SYS_SDRAM */
-#define CONFIG_SYS_SDRC_CR_VAL	0x2188c155 /* set up the CONFIG_SYS_SDRAM */
+#define CONFIG_SYS_SDRC_CR_VAL	0x2188c159 /* set up the CONFIG_SYS_SDRAM */
 #define CONFIG_SYS_SDRAM	CONFIG_SYS_SDRAM_BASE /* address of the SDRAM */
 #define CONFIG_SYS_SDRAM1	(CONFIG_SYS_SDRAM_BASE+0x80)
 #define CONFIG_SYS_SDRAM_VAL	0x00000000 /* value written to CONFIG_SYS_SDRAM */
@@ -97,7 +103,7 @@
 #define CONFIG_SYS_SDRC_MR_VAL1	0x00000004 /* refresh */
 #define CONFIG_SYS_SDRC_MR_VAL2	0x00000003 /* Load Mode Register */
 #define CONFIG_SYS_SDRC_MR_VAL3	0x00000000 /* Normal Mode */
-#define CONFIG_SYS_SDRC_TR_VAL	0x000002E0 /* Write refresh rate */
+#define CONFIG_SYS_SDRC_TR_VAL	0x00000186 /* Write refresh rate */
 #endif	/* CONFIG_SKIP_LOWLEVEL_INIT */
 
 /*
@@ -129,8 +135,14 @@
 /*
  * NOR Flash
  */
-#define CONFIG_FLASH_CFI_DRIVER
+
+
 #define CONFIG_SYS_FLASH_CFI
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_CMD_MTDPARTS
+#define CONFIG_MTD_DEVICE               /* needed for mtdparts commands */
+#define CONFIG_FLASH_CFI_MTD
+#define CONFIG_SYS_FLASH_CFI_WIDTH      FLASH_CFI_16BIT
 #define CONFIG_SYS_FLASH_BASE		0x10000000
 #define PHYS_FLASH_1			CONFIG_SYS_FLASH_BASE
 #define PHYS_FLASH_SIZE			SZ_8M
@@ -139,21 +151,6 @@
 #define CONFIG_SYS_FLASH_PROTECTION
 
 /*
- * USB Config
- */
-#define CONFIG_USB_ATMEL			1
-#define CONFIG_USB_ATMEL_CLK_SEL_PLLB
-#define CONFIG_USB_OHCI_NEW			1
-#define CONFIG_USB_KEYBOARD			1
-#define CONFIG_USB_STORAGE			1
-#define CONFIG_DOS_PARTITION			1
-
-#define CONFIG_SYS_USB_OHCI_CPU_INIT		1
-#define CONFIG_SYS_USB_OHCI_REGS_BASE		ATMEL_USB_HOST_BASE
-#define CONFIG_SYS_USB_OHCI_SLOT_NAME		"at91rm9200"
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS	15
-
-/*
  * Environment Settings
  */
 #define CONFIG_ENV_IS_IN_FLASH
@@ -161,12 +158,13 @@
 /*
  * after u-boot.bin
  */
+
+#define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
+#define CONFIG_SYS_MONITOR_LEN		SZ_512K
 #define CONFIG_ENV_ADDR			\
 		(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN)
 #define CONFIG_ENV_SIZE			SZ_64K /* sectors are 64K here */
 /* The following #defines are needed to get flash environment right */
-#define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE
-#define CONFIG_SYS_MONITOR_LEN		SZ_256K
 
 /*
  * Boot option
@@ -186,7 +184,7 @@
 #define CONFIG_SYS_MAXARGS		16	/* max number of command args */
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE		\
-		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
+		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 64)
 
 /*
  * Size of malloc() pool
-- 
2.1.4

-------------- next part --------------
From e04636bd12b8f8184937ebbe5ecb5503be5027f0 Mon Sep 17 00:00:00 2001
From: kardy <kardy at castiana>
Date: Fri, 12 Aug 2016 01:40:55 +0200
Subject: [PATCH 3/4] Enabling debug

---
 include/common.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/common.h b/include/common.h
index 3feaae6..70c6b24 100644
--- a/include/common.h
+++ b/include/common.h
@@ -95,6 +95,8 @@ typedef volatile unsigned char	vu_char;
 #define CONFIG_SYS_SUPPORT_64BIT_DATA
 #endif
 
+#define DEBUG
+
 #ifdef DEBUG
 #define _DEBUG	1
 #else
-- 
2.1.4

-------------- next part --------------
From 95a02a7c9235d06261437aedfae85c07968d21b2 Mon Sep 17 00:00:00 2001
From: kardy <kardy at castiana>
Date: Fri, 12 Aug 2016 01:41:22 +0200
Subject: [PATCH 4/4] ???

---
 arch/arm/cpu/arm920t/start.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/cpu/arm920t/start.S b/arch/arm/cpu/arm920t/start.S
index 3ada6d0..1913fa0 100644
--- a/arch/arm/cpu/arm920t/start.S
+++ b/arch/arm/cpu/arm920t/start.S
@@ -36,7 +36,7 @@ reset:
 	orr	r0, r0, #0xd3
 	msr	cpsr, r0
 
-#if	defined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK)
+#if	defined(CONFIG_AT91RM9200DK)
 	/*
 	 * relocate exception table
 	 */
-- 
2.1.4



More information about the U-Boot mailing list