summaryrefslogtreecommitdiff
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
parentb0b13f4114d30b6756e0f6f3b5819d78de22541e (diff)
parent56f01746ab5c6950bd0f76d02252ee4450f86659 (diff)
downloadu-boot-2fa581ba910368d0f7f995fb906d6c5e4218b594.tar.gz
Merge git://git.denx.de/u-boot-shWIP/21May2020
- Enable -ffunction-sections / -fdata-sections --gc-sections to SH - RCar Gen3 updates
-rw-r--r--arch/arm/dts/Makefile4
-rw-r--r--arch/arm/dts/r8a77950-salvator-x-u-boot.dts2
-rw-r--r--arch/arm/dts/r8a77950-ulcb-u-boot.dts2
-rw-r--r--arch/arm/dts/r8a77960-salvator-x-u-boot.dts2
-rw-r--r--arch/arm/dts/r8a77960-ulcb-u-boot.dts2
-rw-r--r--arch/arm/dts/r8a77965-salvator-x-u-boot.dts2
-rw-r--r--arch/arm/dts/r8a77965-ulcb-u-boot.dts2
-rw-r--r--arch/arm/dts/r8a77990-ebisu.dts1
-rw-r--r--arch/sh/config.mk2
-rw-r--r--board/renesas/rcar-common/common.c28
-rw-r--r--configs/r8a77970_eagle_defconfig2
-rw-r--r--configs/r8a77980_condor_defconfig2
-rw-r--r--configs/r8a77990_ebisu_defconfig2
-rw-r--r--configs/r8a77995_draak_defconfig2
-rw-r--r--configs/rcar3_salvator-x_defconfig2
-rw-r--r--configs/rcar3_ulcb_defconfig2
-rw-r--r--include/fdtdec.h5
-rw-r--r--lib/fdtdec.c11
-rw-r--r--scripts/dtc/libfdt/fdt_overlay.c5
-rw-r--r--scripts/dtc/libfdt/libfdt.h7
20 files changed, 67 insertions, 20 deletions
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 2404eaa5ee..12ec6c71dc 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -777,6 +777,10 @@ dtb-$(CONFIG_RCAR_GEN3) += \
r8a77990-ebisu-u-boot.dtb \
r8a77995-draak-u-boot.dtb
+ifdef CONFIG_RCAR_GEN3
+DTC_FLAGS += -R 4 -p 0x1000
+endif
+
dtb-$(CONFIG_RZA1) += \
r7s72100-gr-peach-u-boot.dtb
diff --git a/arch/arm/dts/r8a77950-salvator-x-u-boot.dts b/arch/arm/dts/r8a77950-salvator-x-u-boot.dts
index 6e5c271d3c..e039e33d59 100644
--- a/arch/arm/dts/r8a77950-salvator-x-u-boot.dts
+++ b/arch/arm/dts/r8a77950-salvator-x-u-boot.dts
@@ -16,6 +16,8 @@
};
&sdhi2 {
+ mmc-ddr-1_8v;
+ mmc-hs200-1_8v;
mmc-hs400-1_8v;
max-frequency = <200000000>;
};
diff --git a/arch/arm/dts/r8a77950-ulcb-u-boot.dts b/arch/arm/dts/r8a77950-ulcb-u-boot.dts
index fb9bbe1439..b7f26c11b1 100644
--- a/arch/arm/dts/r8a77950-ulcb-u-boot.dts
+++ b/arch/arm/dts/r8a77950-ulcb-u-boot.dts
@@ -27,6 +27,8 @@
};
&sdhi2 {
+ mmc-ddr-1_8v;
+ mmc-hs200-1_8v;
mmc-hs400-1_8v;
max-frequency = <200000000>;
};
diff --git a/arch/arm/dts/r8a77960-salvator-x-u-boot.dts b/arch/arm/dts/r8a77960-salvator-x-u-boot.dts
index a3f2d74150..d3b09246f5 100644
--- a/arch/arm/dts/r8a77960-salvator-x-u-boot.dts
+++ b/arch/arm/dts/r8a77960-salvator-x-u-boot.dts
@@ -16,6 +16,8 @@
};
&sdhi2 {
+ mmc-ddr-1_8v;
+ mmc-hs200-1_8v;
mmc-hs400-1_8v;
max-frequency = <200000000>;
};
diff --git a/arch/arm/dts/r8a77960-ulcb-u-boot.dts b/arch/arm/dts/r8a77960-ulcb-u-boot.dts
index 04023d9597..bd1d634574 100644
--- a/arch/arm/dts/r8a77960-ulcb-u-boot.dts
+++ b/arch/arm/dts/r8a77960-ulcb-u-boot.dts
@@ -27,6 +27,8 @@
};
&sdhi2 {
+ mmc-ddr-1_8v;
+ mmc-hs200-1_8v;
mmc-hs400-1_8v;
max-frequency = <200000000>;
};
diff --git a/arch/arm/dts/r8a77965-salvator-x-u-boot.dts b/arch/arm/dts/r8a77965-salvator-x-u-boot.dts
index e4bd2d3e4f..d6f0708555 100644
--- a/arch/arm/dts/r8a77965-salvator-x-u-boot.dts
+++ b/arch/arm/dts/r8a77965-salvator-x-u-boot.dts
@@ -17,6 +17,8 @@
};
&sdhi2 {
+ mmc-ddr-1_8v;
+ mmc-hs200-1_8v;
mmc-hs400-1_8v;
max-frequency = <200000000>;
status = "okay";
diff --git a/arch/arm/dts/r8a77965-ulcb-u-boot.dts b/arch/arm/dts/r8a77965-ulcb-u-boot.dts
index 28fb30e9a9..954d8b685c 100644
--- a/arch/arm/dts/r8a77965-ulcb-u-boot.dts
+++ b/arch/arm/dts/r8a77965-ulcb-u-boot.dts
@@ -28,6 +28,8 @@
};
&sdhi2 {
+ mmc-ddr-1_8v;
+ mmc-hs200-1_8v;
mmc-hs400-1_8v;
max-frequency = <200000000>;
status = "okay";
diff --git a/arch/arm/dts/r8a77990-ebisu.dts b/arch/arm/dts/r8a77990-ebisu.dts
index 4fd2b14fbb..07a4c9bbae 100644
--- a/arch/arm/dts/r8a77990-ebisu.dts
+++ b/arch/arm/dts/r8a77990-ebisu.dts
@@ -713,6 +713,7 @@
vmmc-supply = <&reg_3p3v>;
vqmmc-supply = <&reg_1p8v>;
+ mmc-ddr-1_8v;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
bus-width = <8>;
diff --git a/arch/sh/config.mk b/arch/sh/config.mk
index 6ef44638ab..85dab383e7 100644
--- a/arch/sh/config.mk
+++ b/arch/sh/config.mk
@@ -13,6 +13,6 @@ LDFLAGS_STANDALONE += -EB
endif
PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
-PLATFORM_RELFLAGS += -fpic
+PLATFORM_RELFLAGS += -fpic -ffunction-sections -fdata-sections
LDFLAGS_FINAL = --gc-sections
PLATFORM_RELFLAGS += -ffixed-r13
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;
}
diff --git a/configs/r8a77970_eagle_defconfig b/configs/r8a77970_eagle_defconfig
index 78bfb9a032..2a53f16ee9 100644
--- a/configs/r8a77970_eagle_defconfig
+++ b/configs/r8a77970_eagle_defconfig
@@ -57,6 +57,8 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SCIF_CONSOLE=y
+CONFIG_TEE=y
+CONFIG_OPTEE=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_RENESAS_RPC_SPI=y
diff --git a/configs/r8a77980_condor_defconfig b/configs/r8a77980_condor_defconfig
index 83d6a75670..d9272b85c4 100644
--- a/configs/r8a77980_condor_defconfig
+++ b/configs/r8a77980_condor_defconfig
@@ -61,6 +61,8 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SCIF_CONSOLE=y
+CONFIG_TEE=y
+CONFIG_OPTEE=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_RENESAS_RPC_SPI=y
diff --git a/configs/r8a77990_ebisu_defconfig b/configs/r8a77990_ebisu_defconfig
index cc9257b81b..e4a017aa23 100644
--- a/configs/r8a77990_ebisu_defconfig
+++ b/configs/r8a77990_ebisu_defconfig
@@ -55,6 +55,8 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SCIF_CONSOLE=y
+CONFIG_TEE=y
+CONFIG_OPTEE=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
diff --git a/configs/r8a77995_draak_defconfig b/configs/r8a77995_draak_defconfig
index 89b0f15c76..b2dc167b9f 100644
--- a/configs/r8a77995_draak_defconfig
+++ b/configs/r8a77995_draak_defconfig
@@ -63,6 +63,8 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SCIF_CONSOLE=y
+CONFIG_TEE=y
+CONFIG_OPTEE=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
diff --git a/configs/rcar3_salvator-x_defconfig b/configs/rcar3_salvator-x_defconfig
index 3031fdde2d..6944edcd01 100644
--- a/configs/rcar3_salvator-x_defconfig
+++ b/configs/rcar3_salvator-x_defconfig
@@ -61,6 +61,8 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SCIF_CONSOLE=y
+CONFIG_TEE=y
+CONFIG_OPTEE=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
diff --git a/configs/rcar3_ulcb_defconfig b/configs/rcar3_ulcb_defconfig
index 53ea93801b..4be3e0b345 100644
--- a/configs/rcar3_ulcb_defconfig
+++ b/configs/rcar3_ulcb_defconfig
@@ -58,6 +58,8 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SCIF_CONSOLE=y
+CONFIG_TEE=y
+CONFIG_OPTEE=y
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 166f29c55b..abd6d42671 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -1155,6 +1155,11 @@ int fdtdec_set_carveout(void *blob, const char *node, const char *prop_name,
*/
int fdtdec_setup(void);
+/**
+ * Perform board-specific early DT adjustments
+ */
+int fdtdec_board_setup(const void *fdt_blob);
+
#if CONFIG_IS_ENABLED(MULTI_DTB_FIT)
/**
* fdtdec_resetup() - Set up the device tree again
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 9c4d5713e1..1f2b763acc 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1474,8 +1474,14 @@ int fdtdec_set_carveout(void *blob, const char *node, const char *prop_name,
return 0;
}
+__weak int fdtdec_board_setup(const void *fdt_blob)
+{
+ return 0;
+}
+
int fdtdec_setup(void)
{
+ int ret;
#if CONFIG_IS_ENABLED(OF_CONTROL)
# if CONFIG_IS_ENABLED(MULTI_DTB_FIT)
void *fdt_blob;
@@ -1528,7 +1534,10 @@ int fdtdec_setup(void)
# endif
#endif
- return fdtdec_prepare_fdt();
+ ret = fdtdec_prepare_fdt();
+ if (!ret)
+ ret = fdtdec_board_setup(gd->fdt_blob);
+ return ret;
}
#if CONFIG_IS_ENABLED(MULTI_DTB_FIT)
diff --git a/scripts/dtc/libfdt/fdt_overlay.c b/scripts/dtc/libfdt/fdt_overlay.c
index be71873366..c090e6991e 100644
--- a/scripts/dtc/libfdt/fdt_overlay.c
+++ b/scripts/dtc/libfdt/fdt_overlay.c
@@ -879,3 +879,8 @@ err:
return ret;
}
+
+int fdt_overlay_apply_node(void *fdt, int target, void *fdto, int node)
+{
+ return overlay_apply_node(fdt, target, fdto, node);
+}
diff --git a/scripts/dtc/libfdt/libfdt.h b/scripts/dtc/libfdt/libfdt.h
index fa63fffe28..421f90ad93 100644
--- a/scripts/dtc/libfdt/libfdt.h
+++ b/scripts/dtc/libfdt/libfdt.h
@@ -2032,6 +2032,13 @@ int fdt_del_node(void *fdt, int nodeoffset);
*/
int fdt_overlay_apply(void *fdt, void *fdto);
+/**
+ * fdt_overlay_apply_node - Merges a node into the base device tree
+ *
+ * See overlay_apply_node() for details.
+ */
+int fdt_overlay_apply_node(void *fdt, int target, void *fdto, int node);
+
/**********************************************************************/
/* Debugging / informational functions */
/**********************************************************************/