[PATCH u-boot-marvell v2 1/2] arm: mvebu: turris_mox: enable wdt command in defconfig

2021-01-19 Thread Marek Behún
Enable wdt command in defconfig for Turris MOX. This is useful when doing debugging. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- configs/turris_mox_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/turris_mox_defconfig b/configs/turris_mox_defconfig index

[PATCH u-boot-marvell v2 2/2] arm: mvebu: turris_mox: enable setexpr command in defconfig

2021-01-19 Thread Marek Behún
Enable setexpr command in defconfig for Turris MOX. We have found that this is sometimes useful in U-Boot scripts and there is enough space in NOR memory on MOX. Signed-off-by: Marek Behún --- configs/turris_mox_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH u-boot-marvell] arm: mvebu: turris_mox: enable wdt command in defconfig

2021-01-13 Thread Marek Behún
Enable wdt command in defconfig for Turris MOX. This is useful when doing debugging. Signed-off-by: Marek Behún --- configs/turris_mox_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/turris_mox_defconfig b/configs/turris_mox_defconfig index 66dc2473d6..4543acf073 100644

Re: [PATCH u-boot-marvell] mmc: mv_sdhci: call mmc_of_parse()

2021-02-04 Thread Marek Behún
On Thu, 4 Feb 2021 07:18:23 +0900 Jaehoon Chung wrote: > > Commit da18c62b6e6a causes the regression. The Fixes tag, as I > > understand, should link to commit with which the regression first > > occured, so that if someone wanted to backport my patch to previous > > version of U-Boot, they

Re: [PATCH] mmc: mv_sdhci: parse device-tree entry

2021-02-04 Thread Marek Behún
Reviewed-by: Marek Behún

[PATCH u-boot-marvell] mmc: mv_sdhci: call mmc_of_parse()

2021-02-02 Thread Marek Behún
This is needed to parse more capabilities such as `non-removable`. Commit da18c62b6e6a ("mmc: sdhci: Implement SDHCI card detect") caused a regression on Turris Omnia, because mv_sdhci driver did not fill out host_caps from device-tree. Signed-off-by: Marek Behún Fixes: da18c62b

Re: [PATCH u-boot-marvell] mmc: mv_sdhci: call mmc_of_parse()

2021-02-02 Thread Marek Behún
> Hi Marek, > I posted a similar patch earlier today: > > Fixes: da18c62b6e6a ("mmc: sdhci: Implement SDHCI card detect") > My patch is missing this tag, though. > baruch OK, lets leave it on Stefan to decide which one to apply. Marek

[PATCH u-boot-marvell] arm: mvebu: turris_{omnia, mox}: ensure running bootcmd_rescue always works

2021-06-14 Thread Marek Behún
6c3e7760a2 ("arm: mvebu: turris_omnia: support invoking rescue boot from console") Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- board/CZ.NIC/turris_mox/turris_mox.c | 14 +++--- board/CZ.NIC/turris_omnia/turris_omnia.c | 13 ++--- 2 files changed, 21 insert

[PATCH u-boot-marvell v2 4/6] arm: mvebu: configs: turris_mox: add fdtfile default env variable

2021-06-07 Thread Marek Behún
Add default fdtfile environment variable with value marvell/armada-3720-turris-mox.dtb. This can be useful for some boot scenarios. Signed-off-by: Marek Behún --- include/configs/turris_mox.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/turris_mox.h b/include/configs

[PATCH u-boot-marvell v2 2/6] arm: mvebu: turris_mox: add support for board rescue mode

2021-06-07 Thread Marek Behún
. When factory reset button is pressed, invoke rescue mode via distroboot by setting `boot_targets` to `rescue`. Rescue boot from console can be invoked by running run bootcmd_rescue Signed-off-by: Marek Behún --- board/CZ.NIC/turris_mox/turris_mox.c | 71 configs

[PATCH u-boot-marvell v2 3/6] arm: mvebu: turris_mox: start blinking PHY LEDs when entering rescue

2021-06-07 Thread Marek Behún
Configure blinking on ethernet PHY LEDs on the MOX A board when entering rescue mode via reset button. Signed-off-by: Marek Behún --- board/CZ.NIC/turris_mox/turris_mox.c | 35 1 file changed, 35 insertions(+) diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b

[PATCH u-boot-marvell v2 6/6] arm: mvebu: turris_mox: enable options for Turris network boot

2021-06-07 Thread Marek Behún
Enable configuration options to support Turris network boot. This includes FIT support and some crypto commands. Signed-off-by: Marek Behún --- configs/turris_mox_defconfig | 8 1 file changed, 8 insertions(+) diff --git a/configs/turris_mox_defconfig b/configs/turris_mox_defconfig

[PATCH u-boot-marvell v2 5/6] arm: mvebu: dts: turris_mox: add nodes for SPI NOR partitions

2021-06-07 Thread Marek Behún
Add nodes for SPI NOR partitions to the device tree of Turris MOX, as are in Linux' device tree. Signed-off-by: Marek Behún --- arch/arm/dts/armada-3720-turris-mox.dts | 31 + 1 file changed, 31 insertions(+) diff --git a/arch/arm/dts/armada-3720-turris-mox.dts b/arch

[PATCH u-boot-marvell v2 0/6] Changes for Turris MOX

