summaryrefslogtreecommitdiff
path: root/arch/arm/mach-u8500
diff options
context:
space:
mode:
authorStephan Gerhold <stephan@gerhold.net>2021-07-07 12:58:54 +0200
committerTom Rini <trini@konsulko.com>2021-07-14 16:48:11 -0400
commit03585d52fcb7c4f769b9af32085dcc365f39edbc (patch)
tree72feb4d627eab2165a55b4247e5d59f8a2b8f583 /arch/arm/mach-u8500
parent9e9074bcdd52e0e898c668eaac9555504370cc92 (diff)
downloadu-boot-03585d52fcb7c4f769b9af32085dcc365f39edbc.tar.gz
board: stemmy: Parse atags to get available memory
At the moment the "stemmy" board attempts to detect the RAM size with a simple memory test (get_ram_size()). Unfortunately, this does not work correctly for devices with 768 MiB RAM (e.g. Samsung Galaxy Ace 2 (GT-I8160), "codina"). Reading/writing memory after the 768 MiB RAM succeeds but actually overwrites some earlier parts of the memory. For U-Boot this does not result in any major problems, but on Linux this will eventually lead to strange crashes because of the memory corruption. Since the "stemmy" U-Boot port is designed to be chainloaded from the original Samsung bootloader, the most reliable way to get the available amount of RAM is to look at the ATAGS passed by the Samsung bootloader. Fortunately, the header used to generate ATAGS in U-Boot (asm/setup.h) can also be easily used to parse them. Also clarify and simplify stemmy.h a bit to make it more clear where some of the magic values in there are actually coming from. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-u8500')
-rw-r--r--arch/arm/mach-u8500/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-u8500/Kconfig b/arch/arm/mach-u8500/Kconfig
index 7478deb25f..372fbeb80f 100644
--- a/arch/arm/mach-u8500/Kconfig
+++ b/arch/arm/mach-u8500/Kconfig
@@ -15,6 +15,7 @@ config TARGET_STEMMY
- Samsung Galaxy S III mini (GT-I8190) "golden"
- Samsung Galaxy S Advance (GT-I9070) "janice"
- Samsung Galaxy Xcover 2 (GT-S7710) "skomer"
+ - Samsung Galaxy Ace 2 (GT-I8160) "codina"
and likely others as well (untested).