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-am33xx/omap.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'arch/arm/include/asm/arch-am33xx/omap.h') diff --git a/arch/arm/include/asm/arch-am33xx/omap.h b/arch/arm/include/asm/arch-am33xx/omap.h index 47962dadf5..3293caaca4 100644 --- a/arch/arm/include/asm/arch-am33xx/omap.h +++ b/arch/arm/include/asm/arch-am33xx/omap.h @@ -15,24 +15,23 @@ #ifndef _OMAP_H_ #define _OMAP_H_ +#include + #ifdef CONFIG_AM33XX #define NON_SECURE_SRAM_START 0x402F0400 #define NON_SECURE_SRAM_END 0x40310000 -#define SRAM_SCRATCH_SPACE_ADDR 0x4030B800 +#define NON_SECURE_SRAM_IMG_END 0x4030B800 #elif defined(CONFIG_TI81XX) #define NON_SECURE_SRAM_START 0x40300000 #define NON_SECURE_SRAM_END 0x40320000 -#define SRAM_SCRATCH_SPACE_ADDR 0x4031B800 +#define NON_SECURE_SRAM_IMG_END 0x4031B800 #elif defined(CONFIG_AM43XX) #define NON_SECURE_SRAM_START 0x402F0400 #define NON_SECURE_SRAM_END 0x40340000 -#define SRAM_SCRATCH_SPACE_ADDR 0x40337C00 -#define AM4372_BOARD_NAME_START SRAM_SCRATCH_SPACE_ADDR -#define AM4372_BOARD_NAME_END SRAM_SCRATCH_SPACE_ADDR + 0xC -#define AM4372_BOARD_VERSION_START SRAM_SCRATCH_SPACE_ADDR + 0xD -#define AM4372_BOARD_VERSION_END SRAM_SCRATCH_SPACE_ADDR + 0x14 +#define NON_SECURE_SRAM_IMG_END 0x40337DE0 #define QSPI_BASE 0x47900000 #endif +#define SRAM_SCRATCH_SPACE_ADDR (NON_SECURE_SRAM_IMG_END - SZ_1K) /* Boot parameters */ #ifndef __ASSEMBLY__ -- cgit