2021-06-07 Thread Marek Behún
-Boot's DTS with kernel's DTS Marek Behún (6): arm: mvebu: dts: turris_mox: add button and LED nodes arm: mvebu: turris_mox: add support for board rescue mode arm: mvebu: turris_mox: start blinking PHY LEDs when entering rescue arm: mvebu: configs: turris_mox: add fdtfile default env variable

[PATCH u-boot-marvell v2 1/6] arm: mvebu: dts: turris_mox: add button and LED nodes

2021-06-07 Thread Marek Behún
Add nodes for indicator LED and reset button so that board code can implement board factory reset mechanism. Signed-off-by: Marek Behún --- arch/arm/dts/armada-3720-turris-mox.dts | 24 1 file changed, 24 insertions(+) diff --git a/arch/arm/dts/armada-3720-turris

[PATCH u-boot v4 18/36] sandbox: make LTO available

2021-05-20 Thread Marek Behún
Make LTO available for sandbox architecture. Signed-off-by: Marek Behún Reviewed-by: Bin Meng --- arch/Kconfig | 1 + arch/sandbox/config.mk | 4 2 files changed, 5 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index 6c4b81a486..c5c03d438c 100644 --- a/arch/Kconfig

[PATCH u-boot v4 10/36] efi_selftest: compiler flags for efi_selftest_miniapp_exception.o

2021-05-20 Thread Marek Behún
Add $(CFLAGS_EFI) and remove $(CFLAGS_NON_EFI) for efi_selftest_miniapp_exception.o. The removal is needed when compiling with LTO - this object file needs to be compiled without -flto. The adding is for consistency with other miniapps. Signed-off-by: Marek Behún Reviewed-by: Heinrich

[PATCH u-boot v4 08/36] efi_loader: add Sphinx doc for __efi_runtime and __efi_runtime_data

2021-05-20 Thread Marek Behún
Document the macros __efi_runtime and __efi_runtime_data in Sphinx style. Signed-off-by: Marek Behún Reviewed-by: Heinrich Schuchardt --- include/efi_loader.h | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/include/efi_loader.h b/include

[PATCH u-boot v4 15/36] build: link with --build-id=none

2021-05-20 Thread Marek Behún
.note.gnu.build-id section. Fix this by explicitly disabling build-id. Signed-off-by: Marek Behún --- Makefile | 2 ++ scripts/Makefile.spl | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 2329edc159..a62f7e3f7c 100644 --- a/Makefile +++ b/Makefile

[PATCH u-boot v4 21/36] ARM: make gd a function call for LTO and set via set_gd()

2021-05-20 Thread Marek Behún
?id=68384 Signed-off-by: Marek Behún --- arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 2 +- arch/arm/include/asm/global_data.h| 2 +- arch/arm/mach-exynos/spl_boot.c | 2 +- arch/arm/mach-imx/imx8m/soc.c | 2 +- arch/arm/mach-imx/spl_imx_romapi.c| 16 5 files

[PATCH u-boot v4 25/36] ARM: fix LTO for keystone

