1 // SPDX-License-Identifier: GPL-2.0
3 * board/renesas/rcar-common/common.c
5 * Copyright (C) 2013 Renesas Electronics Corporation
11 #include <asm/arch/rmobile.h>
13 #ifdef CONFIG_RCAR_GEN3
15 DECLARE_GLOBAL_DATA_PTR;
17 /* If the firmware passed a device tree use it for U-Boot DRAM setup. */
18 extern u64 rcar_atf_boot_args[];
22 const void *atf_fdt_blob = (const void *)(rcar_atf_boot_args[1]);
25 /* Check if ATF passed us DTB. If not, fall back to builtin DTB. */
26 if (fdt_magic(atf_fdt_blob) == FDT_MAGIC)
31 return fdtdec_setup_mem_size_base_fdt(blob);
34 int dram_init_banksize(void)
36 const void *atf_fdt_blob = (const void *)(rcar_atf_boot_args[1]);
39 /* Check if ATF passed us DTB. If not, fall back to builtin DTB. */
40 if (fdt_magic(atf_fdt_blob) == FDT_MAGIC)
45 fdtdec_setup_memory_banksize_fdt(blob);