diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-01-06 22:59:26 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-01-09 21:58:19 +0900 |
commit | a322eb9ff6f4c43d378b683457bdbfc59c1c19a6 (patch) | |
tree | 772d381201ea7d9c451bc5c79eb0a7e102cc6ea9 /arch/arm | |
parent | 3281532ab27f3a9da8821ada30bf3da8782759d4 (diff) |
ARM: uniphier: hide memory top by platform hook instead of CONFIG
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>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-uniphier/dram_init.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c index cb35dabfec..f678114251 100644 --- a/arch/arm/mach-uniphier/dram_init.c +++ b/arch/arm/mach-uniphier/dram_init.c @@ -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; } |