• Nathan Rossi's avatar
    fdt: add memory bank decoding functions for board setup · 623f6019
    Nathan Rossi authored
    Add two functions for use by board implementations to decode the memory
    banks of the /memory node so as to populate the global data with
    ram_size and board info for memory banks.
    
    The fdtdec_setup_memory_size() function decodes the first memory bank
    and sets up the gd->ram_size with the size of the memory bank. This
    function should be called from the boards dram_init().
    
    The fdtdec_setup_memory_banksize() function decode the memory banks
    (up to the CONFIG_NR_DRAM_BANKS) and populates the base address and size
    into the gd->bd->bi_dram array of banks. This function should be called
    from the boards dram_init_banksize().
    Signed-off-by: default avatarNathan Rossi <nathan@nathanrossi.com>
    Cc: Simon Glass <sjg@chromium.org>
    Cc: Michal Simek <monstr@monstr.eu>
    Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
    Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
    623f6019
fdtdec.h 36.3 KB