Merge git://git.denx.de/u-boot-sh

- Enable -ffunction-sections / -fdata-sections --gc-sections to SH
- RCar Gen3 updates
This commit is contained in:
Tom Rini 2020-05-21 08:26:40 -04:00
commit 2fa581ba91
20 changed files with 69 additions and 22 deletions

View File

@ -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

View File

@ -16,6 +16,8 @@
};
&sdhi2 {
mmc-ddr-1_8v;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
max-frequency = <200000000>;
};

View File

@ -27,6 +27,8 @@
};
&sdhi2 {
mmc-ddr-1_8v;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
max-frequency = <200000000>;
};

View File

@ -16,6 +16,8 @@
};
&sdhi2 {
mmc-ddr-1_8v;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
max-frequency = <200000000>;
};

View File

@ -27,6 +27,8 @@
};
&sdhi2 {
mmc-ddr-1_8v;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
max-frequency = <200000000>;
};

View File

@ -17,6 +17,8 @@
};
&sdhi2 {
mmc-ddr-1_8v;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
max-frequency = <200000000>;
status = "okay";

View File

@ -28,6 +28,8 @@
};
&sdhi2 {
mmc-ddr-1_8v;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
max-frequency = <200000000>;
status = "okay";

View File

@ -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>;

View File

@ -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

View File

@ -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 fdtdec_board_setup(const void *fdt_blob)
{
void *atf_fdt_blob = (void *)(rcar_atf_boot_args[1]);
if (fdt_magic(atf_fdt_blob) == FDT_MAGIC)
fdt_overlay_apply_node((void *)fdt_blob, 0, atf_fdt_blob, 0);
return 0;
}
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(blob);
return fdtdec_setup_mem_size_base_fdt(gd->fdt_blob);
}
int dram_init_banksize(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;
fdtdec_setup_memory_banksize_fdt(blob);
fdtdec_setup_memory_banksize_fdt(gd->fdt_blob);
return 0;
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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);
}

View File

@ -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 */
/**********************************************************************/