samsung:board: dram_init(): alloc memory to store fdt dram info
authorPrzemyslaw Marczak <p.marczak@samsung.com>
Thu, 18 Sep 2014 14:20:29 +0000 (16:20 +0200)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 20 Oct 2020 00:43:31 +0000 (09:43 +0900)
commit87e4f2b3392c2b68d34cdada8b3f3fbe76e22221
treed4160942604d94b7da7a6e5efc0f1ec1899f9087
parent1b97369b34b3f18694f29a632f54211521fcd34b
samsung:board: dram_init(): alloc memory to store fdt dram info

For CONFIG_OF_MULTI the dram_init() function gets memory information
from the device tree blob by the call to fdtdec_decode_memory().
The same is done second time in dram_init_banksize() - this was the
simplest because board info structure is not initialized at dram_init()
stage.

This change uses malloc and gd->priv pointer to store the memory banks
parameters and next uses it in dram_init_banksize().

Thanks to this change, the boot time decreases, because, the function
fdtdec_decode_memory() is called only once.

Change-Id: I8f357c6a641d4440f32d2fe24d7e1e2dc5bc4a3d
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
board/samsung/common/board.c
board/samsung/common/misc.c
include/samsung/misc.h
include/samsung/multi-plat.h [new file with mode: 0644]