summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-05-21 08:26:40 -0400
committerTom Rini <trini@konsulko.com>2020-05-21 08:26:40 -0400
commit2fa581ba910368d0f7f995fb906d6c5e4218b594 (patch)
treefdbb131099e601f1500908398db119d7f2050225 /board
parentb0b13f4114d30b6756e0f6f3b5819d78de22541e (diff)
parent56f01746ab5c6950bd0f76d02252ee4450f86659 (diff)
downloadu-boot-2fa581ba910368d0f7f995fb906d6c5e4218b594.tar.gz
u-boot-2fa581ba910368d0f7f995fb906d6c5e4218b594.tar.bz2
u-boot-2fa581ba910368d0f7f995fb906d6c5e4218b594.zip
Merge git://git.denx.de/u-boot-sh
- Enable -ffunction-sections / -fdata-sections --gc-sections to SH - RCar Gen3 updates
Diffstat (limited to 'board')
-rw-r--r--board/renesas/rcar-common/common.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/board/renesas/rcar-common/common.c b/board/renesas/rcar-common/common.c
index b9e8cb4ce7..46dcea1f90 100644
--- a/board/renesas/rcar-common/common.c
+++ b/board/renesas/rcar-common/common.c
@@ -21,32 +21,24 @@ DECLARE_GLOBAL_DATA_PTR;
/* If the firmware passed a device tree use it for U-Boot DRAM setup. */
extern u64 rcar_atf_boot_args[];
-int dram_init(void)
+int fdtdec_board_setup(const void *fdt_blob)
{
- const void *atf_fdt_blob = (const void *)(rcar_atf_boot_args[1]);
- const void *blob;
+ void *atf_fdt_blob = (void *)(rcar_atf_boot_args[1]);
- /* Check if ATF passed us DTB. If not, fall back to builtin DTB. */
if (fdt_magic(atf_fdt_blob) == FDT_MAGIC)
- blob = atf_fdt_blob;
- else
- blob = gd->fdt_blob;
+ fdt_overlay_apply_node((void *)fdt_blob, 0, atf_fdt_blob, 0);
- return fdtdec_setup_mem_size_base_fdt(blob);
+ return 0;
}
-int dram_init_banksize(void)
+int dram_init(void)
{
- const void *atf_fdt_blob = (const void *)(rcar_atf_boot_args[1]);
- const void *blob;
-
- /* Check if ATF passed us DTB. If not, fall back to builtin DTB. */
- if (fdt_magic(atf_fdt_blob) == FDT_MAGIC)
- blob = atf_fdt_blob;
- else
- blob = gd->fdt_blob;
+ return fdtdec_setup_mem_size_base_fdt(gd->fdt_blob);
+}
- fdtdec_setup_memory_banksize_fdt(blob);
+int dram_init_banksize(void)
+{
+ fdtdec_setup_memory_banksize_fdt(gd->fdt_blob);
return 0;
}