From 19bbd098254fefd94199001e721f92f167f7ed9e Mon Sep 17 00:00:00 2001 From: Christoph Niedermaier Date: Fri, 19 Oct 2018 17:40:54 +0200 Subject: imx: imx6: perform gpr_init only on suitable cpu types If the function gpr_init is used in a common MX6 spl implementation we have to ensure that it is only called for suitable cpu types, otherwise it breaks hardware parts like enet1, can1, can2, etc. Signed-off-by: Christoph Niedermaier --- arch/arm/mach-imx/mx6/soc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index 31c9a6e4e37..e80f1d484b0 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -660,6 +660,14 @@ void gpr_init(void) { struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR; + /* + * If this function is used in a common MX6 spl implementation + * we have to ensure that it is only called for suitable cpu types, + * otherwise it breaks hardware parts like enet1, can1, can2, etc. + */ + if (!is_mx6dqp() && !is_mx6dq() && !is_mx6sdl()) + return; + /* enable AXI cache for VDOA/VPU/IPU */ writel(0xF00000CF, &iomux->gpr[4]); if (is_mx6dqp()) { -- cgit v1.2.3 From f127124f8bfb9e83f4b6867ec9cd1db81085d0e5 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Fri, 9 Nov 2018 15:31:14 +0100 Subject: board: toradex: colibri_vf: efi_loader: unset CONFIG_EFI_UNICODE_CAPITALIZATION Unset CONFIG_EFI_UNICODE_CAPITALIZATION on boards with tough size restrictions. This is analogous to commit a90bf07afc43 ("efi_loader: unset CONFIG_EFI_UNICODE_CAPITALIZATION"). Signed-off-by: Marcel Ziswiler Reviewed-by: Alexander Graf --- configs/colibri_vf_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/colibri_vf_defconfig b/configs/colibri_vf_defconfig index 5854910f7ba..38f450c8eda 100644 --- a/configs/colibri_vf_defconfig +++ b/configs/colibri_vf_defconfig @@ -72,3 +72,4 @@ CONFIG_VIDEO_FSL_DCU_FB=y CONFIG_VIDEO=y CONFIG_SYS_CONSOLE_FG_COL=0x00 CONFIG_OF_LIBFDT_OVERLAY=y +# CONFIG_EFI_UNICODE_CAPITALIZATION is not set -- cgit v1.2.3 From 873629cd63b024f6795765affe8a8a8f74f49e68 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Fri, 9 Nov 2018 15:31:15 +0100 Subject: board: toradex: colibri_vf: unset CONFIG_CMDLINE_EDITING Unset CONFIG_CMDLINE_EDITING saving precious 4 Kb on boards with tough size restrictions. Signed-off-by: Marcel Ziswiler --- configs/colibri_vf_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/colibri_vf_defconfig b/configs/colibri_vf_defconfig index 38f450c8eda..9b0de1ed0af 100644 --- a/configs/colibri_vf_defconfig +++ b/configs/colibri_vf_defconfig @@ -14,6 +14,7 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_ARCH_MISC_INIT=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_HUSH_PARSER=y +# CONFIG_CMDLINE_EDITING is not set # CONFIG_AUTO_COMPLETE is not set CONFIG_SYS_PROMPT="Colibri VFxx # " CONFIG_CMD_BOOTZ=y -- cgit v1.2.3 From 42cc42aceab73f25b7a4e791aa1478add987cee8 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Fri, 9 Nov 2018 15:31:16 +0100 Subject: board: toradex: colibri_vf: drop SPI support Drop SPI support saving precious 4 Kb on boards with tough size restrictions. Signed-off-by: Marcel Ziswiler Signed-off-by: Marcel Ziswiler --- configs/colibri_vf_defconfig | 4 ---- 1 file changed, 4 deletions(-) diff --git a/configs/colibri_vf_defconfig b/configs/colibri_vf_defconfig index 9b0de1ed0af..fb0578868d7 100644 --- a/configs/colibri_vf_defconfig +++ b/configs/colibri_vf_defconfig @@ -24,7 +24,6 @@ CONFIG_CMD_DFU=y CONFIG_CMD_FUSE=y CONFIG_CMD_GPIO=y CONFIG_CMD_MMC=y -CONFIG_CMD_SPI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y # CONFIG_CMD_SETEXPR is not set @@ -56,9 +55,6 @@ CONFIG_PHY_MICREL=y CONFIG_MII=y CONFIG_DM_SERIAL=y CONFIG_FSL_LPUART=y -CONFIG_SPI=y -CONFIG_DM_SPI=y -CONFIG_FSL_DSPI=y CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y -- cgit v1.2.3 From 43e6f94cbcaf193aeedcf86e85a3ff4c79f66773 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Fri, 9 Nov 2018 15:31:17 +0100 Subject: imx: mkimage: add size check to the u-boot.imx make target The make macro to check if the binary exceeds the board size limit is taken straight from the root Makefile. Without this and e.g. enabled EFI Vybrid fails booting as the regular size limit check does not take the final u-boot.imx binary size into account which is bigger due to alignment as well as IMX header stuff. Signed-off-by: Marcel Ziswiler Reviewed-by: Fabio Estevam --- arch/arm/mach-imx/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 72fe23a2b95..53d9e5f42bc 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -58,6 +58,21 @@ obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o obj-$(CONFIG_CMD_DEKBLOB) += cmd_dek.o endif +ifneq ($(CONFIG_BOARD_SIZE_LIMIT),) +BOARD_SIZE_CHECK = \ + @actual=`wc -c $@ | awk '{print $$1}'`; \ + limit=`printf "%d" $(CONFIG_BOARD_SIZE_LIMIT)`; \ + if test $$actual -gt $$limit; then \ + echo "$@ exceeds file size limit:" >&2 ; \ + echo " limit: $$limit bytes" >&2 ; \ + echo " actual: $$actual bytes" >&2 ; \ + echo " excess: $$((actual - limit)) bytes" >&2; \ + exit 1; \ + fi +else +BOARD_SIZE_CHECK = +endif + PLUGIN = board/$(BOARDDIR)/plugin ifeq ($(CONFIG_USE_IMXIMG_PLUGIN),y) @@ -101,6 +116,7 @@ u-boot.imx: MKIMAGEOUTPUT = u-boot.imx.log u-boot.imx: u-boot.bin u-boot.cfgout $(PLUGIN).bin FORCE $(call if_changed,mkimage) + $(BOARD_SIZE_CHECK) ifeq ($(CONFIG_OF_SEPARATE),y) MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) \ -- cgit v1.2.3