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)
committerPrzemyslaw Marczak <p.marczak@samsung.com>
Tue, 23 Sep 2014 08:42:33 +0000 (10:42 +0200)
commitc236c8614a57421b264ba54e434201ef559d2e01
tree6b769ccebb4a178a6f91b64790d7871cd07399a6
parent940c71b7ea8e1dfc706e44e94a3c05a8a94adace
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
include/samsung/multi-plat.h [new file with mode: 0644]