]> git.sur5r.net Git - u-boot/commitdiff
ARM: uniphier: hide memory top by platform hook instead of CONFIG
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 6 Jan 2018 13:59:26 +0000 (22:59 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 9 Jan 2018 12:58:19 +0000 (21:58 +0900)
I do not see a good reason to do this by a CONFIG option that affects
all SoCs.  The ram_size can be adjusted by dram_init() at run-time.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
arch/arm/mach-uniphier/dram_init.c
include/configs/uniphier.h

index cb35dabfeceb380093442255e06d110db8131266..f67811425144627b19593003ba9b858df33c3eec 100644 (file)
@@ -238,6 +238,13 @@ int dram_init(void)
                gd->ram_size += dram_map[i].size;
        }
 
+       /*
+        * LD20 uses the last 64 byte for each channel for dynamic
+        * DDR PHY training
+        */
+       if (uniphier_get_soc_id() == UNIPHIER_LD20_ID)
+               gd->ram_size -= 64;
+
        return 0;
 }
 
index 12cbe9b79dbb5d084f77bbe4ee149353fd63b1b5..5ab06f6072dd5d8bf21fb23ecd93e6d11db30499 100644 (file)
 
 #define CONFIG_SYS_SDRAM_BASE          0x80000000
 #define CONFIG_NR_DRAM_BANKS           3
-/* for LD20; the last 64 byte is used for dynamic DDR PHY training */
-#define CONFIG_SYS_MEM_TOP_HIDE                64
 
 #define CONFIG_SYS_INIT_SP_ADDR                (CONFIG_SYS_TEXT_BASE)