[U-Boot] [PATCH 0/2] SPL: omap4: Fix boot crash in HS devices.

The maximum size of the SPL is curerntly set to 38k bytes. But the maximum SRAM available is 32K in case of HS devieces. So SPL with size greater than 32K bytes does not boot on HS devices. So
1) Reduce the default SPL size by using ddr pre-calculated tables. 2) Restrict the SPL maximum size to 32K bytes.
sricharan (2): U-Boot/SPL: omap4: Make ddr pre-calculated timings as default. SPL: omap4: Reduce the maximum size of SPL to 32K bytes.
include/configs/omap4_common.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)

All ddr configurations(geometry/timings) are done automatically by detecting the device connected at run time. Though this is a useful feature, making this as a default setting increases the code size by about 2K bytes. This is quite big, especially in the case of SPL which runs from a smaller SRAM. So do not use this feature as the default setting, instead use the precalculated tables.
Signed-off-by: sricharan r.sricharan@ti.com --- include/configs/omap4_common.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h index d8ac8c0..e10ab00 100644 --- a/include/configs/omap4_common.h +++ b/include/configs/omap4_common.h @@ -236,6 +236,8 @@ #endif
/* Defines for SDRAM init */ +#define CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS + #ifndef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS #define CONFIG_SYS_AUTOMATIC_SDRAM_DETECTION #define CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS

The maximum size of SPL is set to 38K bytes. But the maximum size of SPL cannot exceed 32k bytes in case of HS devices. So restrict the size to 32k bytes for compatability with both HS/GP devices.
Signed-off-by: sricharan r.sricharan@ti.com --- include/configs/omap4_common.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h index e10ab00..7346934 100644 --- a/include/configs/omap4_common.h +++ b/include/configs/omap4_common.h @@ -246,7 +246,7 @@ /* Defines for SPL */ #define CONFIG_SPL #define CONFIG_SPL_TEXT_BASE 0x40304350 -#define CONFIG_SPL_MAX_SIZE (38 * 1024) +#define CONFIG_SPL_MAX_SIZE (32 * 1024) #define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK
#define CONFIG_SPL_BSS_START_ADDR 0x80000000

Dear sricharan,
Am 27.09.2011 um 13:43 schrieb sricharan:
The maximum size of SPL is set to 38K bytes. But the maximum size of SPL cannot exceed 32k bytes in case of HS devices. So restrict the size to 32k bytes for compatability with both HS/GP devices.
Signed-off-by: sricharan r.sricharan@ti.com
include/configs/omap4_common.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h index e10ab00..7346934 100644 --- a/include/configs/omap4_common.h +++ b/include/configs/omap4_common.h @@ -246,7 +246,7 @@ /* Defines for SPL */ #define CONFIG_SPL #define CONFIG_SPL_TEXT_BASE 0x40304350
can you please add one line commenting why we use 32k here?
-#define CONFIG_SPL_MAX_SIZE (38 * 1024) +#define CONFIG_SPL_MAX_SIZE (32 * 1024)
best regards
Andreas Bießmann

Hi Andreas Bießmann,
-----Original Message----- From: Andreas Bießmann [mailto:andreas.devel@googlemail.com] Sent: Wednesday, September 28, 2011 1:39 PM To: sricharan Cc: u-boot@lists.denx.de; aneesh@ti.com Subject: Re: [U-Boot] [PATCH 2/2] SPL: omap4: Reduce the maximum size of SPL to 32K bytes.
Dear sricharan,
Am 27.09.2011 um 13:43 schrieb sricharan:
The maximum size of SPL is set to 38K bytes. But the maximum size of SPL cannot exceed 32k bytes in case of HS devices. So restrict the size to 32k bytes for compatability with both HS/GP devices.
Signed-off-by: sricharan r.sricharan@ti.com
include/configs/omap4_common.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/configs/omap4_common.h
b/include/configs/omap4_common.h
index e10ab00..7346934 100644 --- a/include/configs/omap4_common.h +++ b/include/configs/omap4_common.h @@ -246,7 +246,7 @@ /* Defines for SPL */ #define CONFIG_SPL #define CONFIG_SPL_TEXT_BASE 0x40304350
can you please add one line commenting why we use 32k here?
Sure, I will add this comment.
-#define CONFIG_SPL_MAX_SIZE (38 * 1024) +#define CONFIG_SPL_MAX_SIZE (32 * 1024)
best regards
Andreas Bießmann
participants (3)
-
Andreas Bießmann
-
sricharan
-
Sricharan R