From 4268e3992c6ab1af7abbd23a8a0d067b8d181004 Mon Sep 17 00:00:00 2001 From: Anand Moon Date: Mon, 12 Nov 2018 10:32:42 +0000 Subject: [PATCH 1/6] exynos5-dt-types: add missing dtb file for Odroid HC1/HC2 Add missing exynos5422-odroidhc1.dtb needed to set for dfu env. Signed-off-by: Anand Moon Reviewed-by: Lukasz Majewski Signed-off-by: Minkyu Kang --- include/configs/odroid_xu3.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index f683ee46e3..b44f58ed15 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -61,6 +61,7 @@ "exynos5422-odroidxu3.dtb fat 0 1;" \ "exynos5422-odroidxu3-lite.dtb fat 0 1;" \ "exynos5422-odroidxu4.dtb fat 0 1;" \ + "exynos5422-odroidhc1.dtb fat 0 1;" \ "boot part 0 1;" \ "root part 0 2\0" From 9c15044ae4f5a63c4ecaec114bbe55f05b4cf836 Mon Sep 17 00:00:00 2001 From: Anand Moon Date: Mon, 12 Nov 2018 10:32:43 +0000 Subject: [PATCH 2/6] odroid: Update README.odroid for support of Odroid HC1 updated READM.odroid for supported Odroid HC1 development board. Signed-off-by: Anand Moon Reviewed-by: Lukasz Majewski Signed-off-by: Minkyu Kang --- doc/README.odroid | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/README.odroid b/doc/README.odroid index c088ec4cb0..bc77ae3175 100644 --- a/doc/README.odroid +++ b/doc/README.odroid @@ -1,11 +1,11 @@ - U-Boot for Odroid X2/U3/XU3/XU4 + U-Boot for Odroid X2/U3/XU3/XU4/HC1 ======================== 1. Summary ========== This is a quick instruction for setup Odroid boards. Board config: odroid_config for X2/U3 -Board config: odroid-xu3_config for XU3/XU4 +Board config: odroid-xu3_config for XU3/XU4/HC1 2. Supported devices ==================== @@ -15,6 +15,7 @@ This U-BOOT config can be used on three boards: with CPU Exynos 4412 rev 2.0 and 2GB of RAM - Odroid XU3 - Odroid XU4 +- Odroid HC1 with CPU Exynos5422 and 2GB of RAM 3. Boot sequence @@ -121,7 +122,9 @@ Supported fdt files are: - exynos4412-odroidx2.dtb - exynos4412-odroidu3.dtb - exynos5422-odroidxu3.dtb +- exynos5422-odroidxu3-lite.dtb - exynos5422-odroidxu4.dtb +- exynos5422-odroidhc1.dtb Supported kernel files are: - Image.itb From 767edf0f6b3eaa0303f3fd6afdc14ddce0aca70c Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Tue, 20 Nov 2018 14:54:39 +0900 Subject: [PATCH 3/6] Revert "arm: config: fix default console only to specify the device" This reverts commit 232ed3ca534708527a9515c7c41bc3542949525c. In exynos boards, ${console} is used to set bootargs but it sets without "console=", so CONFIG_DEFAULT_CONSOLE for these boards is designated with "console=" but it is removed. So revert the commit. References for using ${console} in board/samsung/common/bootscripts/autoboot.cmd board/samsung/common/bootscripts/bootzimg.cmd Signed-off-by: Seung-Woo Kim Signed-off-by: Minkyu Kang --- include/configs/odroid.h | 4 ++-- include/configs/odroid_xu3.h | 4 ++-- include/configs/s5p_goni.h | 4 ++-- include/configs/s5pc210_universal.h | 4 ++-- include/configs/trats.h | 4 ++-- include/configs/trats2.h | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/configs/odroid.h b/include/configs/odroid.h index ad77242e38..c3520bb15f 100644 --- a/include/configs/odroid.h +++ b/include/configs/odroid.h @@ -40,7 +40,7 @@ /* Console configuration */ #define CONFIG_BOOTCOMMAND "run distro_bootcmd ; run autoboot" -#define CONFIG_DEFAULT_CONSOLE "ttySAC1,115200n8" +#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \ - GENERATED_GBL_DATA_SIZE) @@ -157,7 +157,7 @@ "elif test -e mmc 0 uImage; then; " \ "run boot_uimg;" \ "fi;\0" \ - "console=" CONFIG_DEFAULT_CONSOLE "\0" \ + "console=" CONFIG_DEFAULT_CONSOLE \ "mmcbootdev=0\0" \ "mmcbootpart=1\0" \ "mmcrootdev=0\0" \ diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index b44f58ed15..0337c26475 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -30,7 +30,7 @@ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000) -#define CONFIG_DEFAULT_CONSOLE "ttySAC2,115200n8" +#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0" /* USB */ #define CONFIG_USB_EHCI_EXYNOS @@ -100,7 +100,7 @@ MEM_LAYOUT_ENV_SETTINGS \ BOOTENV \ "rootfstype=ext4\0" \ - "console=" CONFIG_DEFAULT_CONSOLE "\0"\ + "console=" CONFIG_DEFAULT_CONSOLE \ "fdtfile=exynos5422-odroidxu3.dtb\0" \ "boardname=odroidxu3\0" \ "mmcbootdev=0\0" \ diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h index 87ddc20a52..ff634d91dd 100644 --- a/include/configs/s5p_goni.h +++ b/include/configs/s5p_goni.h @@ -87,7 +87,7 @@ #define CONFIG_BOOTCOMMAND "run mmcboot" -#define CONFIG_DEFAULT_CONSOLE "ttySAC2,115200n8" +#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0" #define CONFIG_RAMDISK_BOOT "root=/dev/ram0 rw rootfstype=ext4" \ " ${console} ${meminfo}" @@ -134,7 +134,7 @@ "bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \ "verify=n\0" \ "rootfstype=ext4\0" \ - "console=" CONFIG_DEFAULT_CONSOLE "\0"\ + "console=" CONFIG_DEFAULT_CONSOLE \ "meminfo=mem=80M mem=256M@0x40000000 mem=128M@0x50000000\0" \ "loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x30007FC0 uImage\0" \ "mmcdev=0\0" \ diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h index 999bdd1676..832032da18 100644 --- a/include/configs/s5pc210_universal.h +++ b/include/configs/s5pc210_universal.h @@ -27,7 +27,7 @@ /* Console configuration */ #define CONFIG_BOOTCOMMAND "run mmcboot" -#define CONFIG_DEFAULT_CONSOLE "ttySAC1,115200n8" +#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \ - GENERATED_GBL_DATA_SIZE) @@ -108,7 +108,7 @@ "mmcoops=mmc read 0 0x40000000 0x40 8; md 0x40000000 0x400\0" \ "verify=n\0" \ "rootfstype=ext4\0" \ - "console=" CONFIG_DEFAULT_CONSOLE "\0" \ + "console=" CONFIG_DEFAULT_CONSOLE \ "mtdparts=" CONFIG_MTDPARTS_DEFAULT \ "mbrparts=" MBRPARTS_DEFAULT \ "meminfo=crashkernel=32M@0x50000000\0" \ diff --git a/include/configs/trats.h b/include/configs/trats.h index 223fce49a7..af8e8ce3b6 100644 --- a/include/configs/trats.h +++ b/include/configs/trats.h @@ -36,7 +36,7 @@ #define CONFIG_MACH_TYPE MACH_TYPE_TRATS #define CONFIG_BOOTCOMMAND "run autoboot" -#define CONFIG_DEFAULT_CONSOLE "ttySAC2,115200n8" +#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0" #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \ - GENERATED_GBL_DATA_SIZE) @@ -120,7 +120,7 @@ "mmcoops=mmc read 0 0x40000000 0x40 8; md 0x40000000 0x400\0" \ "verify=n\0" \ "rootfstype=ext4\0" \ - "console=" CONFIG_DEFAULT_CONSOLE "\0" \ + "console=" CONFIG_DEFAULT_CONSOLE \ "meminfo=crashkernel=32M@0x50000000\0" \ "nfsroot=/nfsroot/arm\0" \ "bootblock=" CONFIG_BOOTBLOCK "\0" \ diff --git a/include/configs/trats2.h b/include/configs/trats2.h index f1e4cbad30..9c6b2bbc8d 100644 --- a/include/configs/trats2.h +++ b/include/configs/trats2.h @@ -34,7 +34,7 @@ /* Console configuration */ #define CONFIG_BOOTCOMMAND "run autoboot" -#define CONFIG_DEFAULT_CONSOLE "ttySAC2,115200n8" +#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0" #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \ - GENERATED_GBL_DATA_SIZE) @@ -103,7 +103,7 @@ "boottrace=setenv opts initcall_debug; run bootcmd\0" \ "verify=n\0" \ "rootfstype=ext4\0" \ - "console=" CONFIG_DEFAULT_CONSOLE "\0" \ + "console=" CONFIG_DEFAULT_CONSOLE \ "kernelname=uImage\0" \ "loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x40007FC0 " \ "${kernelname}\0" \ From c96d90367a6a229210b8b16681cfe9e5c8aeced1 Mon Sep 17 00:00:00 2001 From: Guillaume GARDET Date: Tue, 20 Nov 2018 14:15:13 +0100 Subject: [PATCH 4/6] exynos: imply SYS_THUMB_BUILD This patch allows smaller binaries. This is needed for and has been tested on Arndale board, as u-boot.bin is now bigger than the 512K load limit, with GCC8, without thumb mode. Signed-off-by: Guillaume GARDET Cc: Albert Aribaud Cc: Minkyu Kang Cc: Tom Rini Acked-by: Lukasz Majewski Acked-by: Minkyu Kang Signed-off-by: Minkyu Kang --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index cb7ec58079..e41ce77248 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -607,6 +607,7 @@ config ARCH_EXYNOS select DM_SPI select DM_SPI_FLASH select SPI + imply SYS_THUMB_BUILD imply CMD_DM imply FAT_WRITE From 2a195703d6e62172e532ffae05a79e9d12f602bc Mon Sep 17 00:00:00 2001 From: Guillaume GARDET Date: Wed, 2 Jan 2019 14:31:41 +0100 Subject: [PATCH 5/6] exynos: allow SPL to build in thumb mode Building peach-pi smdk5420 and peach-pit with thumb mode for SPL ends-up in the following error: Error: Thumb encoding does not support an immediate here -- `msr cpsr_c,#0x13|0xC0' Use an intermediate register to be able to use thumb for exynos5 SPL. Signed-off-by: Guillaume GARDET Cc: Albert Aribaud Cc: Minkyu Kang Cc: Tom Rini Signed-off-by: Minkyu Kang --- arch/arm/mach-exynos/include/mach/system.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-exynos/include/mach/system.h b/arch/arm/mach-exynos/include/mach/system.h index 4837781957..81fa9800b4 100644 --- a/arch/arm/mach-exynos/include/mach/system.h +++ b/arch/arm/mach-exynos/include/mach/system.h @@ -58,7 +58,8 @@ struct exynos5_sysreg { /* Move 0xd3 value to CPSR register to enable SVC mode */ #define svc32_mode_en() __asm__ __volatile__ \ ("@ I&F disable, Mode: 0x13 - SVC\n\t" \ - "msr cpsr_c, #0x13|0xC0\n\t" : : ) + "mov r0, #0x13|0xC0\n\t" \ + "msr cpsr_c, r0\n\t" : : ) /* Set program counter with the given value */ #define set_pc(x) __asm__ __volatile__ ("mov pc, %0\n\t" : : "r"(x)) From df1ff4d6ba591a5fcb9549e895b23c781d8fda6d Mon Sep 17 00:00:00 2001 From: Guillaume GARDET Date: Fri, 4 Jan 2019 09:23:19 +0100 Subject: [PATCH 6/6] exynos: Leave the compiler to choose the register to avoid possible r0 corruption Reported-by: Siarhei Siamashka Signed-off-by: Guillaume GARDET Cc: Albert Aribaud Cc: Minkyu Kang Cc: Tom Rini Signed-off-by: Minkyu Kang --- arch/arm/mach-exynos/include/mach/system.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/include/mach/system.h b/arch/arm/mach-exynos/include/mach/system.h index 81fa9800b4..48f13c7648 100644 --- a/arch/arm/mach-exynos/include/mach/system.h +++ b/arch/arm/mach-exynos/include/mach/system.h @@ -58,8 +58,7 @@ struct exynos5_sysreg { /* Move 0xd3 value to CPSR register to enable SVC mode */ #define svc32_mode_en() __asm__ __volatile__ \ ("@ I&F disable, Mode: 0x13 - SVC\n\t" \ - "mov r0, #0x13|0xC0\n\t" \ - "msr cpsr_c, r0\n\t" : : ) + "msr cpsr_c, %0\n\t" : : "r"(0x13|0xC0)) /* Set program counter with the given value */ #define set_pc(x) __asm__ __volatile__ ("mov pc, %0\n\t" : : "r"(x))