From fa2f81b06f666710c756d25297d7a9ca48c65935 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 26 Aug 2016 13:30:43 -0400 Subject: TI: Rework SRAM definitions and maximums On all TI platforms the ROM defines a "downloaded image" area at or near the start of SRAM which is followed by a reserved area. As it is at best bad form and at worst possibly harmful in corner cases to write in this reserved area, we stop doing that by adding in the define NON_SECURE_SRAM_IMG_END to say where the end of the downloaded image area is and make SRAM_SCRATCH_SPACE_ADDR be one kilobyte before this. At current we define the end of scratch space at 0x228 bytes past the start of scratch space this this gives us a lot of room to grow. As these scratch uses are non-optional today, all targets are modified to respect this boundary. Tested on OMAP4 Pandaboard, OMAP3 Beagle xM Cc: Albert Aribaud Cc: Nagendra T S Cc: Vaibhav Hiremath Cc: Lokesh Vutla Cc: Felipe Balbi Cc: Igor Grinberg Cc: Nikita Kiryanov Cc: Paul Kocialkowski Cc: Enric Balletbo i Serra Cc: Adam Ford Cc: Steve Sakoman Cc: Stefan Roese Cc: Thomas Weber Cc: Hannes Schmelzer Cc: Thomas Chou Cc: Masahiro Yamada Cc: Simon Glass Cc: Joe Hershberger Cc: Sam Protsenko Cc: Heiko Schocher Cc: Samuel Egli Cc: Michal Simek Cc: Wolfgang Denk Cc: Mateusz Kulikowski Cc: Ben Whitten Cc: Stefano Babic Cc: Bin Meng Cc: Sekhar Nori Cc: Mugunthan V N Cc: "B, Ravi" Cc: "Matwey V. Kornilov" Cc: Ladislav Michl Cc: Ash Charles Cc: "Kipisz, Steven" Cc: Daniel Allred Signed-off-by: Tom Rini Tested-by: Lokesh Vutla Acked-by: Lokesh Vutla Tested-by: Ladislav Michl --- arch/arm/include/asm/arch-omap5/omap.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'arch/arm/include/asm/arch-omap5') diff --git a/arch/arm/include/asm/arch-omap5/omap.h b/arch/arm/include/asm/arch-omap5/omap.h index 2fd5cda623..ef8e975245 100644 --- a/arch/arm/include/asm/arch-omap5/omap.h +++ b/arch/arm/include/asm/arch-omap5/omap.h @@ -16,6 +16,8 @@ #include #endif /* !(__KERNEL_STRICT_NAMES || __ASSEMBLY__) */ +#include + /* * L4 Peripherals - L4 Wakeup and L4 Core now */ @@ -186,11 +188,13 @@ struct s32ktimer { #if defined(CONFIG_DRA7XX) || defined(CONFIG_AM57XX) #define NON_SECURE_SRAM_START 0x40300000 #define NON_SECURE_SRAM_END 0x40380000 /* Not inclusive */ +#define NON_SECURE_SRAM_IMG_END 0x4037E000 #else #define NON_SECURE_SRAM_START 0x40300000 #define NON_SECURE_SRAM_END 0x40320000 /* Not inclusive */ +#define NON_SECURE_SRAM_IMG_END 0x4031E000 #endif -#define SRAM_SCRATCH_SPACE_ADDR 0x4031E000 +#define SRAM_SCRATCH_SPACE_ADDR (NON_SECURE_SRAM_IMG_END - SZ_1K) /* base address for indirect vectors (internal boot mode) */ #define SRAM_ROM_VECT_BASE 0x4031F000 -- cgit