[U-Boot] da850evm: u-boot does not start without UBL since commit f1d2b313c9eb6808d30c16a9eb5251240452a56c

Christian Riesch christian.riesch at omicron.at
Mon Jun 20 15:07:52 CEST 2011


Hi Ben,

I had no hardware for a about a week but now I have an AM1808 experimenter's 
kit again and can continue investigating this issue.

On this board, older versions of u-boot (like v2009.11) boot perfectly,
even when TI's UBL boot loader is not used (instead the configuration of 
DDR memory was done using an AIS script). However, since commit 
f1d2b313c9eb6808d30c16a9eb5251240452a56c u-boot boots only when used in 
conjunction with TI's UBL boot loader. When used without UBL, u-boot showed
no sign of life on the serial port.

The content of the .ini file to build the AIS script using the
HexAIS tool was

[General]
busWidth=8
BootMode=SPIMASTER
crcCheckType=NO_CRC
[PLLANDCLOCKCONFIG]
PLL0CFG0 = 0x00180001
PLL0CFG1 = 0x00000205
PERIPHCLKCFG = 0x0000000a
[EMIF3DDR]
PLL1CFG0 = 0x15010001
PLL1CFG1 = 0x00000002
DDRPHYC1R = 0x000000C4
SDCR = 0x0A034622
SDTIMR = 0x184929C8
SDTIMR2 = 0xB80FC700
SDRCR = 0x00000406
CLK2XSRC = 0x00000000
[INPUTFILE]
FILENAME=u-boot.bin
LOADADDRESS=0xC1080000
ENTRYPOINTADDRESS=0xC1080000

After investigating the problem today I figured out that the reason for 
the problem is the configuration of LPSC for UART2. To make u-boot work,
the following lines must be added to the .ini file to enable the UART2
PSC module:

[PSCCONFIG]
LPSCCFG = 0x010D0003

This seems odd, since LPSC configuration is already done by board_init()
in board/davinci/da8xxevm/da850evm.c. However, I guess this initialization
is done too late, since arch/arm/lib/board.c calls other serial port related
functions before board_init() is executed. When I move the LPSC configuration
of UART2 to a board_early_init_f() function, u-boot boots even without the
[PSCCONFIG] section in the .ini file. The patch below does the required
modifications.

Ben, would you mind testing this patch on your board?
Is this the correct way to address this problem?

Best regards, Christian

 board/davinci/da8xxevm/da850evm.c |    7 ++++++-
 include/configs/da850evm.h        |    1 +
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c
index 73eaa48..a864412 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -129,7 +129,6 @@ static const struct lpsc_resource lpsc[] = {
 	{ DAVINCI_LPSC_AEMIF },	/* NAND, NOR */
 	{ DAVINCI_LPSC_SPI1 },	/* Serial Flash */
 	{ DAVINCI_LPSC_EMAC },	/* image download */
-	{ DAVINCI_LPSC_UART2 },	/* console */
 	{ DAVINCI_LPSC_GPIO },
 };
 
@@ -166,6 +165,12 @@ u32 get_board_rev(void)
 	return rev;
 }
 
+int board_early_init_f(void)
+{
+	lpsc_on(DAVINCI_LPSC_UART2);
+	return 0;
+}
+
 int board_init(void)
 {
 #ifndef CONFIG_USE_IRQ
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index bbb5a9b..5d0f5bf 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -42,6 +42,7 @@
 #define CONFIG_SYS_HZ			1000
 #define CONFIG_SKIP_LOWLEVEL_INIT
 #define CONFIG_SYS_TEXT_BASE		0xc1080000
+#define CONFIG_BOARD_EARLY_INIT_F
 
 /*
  * Memory Info
-- 
1.7.0.4



More information about the U-Boot mailing list