2021-05-20 Thread Marek Behún
When building keystone with LTO the compiler complains: Error: selected processor does not support `smc #0' in Thumb mode Fix this by removing -flto for the file implementing these SMC calls. Signed-off-by: Marek Behún --- arch/arm/mach-keystone/Makefile | 1 + 1 file changed, 1 insertion

[PATCH u-boot v4 23/36] ARM: fix LTO for imx28_xea

2021-05-20 Thread Marek Behún
When imx28_xea_defconfig is built with LTO, the compiler complains about the two different declarations of _start: include/asm-generic/sections.has extern void _start(void); arch/arm/cpu/arm926ejs/mxs/mxs.c as extern uint32_t _start; Fix this. Signed-off-by: Marek Behún Reviewed

[PATCH u-boot v4 20/36] ARM: global_data: make set_gd() work for armv5 and armv6

2021-05-20 Thread Marek Behún
The Thumb instruction `ldr` is able to move high registers only from armv7. For armv5 and armv6 we have to use `mov`. Signed-off-by: Marek Behún --- arch/arm/include/asm/global_data.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/global_data.h b

[PATCH u-boot v4 19/36] sandbox: enable LTO by default

2021-05-20 Thread Marek Behún
Build sandbox targets with LTO by default. Signed-off-by: Marek Behún Reviewed-by: Bin Meng --- arch/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/Kconfig b/arch/Kconfig index c5c03d438c..8fd39e36b4 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -125,6 +125,7 @@ config

[PATCH u-boot v4 16/36] sandbox: errno: avoid conflict with libc's errno

2021-05-20 Thread Marek Behún
in /tmp/u-boot.EQlEXz.ltrans0.ltrans.o To avoid this conflict use different asm label for this variable when CONFIG_SANDBOX is enabled. Signed-off-by: Marek Behún Reviewed-by: Bin Meng Reviewed-by: Simon Glass --- include/errno.h | 8 +++- lib/errno.c | 4 +++- 2 files changed, 10

[PATCH u-boot v4 22/36] ARM: fix LTO build for some thumb-interwork cases

2021-05-20 Thread Marek Behún
-by: Marek Behún --- arch/arm/cpu/arm926ejs/Makefile | 2 ++ arch/arm/lib/Makefile | 1 + 2 files changed, 3 insertions(+) diff --git a/arch/arm/cpu/arm926ejs/Makefile b/arch/arm/cpu/arm926ejs/Makefile index af63d5cc5e..98aafe805a 100644 --- a/arch/arm/cpu/arm926ejs/Makefile +++ b/arch/arm/cpu

[PATCH u-boot v4 30/36] ARM: omap3: fix LTO for DM3730 (and possibly other omap3 boards)

2021-05-20 Thread Marek Behún
Adam Ford says that DM3730 needs board.c compiled without LTO flags. Signed-off-by: Marek Behún Tested-by: Adam Ford --- arch/arm/mach-omap2/omap3/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-omap2/omap3/Makefile b/arch/arm/mach-omap2/omap3/Makefile index

[PATCH u-boot v4 26/36] ARM: kona: fix clk_bsc_enable() type mismatch for LTO

2021-05-20 Thread Marek Behún
of this function to that of the other usages. Signed-off-by: Marek Behún Reviewed-by: Bin Meng --- arch/arm/cpu/armv7/kona-common/clk-stubs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv7/kona-common/clk-stubs.c b/arch/arm/cpu/armv7/kona-common/clk-stubs.c index

[PATCH u-boot v4 32/36] ata: ahci: fix ahci_link_up() type mismatch for LTO

2021-05-20 Thread Marek Behún
actually passes an int variable into the function (so it is implicitly converted to u8). Change the type of this parameter to int in drivers/ata/ahci.c. Signed-off-by: Marek Behún Reviewed-by: Bin Meng --- drivers/ata/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH u-boot v4 29/36] ARM: fix LTO for rockchip and samsung

2021-05-20 Thread Marek Behún
-off-by: Marek Behún Reviewed-by: Bin Meng --- arch/arm/mach-rockchip/board.c| 2 +- board/samsung/common/exynos5-dt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c index c386b52987..5304eb055c 100644

[PATCH u-boot v4 27/36] ARM: imx8m: fix imx_eqos_txclk_set_rate() type mismatch for LTO

2021-05-20 Thread Marek Behún
an implementation. Change the type of this function in the implementation to fix this. Signed-off-by: Marek Behún Reviewed-by: Bin Meng --- arch/arm/mach-imx/imx8m/clock_imx8mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mm.c b/arch/arm/mach-imx

[PATCH u-boot v4 28/36] ARM: fix LTO for seaboard

2021-05-20 Thread Marek Behún
this by removing -flto for this file. Signed-off-by: Marek Behún --- arch/arm/mach-tegra/tegra20/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-tegra/tegra20/Makefile b/arch/arm/mach-tegra/tegra20/Makefile index faaf30d068..bb17c90cca 100644 --- a/arch/arm/mach-tegra/tegra20

[PATCH u-boot v4 11/36] lib: crc32: put the crc_table variable into efi_runtime_rodata section

2021-05-20 Thread Marek Behún
into the section .rodata.efi_runtime, instead of .data.efi_runtime, via macro __efi_runtime_rodata. Signed-off-by: Marek Behún Reviewed-by: Marek Vasut Reviewed-by: Heinrich Schuchardt --- lib/crc32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/crc32.c b/lib/crc32.c index

[PATCH u-boot v4 01/36] regmap: fix a serious pointer casting bug

2021-05-20 Thread Marek Behún
of dm_test_devm_regmap_field when compiled for sandbox_defconfig using LTO. Fix this by utilizing an union { u8; u16; u32; u64; } and reading data into this union / writing data from this union. Signed-off-by: Marek Behún Cc: Simon Glass Cc: Heiko Schocher Cc: Bin Meng Cc: Pratyush Yadav --- drivers

[PATCH u-boot v4 00/36] U-Boot LTO (Sandbox + Some ARM boards)

2021-05-20 Thread Marek Behún
be renamed on some targets by optimization) Marek Marek Behún (36): regmap: fix a serious pointer casting bug checkpatch: require quotes around section name in the __section() macro treewide: Convert macro and uses of __section(foo) to __section("foo") compiler.h: align the

[PATCH u-boot v4 04/36] compiler.h: align the __ADDRESSABLE macro with Linux' version

2021-05-20 Thread Marek Behún
Use UNIQUE_ID in the __ADDRESSABLE macro. Signed-off-by: Marek Behún Reviewed-by: Bin Meng --- include/linux/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 82a8a4ede9..98dd3fc4cc 100644 --- a/include

[PATCH u-boot v4 03/36] treewide: Convert macro and uses of __section(foo) to __section("foo")

2021-05-20 Thread Marek Behún
to quoted __section("foo"). Also convert __attribute__((section("foo"))) uses to __section("foo") even if the __attribute__ has multiple list entry forms. Signed-off-by: Marek Behún Reviewed-by: Bin Meng --- arch/arm/cpu/arm926ejs/spear/spl.c| 2 +- arch/arm/cp

[PATCH u-boot v4 02/36] checkpatch: require quotes around section name in the __section() macro

2021-05-20 Thread Marek Behún
This is how Linux does this now, see Linux commit 339f29d91acf. Signed-off-by: Marek Behún --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 59a714a95f..08a827535a 100755 --- a/scripts/checkpatch.pl

[PATCH u-boot v4 07/36] efi_loader: fix warning when linking with LTO

2021-05-20 Thread Marek Behún
’ was previously declared here 7 | char __efi_runtime_start[0] __attribute__((section(".__efi_run | ^ Change the type to char[] in include/efi_loader.h. Signed-off-by: Marek Behún Reviewed-by: Bin Meng --- include/efi_loader.h | 4 ++-- 1 file changed, 2 insertions(+), 2 dele

[PATCH u-boot v4 05/36] test/py: improve regular expression for ut subtest symbol matcher

2021-05-20 Thread Marek Behún
Signed-off-by: Marek Behún --- test/py/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/py/conftest.py b/test/py/conftest.py index 1b909cde9d..11a3f307ea 100644 --- a/test/py/conftest.py +++ b/test/py/conftest.py @@ -226,7 +226,7 @@ def pytest_config

[PATCH u-boot v4 06/36] string: make memcpy(), memset(), memcmp() and memmove() visible for LTO

2021-05-20 Thread Marek Behún
be supplied through some other mechanism when this option is specified. Make these functions visible by using the __used macro to avoid this error. Signed-off-by: Marek Behún --- lib/string.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/string.c b/lib/stri

[PATCH u-boot v4 35/36] ARM: don't use --gc-sections with LTO when using private libgcc

2021-05-20 Thread Marek Behún
When using LTO, we can throw away the --gc-sections flag, but only if using private libgcc. When using system's libgcc, --gc-sections is still needed, otherwise linking will fail due to undefined references to libc's symbols. Signed-off-by: Marek Behún --- arch/arm/config.mk | 2 ++ 1 file

[PATCH u-boot v4 34/36] ARM: don't use -ffunction-sections/-fdata-sections with LTO build

2021-05-20 Thread Marek Behún
When building with LTO, using -ffunction-sections/-fdata-sections is not useful anymore. Signed-off-by: Marek Behún --- arch/arm/config.mk | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/config.mk b/arch/arm/config.mk index e79f0104b9..f556ee3329 100644

[PATCH u-boot v4 33/36] ARM: make LTO available

2021-05-20 Thread Marek Behún
Make LTO available for ARM architecture. Signed-off-by: Marek Behún --- arch/Kconfig | 1 + arch/arm/lib/Makefile | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index 8fd39e36b4..49813a4c9b 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -33,6 +33,7

[PATCH u-boot v4 31/36] armv8: SPL: discard relocation information

2021-05-20 Thread Marek Behún
For some reason when building SPL for ARMv8 with LTO, the relocation information is not discarded. Discard it explicitly in the linker script. This fixes LTO build for imx8mm_venice_defconfig. Signed-off-by: Marek Behún --- arch/arm/cpu/armv8/u-boot-spl.lds | 1 + 1 file changed, 1 insertion

[PATCH u-boot v4 36/36] ARM: enable LTO for some boards

2021-05-20 Thread Marek Behún
Enable LTO for some boards that were tested by people on U-Boot Mailing List. Signed-off-by: Marek Behún Tested-by: Adam Ford Tested-by: Pali Rohár Tested-by: Tim Harvey --- configs/am3517_evm_defconfig | 1 + configs/da850evm_defconfig| 1 + configs

[PATCH u-boot v4 14/36] build: support building with Link Time Optimizations

2021-05-20 Thread Marek Behún
it thinks are unused when compiling with LTO. To force these symbols to be included, we refer to them via the __ADDRESSABLE macro in a C file generated from compiled built-in.o files before linking. Signed-off-by: Marek Behún --- Kbuild| 2 + Kconfig

[PATCH u-boot v4 13/36] build: use thin archives instead of incremental linking

2021-05-20 Thread Marek Behún
to use the P flag for ar, otherwise final linking may fail. Signed-off-by: Marek Behún --- Makefile | 4 ++-- arch/sandbox/config.mk | 10 +++--- scripts/Makefile.build | 16 scripts/Makefile.spl | 4 ++-- 4 files changed, 19 insertions(+), 15 deletions

[PATCH u-boot v4 09/36] efi_loader: add macro for const EFI runtime data

2021-05-20 Thread Marek Behún
Add macro __efi_runtime_rodata, for const variables with similar purpose as those using __efi_runtime_data. Signed-off-by: Marek Behún Reviewed-by: Heinrich Schuchardt --- include/efi_loader.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/efi_loader.h b/include

[PATCH u-boot v4 24/36] ARM: fix LTO for apf27

2021-05-20 Thread Marek Behún
When apf27_defconfig is built with LTO, linking complains about undefined reference to `nand_boot`. This is because it is referenced from inline assembly. Make it visible. Signed-off-by: Marek Behún --- drivers/mtd/nand/raw/mxc_nand_spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH u-boot v4 17/36] sandbox: use sections instead of symbols for getopt array boundaries

2021-05-20 Thread Marek Behún
it thinks that array is empty (start and end symbols are at the same address). Signed-off-by: Marek Behún --- arch/sandbox/cpu/os.c | 3 ++- arch/sandbox/cpu/start.c| 3 ++- arch/sandbox/cpu/u-boot-spl.lds | 8 +--- arch/sandbox/cpu/u-boot.lds | 8

[PATCH u-boot v4 12/36] Makefile, Makefile.spl: cosmetic change

2021-05-20 Thread Marek Behún
Indent the linking commands so that they look cosmetically better. Signed-off-by: Marek Behún Reviewed-by: Bin Meng --- Makefile | 12 +++- scripts/Makefile.spl | 17 +++-- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile

[PATCH u-boot-dm + u-boot-spi v4 05/10] mtd: spi-nor: fill-in mtd->dev member

2021-05-26 Thread Marek Behún
Fill in mtd->dev member with nor->dev. This can be used by MTD OF partition parser. Signed-off-by: Marek Behún Reviewed-by: Pali Rohár Reviewed-by: Miquel Raynal Tested-by: Patrice Chotard Cc: Jagan Teki Cc: Priyanka Jain Cc: Simon Glass Cc: Heiko Schocher Cc: Jagan Teki Cc: P

[PATCH u-boot-dm + u-boot-spi v4 03/10] mtd: add support for parsing partitions defined in OF

2021-05-26 Thread Marek Behún
from OF, even if they are defined. Signed-off-by: Marek Behún Reviewed-by: Miquel Raynal Tested-by: Patrice Chotard Cc: Simon Glass Cc: Heiko Schocher Cc: Jagan Teki Cc: Patrick Delaunay --- drivers/mtd/mtd_uboot.c | 106 +++- drivers/mtd/mtdpart.c | 63

[PATCH u-boot-dm + u-boot-spi v4 01/10] dm: core: add non-translating version of ofnode_get_addr_size_index()

2021-05-26 Thread Marek Behún
Add functions ofnode_get_addr_size_index_notrans(), which is a non-translating version of ofnode_get_addr_size_index(). Some addresses are not meant to be translated, for example those of MTD fixed-partitions. Signed-off-by: Marek Behún Reviewed-by: Simon Glass Reviewed-by: Miquel Raynal

[PATCH u-boot-dm + u-boot-spi v4 00/10] Support SPI NORs and OF partitions in `mtd list`

2021-05-26 Thread Marek Behún
- the last patch now probes SPI NORs in both versions of mtd_probe_devices(), that is when MTDPARTS is enabled or disabled Marek Cc: Jagan Teki Cc: Priyanka Jain Cc: Simon Glass Cc: Heiko Schocher Cc: Jagan Teki Cc: Patrick Delaunay Cc: Patrice CHOTARD Cc: Miquel Raynal Marek Behún (10): dm

[PATCH u-boot-dm + u-boot-spi v4 04/10] mtd: spi-nor: allow registering multiple MTDs when DM is enabled

2021-05-26 Thread Marek Behún
the nor->mtd structure, which is filled in by spi_nor_scan anyway, instead of filling a separate struct mtd_info. Signed-off-by: Marek Behún Reviewed-by: Pali Rohár Reviewed-by: Miquel Raynal Tested-by: Patrice Chotard Cc: Jagan Teki Cc: Priyanka Jain Cc: Simon Glass Cc: Heiko Schocher

[PATCH u-boot-dm + u-boot-spi v4 06/10] mtd: remove mtd_probe() function

2021-05-26 Thread Marek Behún
The device_probe() function does the same thing as mtd_probe() and mtd_probe() is only used in mtd_probe_uclass_mtd_devs(), where the probing can be made simpler by using uclass_foreach_dev_probe macro. Signed-off-by: Marek Behún Reviewed-by: Pali Rohár Reviewed-by: Miquel Raynal Tested

[PATCH u-boot-dm + u-boot-spi v4 02/10] dm: core: add ofnode_get_path()

2021-05-26 Thread Marek Behún
Add function for retrieving full node path of a given ofnode. This uses np->full_name if OF is live, otherwise a call to fdt_get_path() is made. Signed-off-by: Marek Behún Reviewed-by: Simon Glass Reviewed-by: Miquel Raynal Tested-by: Patrice Chotard --- drivers/core/ofnode.c |

[PATCH u-boot-dm + u-boot-spi v4 08/10] cmd: mtd: print device OF path in listing

2021-05-26 Thread Marek Behún
Print MTD's device OF path in the output of `mtd list` command. Signed-off-by: Marek Behún Reviewed-by: Miquel Raynal Tested-by: Patrice Chotard Cc: Jagan Teki Cc: Priyanka Jain Cc: Simon Glass Cc: Heiko Schocher Cc: Jagan Teki Cc: Patrick Delaunay --- cmd/mtd.c | 7 +++ 1 file

[PATCH u-boot-dm + u-boot-spi v4 09/10] mtd: compare also with OF path and device name in get_mtd_device_nm()

2021-05-26 Thread Marek Behún
_nor - path: /soc/spi@10600/spi-nor@1 - type: NOR flash - block size: 0x1000 bytes - min I/O: 0x1 bytes - 0x0000-0x0080 : "s25fl164k" Signed-off-by: Marek Behún Reviewed-by: Miquel Raynal Tested-by: Patrice Chotard Cc: Jagan Teki Cc: Priyanka Jain

[PATCH u-boot-dm + u-boot-spi v4 07/10] mtd: probe SPI NOR devices in mtd_probe_devices()

2021-05-26 Thread Marek Behún
In order for `mtd list` U-Boot command to list SPI NOR devices without the need to run `sf probe` before, we have to probe SPI NOR devices in mtd_probe_devices(). Signed-off-by: Marek Behún Reviewed-by: Pali Rohár Reviewed-by: Miquel Raynal Tested-by: Patrice Chotard Cc: Jagan Teki Cc

[PATCH u-boot-dm + u-boot-spi v4 10/10] cmd: mtd: expand argument definition in command help

2021-05-26 Thread Marek Behún
The argument can now also be MTD's DM device name or OF path. Mention this is command help. Signed-off-by: Marek Behún Reviewed-by: Miquel Raynal Tested-by: Patrice Chotard Cc: Jagan Teki Cc: Priyanka Jain Cc: Simon Glass Cc: Heiko Schocher Cc: Jagan Teki Cc: Patrick Delaunay --- cmd

Re: [PATCH u-boot-dm + u-boot-spi v4 00/10] Support SPI NORs and OF partitions in `mtd list`

2021-05-26 Thread Marek Behún
On Wed, 26 May 2021 22:28:34 +0530 Jagan Teki wrote: > This series have some conflicts wrt my series about MTD UCLASS > migration. Does this bypass that series? > > Jagan. Jagan, I was working on top of Tom's master branch... Are the conflicts big? Marek

Re: problems with boards with CONFIG_DM disabled

2021-05-26 Thread Marek Behún
On Wed, 26 May 2021 08:52:58 -0400 Tom Rini wrote: > On Wed, May 26, 2021 at 02:25:54AM +0200, Marek Behun wrote: > > On Wed, 26 May 2021 01:27:56 +0200 > > Marek Behun wrote: > > > > > Tom, Simon, > > > > > > now that LTO is merged I am working on > > > Support SPI NORs and OF partitions

Re: [PATCH v2 1/7] arm: a37xx: pci: Don't put link into LTSSM Recovery state during probe

2021-06-02 Thread Marek Behún
On Wed, 2 Jun 2021 07:12:50 +0200 Stefan Roese wrote: > > Hello Stefan! Thank you for review. Would you be sending these A3720 > > patches to 2021.07 version? > > My plan was to postpone these patches to the next release, as they > seem quite intrusive. But please let me know if you think

Re: [PATCH u-boot-dm + u-boot-spi v4 00/10] Support SPI NORs and OF partitions in `mtd list`

2021-06-02 Thread Marek Behún
On Wed, 26 May 2021 23:34:18 +0530 Jagan Teki wrote: > On Wed, May 26, 2021 at 11:25 PM Marek Behún > wrote: > > > > On Wed, 26 May 2021 22:28:34 +0530 > > Jagan Teki wrote: > > > > > This series have some conflicts wrt my series about MTD UCLASS > &

[PATCH u-boot-marvell 0/7] Changes for Turris MOX

2021-06-02 Thread Marek Behún
armada-37xx.dtsi, but it only changes name of a U-Boot's dts node to follow Linux' dts. No board code seems to depend on this name.) Marek Marek Behún (7): arm: mvebu: dts: turris_mox: add button and LED nodes arm: mvebu: turris_mox: add support for board rescue mode arm: mvebu: turris_mox

[PATCH u-boot-marvell 7/7] arm64: a37xx: dts: rename internal-regs node

2021-06-02 Thread Marek Behún
The node `internal-regs` is called `internal-regs@d000` in Linux' device tree. Rename this in U-Boot also. No in-tree code depends on this name, so this should be safe. Signed-off-by: Marek Behún --- arch/arm/dts/armada-37xx.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH u-boot v4 36/36] ARM: enable LTO for some boards

2021-05-21 Thread Marek Behún
On Fri, 21 May 2021 10:11:47 -0400 Tom Rini wrote: > On Thu, May 20, 2021 at 01:56:29PM -0500, Adam Ford wrote: > > On Thu, May 20, 2021 at 6:25 AM Marek Behún > > wrote: > > > > > > Enable LTO for some boards that were tested by people on U-Boot > >

Re: [PATCH u-boot v4 36/36] ARM: enable LTO for some boards

2021-05-21 Thread Marek Behún
On Fri, 21 May 2021 10:11:47 -0400 Tom Rini wrote: > On Thu, May 20, 2021 at 01:56:29PM -0500, Adam Ford wrote: > > On Thu, May 20, 2021 at 6:25 AM Marek Behún > > wrote: > > > > > > Enable LTO for some boards that were tested by people on U-Boot > >

[PATCH u-boot-marvell 1/2] arm: mvebu: turris_omnia: update rescue mode boot command

2021-05-28 Thread Marek Behún
Update rescue mode boot command on Turris Omnia. We are compressing the image with lzma now. Signed-off-by: Marek Behún --- board/CZ.NIC/turris_omnia/turris_omnia.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board

[PATCH u-boot-marvell 2/2] arm: mvebu: turris_omnia: support invoking rescue boot from console

2021-05-28 Thread Marek Behún
environment variables to their default values when the factory button is pressed. Rescue boot from console can be invoked by running run bootcmd_rescue Signed-off-by: Marek Behún --- board/CZ.NIC/turris_omnia/turris_omnia.c | 53 +--- include/configs/turris_omnia.h

Re: [PATCH u-boot-marvell 2/7] arm: mvebu: turris_mox: add support for board rescue mode

2021-06-03 Thread Marek Behún
On Wed, 2 Jun 2021 19:09:56 +0200 Marek Behún wrote: > +#define TURRIS_MOX_BOOTCMD_RESCUE \ > + "setenv bootargs \"console=ttyMV0,115200 " \ > + "earlycon=ar3700_uart,0xd0012000\" && " \ > + "sf

Re: [PATCH u-boot-marvell 7/7] arm64: a37xx: dts: rename internal-regs node

2021-06-03 Thread Marek Behún
On Wed, 2 Jun 2021 19:10:01 +0200 Marek Behún wrote: > The node `internal-regs` is called `internal-regs@d000` > in Linux' device tree. Rename this in U-Boot also. > > No in-tree code depends on this name, so this should be safe. > > Signed-off-by: Marek Behún >

[PATCH u-boot-marvell 1/5] serial: a37xx: Fix parent clock rate value and divider calculation

2021-05-25 Thread Marek Behún
at standard UART baudrates between 1800 and 230400. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- drivers/serial/serial_mvebu_a3700.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/serial/serial_mvebu_a3700.c b/drivers/serial

[PATCH u-boot-marvell 4/5] serial: a37xx: Switch to XTAL clock when booting Linux kernel

2021-05-25 Thread Marek Behún
Reviewed-by: Marek Behún --- drivers/serial/serial_mvebu_a3700.c | 67 + 1 file changed, 67 insertions(+) diff --git a/drivers/serial/serial_mvebu_a3700.c b/drivers/serial/serial_mvebu_a3700.c index ba2ac5917f..c7e66fef87 100644 --- a/drivers/serial/serial_mvebu_a3700

[PATCH u-boot-marvell 0/5] Support higher baudrates on Armada 3720 UART

2021-05-25 Thread Marek Behún
This series adds support for more baudrates on Armada 3720 UART (up to 6 MBaud). Marek Behún (1): clk: armada-37xx: Set DM_FLAG_PRE_RELOC Pali Rohár (4): serial: a37xx: Fix parent clock rate value and divider calculation serial: a37xx: Use TBG as parent clock serial: a37xx: Switch

[PATCH u-boot-marvell 5/5] arm: mvebu: a37xx: Enable more baudrates

2021-05-25 Thread Marek Behún
config file. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- include/configs/mvebu_armada-37xx.h | 9 +++-- include/configs/turris_mox.h| 9 +++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/include/configs/mvebu_armada-37xx.h b/include/configs

[PATCH u-boot-marvell 2/5] clk: armada-37xx: Set DM_FLAG_PRE_RELOC

2021-05-25 Thread Marek Behún
Setting DM_FLAG_PRE_RELOC for Armada 3720 clock drivers (TBG and peripheral clocks) makes it possible for serial driver to retrieve clock rates via clk API. Signed-off-by: Marek Behún --- drivers/clk/mvebu/armada-37xx-periph.c | 1 + drivers/clk/mvebu/armada-37xx-tbg.c| 1 + 2 files changed

[PATCH u-boot-marvell 3/5] serial: a37xx: Use TBG as parent clock

2021-05-25 Thread Marek Behún
MBaud. Slower baudrates with TBG as a parent clock can be achieved by increasing TBG dividers and oversampling divider. When using the slowest TBG clock, minimal working baudrate is 300. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- drivers/serial/serial_mvebu_a3700.c | 106

Re: [PATCH u-boot v4 00/36] U-Boot LTO (Sandbox + Some ARM boards)

2021-06-01 Thread Marek Behún
On Tue, 1 Jun 2021 16:59:52 +0200 Patrick DELAUNAY wrote: > Hi Marek, > > I am trying to activate CONFIG_LTO for STMicroelectronics stm32mp15 > platform > > (stm32mp15_trusted_defconfig and stm32mp15_basic_defconfig). > > > The config stm32mp15_basic_defconfig, with SPL supported failed to

[PATCH u-boot-marvell 5/7] arm: mvebu: dts: turris_mox: add nodes for SPI NOR partitions

2021-06-02 Thread Marek Behún
Add nodes for SPI NOR partitions to the device tree of Turris MOX, as are in Linux' device tree. Signed-off-by: Marek Behún --- arch/arm/dts/armada-3720-turris-mox.dts | 31 + 1 file changed, 31 insertions(+) diff --git a/arch/arm/dts/armada-3720-turris-mox.dts b/arch

[PATCH u-boot-marvell 6/7] arm: mvebu: turris_mox: enable options for Turris network boot

2021-06-02 Thread Marek Behún
Enable configuration options to support Turris network boot. This includes FIT support and some crypto commands. Signed-off-by: Marek Behún --- configs/turris_mox_defconfig | 8 1 file changed, 8 insertions(+) diff --git a/configs/turris_mox_defconfig b/configs/turris_mox_defconfig

[PATCH u-boot-marvell 2/7] arm: mvebu: turris_mox: add support for board rescue mode

2021-06-02 Thread Marek Behún
. When factory reset button is pressed, invoke rescue mode via distroboot by setting `boot_targets` to `rescue`. Rescue boot from console can be invoked by running run bootcmd_rescue Signed-off-by: Marek Behún --- board/CZ.NIC/turris_mox/turris_mox.c | 71 configs

[PATCH u-boot-marvell 3/7] arm: mvebu: turris_mox: start blinking PHY LEDs when entering rescue

2021-06-02 Thread Marek Behún
Configure blinking on ethernet PHY LEDs on the MOX A board when entering rescue mode via reset button. Signed-off-by: Marek Behún --- board/CZ.NIC/turris_mox/turris_mox.c | 35 1 file changed, 35 insertions(+) diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b

[PATCH u-boot-marvell 1/7] arm: mvebu: dts: turris_mox: add button and LED nodes

2021-06-02 Thread Marek Behún
Add nodes for indicator LED and reset button so that board code can implement board factory reset mechanism. Signed-off-by: Marek Behún --- arch/arm/dts/armada-3720-turris-mox.dts | 24 1 file changed, 24 insertions(+) diff --git a/arch/arm/dts/armada-3720-turris

[PATCH u-boot-marvell 4/7] arm: mvebu: configs: turris_mox: add fdtfile default env variable

2021-06-02 Thread Marek Behún
Add default fdtfile environment variable with value marvell/armada-3720-turris-mox.dtb. This can be useful for some boot scenarios. Signed-off-by: Marek Behún --- include/configs/turris_mox.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/turris_mox.h b/include/configs

Re: [PATCH u-boot-dm + u-boot-spi v4 04/10] mtd: spi-nor: allow registering multiple MTDs when DM is enabled

2021-07-08 Thread Marek Behún
On Thu, 8 Jul 2021 08:54:51 +0900 Masami Hiramatsu wrote: > Hi Marek, > > I found that this changes the mtd device name and makes 'mtdparts' > doesn't work on my developerbox platform. > > Before this change, > --- > => sf probe > SF: Detected mx66u51235f with page size 256 Bytes, erase

[PATCH u-boot-mvebu 10/31] tools: kwbimage: Print size of binary header in kwbimage_print_header()

2021-07-08 Thread Marek Behún
From: Pali Rohár The binary header in kwbimage contains executable SPL code. Print information about this binary header and not only information about it's data part. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwbimage.c | 24 1 file changed, 24

[PATCH u-boot-mvebu 04/31] tools: kwbimage: Add constant for SDIO bootfrom

2021-07-08 Thread Marek Behún
Add constant for SDIO value of the bootfrom header field. Signed-off-by: Marek Behún --- tools/kwbimage.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/kwbimage.h b/tools/kwbimage.h index 0b6d05bef1..9856b44536 100644 --- a/tools/kwbimage.h +++ b/tools/kwbimage.h @@ -27,6 +27,7

[PATCH u-boot-mvebu 05/31] tools: kwbimage: Fix generation of SATA, SDIO and PCIe images

2021-07-08 Thread Marek Behún
image is not used and must be set to 0x. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwbimage.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/tools/kwbimage.c b/tools/kwbimage.c index f40ba0994d..44bf5ee026 100644 --- a/tools/kwbimage.c +++ b

[PATCH u-boot-mvebu 06/31] tools: kwbimage: Don't crash when binary file name does not contain '/'

2021-07-08 Thread Marek Behún
From: Pali Rohár In the case when the file name is specified relative to the current working directory, it does not contain '/' character and strrchr() returns NULL. The following strcmp() function then crashes on NULL pointer dereference. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún

[PATCH u-boot-mvebu 30/31] tools: kwbimage: Add support for a new DATA_DELAY command

2021-07-08 Thread Marek Behún
the last DATA command. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwbimage.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/tools/kwbimage.c b/tools/kwbimage.c index dc2b0a12e6..99c74b081a 100644 --- a/tools/kwbimage.c +++ b/tools

[PATCH u-boot-mvebu 21/31] arm: mvebu: Use U-Boot's SPL BootROM framework for booting from NAND/UART

2021-07-08 Thread Marek Behún
of returning to BootROM directly, so that U-Boot's SPL framework is used for returning to BootROM. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- arch/arm/mach-mvebu/spl.c | 48 --- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/arch

[PATCH u-boot-mvebu 09/31] tools: kwbimage: Validate data checksum of v1 images

2021-07-08 Thread Marek Behún
From: Pali Rohár The data part of v1 images contains 32-bit checksum after the data. Validate whether this checksum is correct. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwbimage.c | 46 ++ 1 file changed, 46 insertions(+) diff

[PATCH u-boot-mvebu 22/31] arm: mvebu: Always use BootROM for loading the rest of U-Boot's binary

2021-07-08 Thread Marek Behún
UART and NAND. Note that the config options CONFIG_SPL_SPI_FLASH_SUPPORT, CONFIG_SPL_SPI_LOAD and CONFIG_SPL_SPI_SUPPORT needs to be enabled as config option CONFIG_SYS_U_BOOT_OFFS (used by kwbimage) depends on it. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- arch/arm/mach-mvebu/Kconfig

[PATCH u-boot-mvebu 18/31] arm: mvebu: Fix return_to_bootrom()

2021-07-08 Thread Marek Behún
l via kwboot") Reviewed-by: Marek Behún --- arch/arm/mach-mvebu/lowlevel_spl.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-mvebu/lowlevel_spl.S b/arch/arm/mach-mvebu/lowlevel_spl.S index 8718d7a43e..dde77b7652 100644 --- a/arch/arm/mach-mvebu/lowl

[PATCH u-boot-mvebu 14/31] tools: kwboot: Cosmetic fix - add missing curly brackets

2021-07-08 Thread Marek Behún
From: Pali Rohár Add missing curly brackets for this else statement. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwboot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index 6e66ad4ecf..e4d4267e47 100644 --- a/tools

[PATCH u-boot-mvebu 25/31] tools: kwbimage: Remove v1 kwbimage SPL padding to CONFIG_SYS_U_BOOT_OFFS bytes

2021-07-08 Thread Marek Behún
decrease the final size of v1 kwbimage. This means there is more space for main U-Boot binary. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- tools/kwbimage.c | 13 - 1 file changed, 13 deletions(-) diff --git a/tools/kwbimage.c b/tools/kwbimage.c index acd57267f4..656f3f9ae9

<    1   2   3   4   5   6   7   8   9   10   >