Re: [PATCH v2 09/19] video: sunxi: de2: switch to public uclass functions

2021-03-06 Thread Jernej Škrabec
Dne nedelja, 07. marec 2021 ob 02:32:52 CET je Andre Przywara napisal(a): > On Sat, 6 Mar 2021 20:54:27 +0100 > > Jernej Skrabec wrote: > > Currently DE2 driver uses functions which are defined in internal > > headers. They are not meant to be used outside of uclass framework. > > Switch DE2 dri

Re: [PATCH u-boot 30/39] ARM: imx6m: fix imx_eqos_txclk_set_rate() type mismatch for LTO

2021-03-06 Thread Sean Anderson
Re: [PATCH u-boot 30/39] ARM: imx6m: fix imx_eqos_txclk_set_rate() type mismatch for LTO imx8m? On 3/6/21 11:25 PM, Marek Behún wrote: When building imx8mp_evk_defconfig with LTO, the compiler complains about type mismatch of function imx_eqos_txclk_set_rate() in file drivers/net/dwc_eth_q

Re: [PATCH u-boot 14/39] lib: crc32: make the crc_table variable non-const

2021-03-06 Thread Marek Vasut
On 3/7/21 5:58 AM, Marek Behun wrote: On Sun, 7 Mar 2021 05:46:24 +0100 Marek Vasut wrote: On 3/7/21 5:25 AM, Marek Behún wrote: When compiling with LTO, the compiler fails with an error saying that `crc_table` causes a section type conflict with `efi_var_buf`. This is because both are decla

Re: [PATCH u-boot 11/39] binman: declare symbols externally visible

2021-03-06 Thread Marek Behun
I forgot to drop this patch. It is not needed, please ignore it. Marek

Re: [PATCH u-boot 14/39] lib: crc32: make the crc_table variable non-const

2021-03-06 Thread Marek Behun
On Sun, 7 Mar 2021 05:46:24 +0100 Marek Vasut wrote: > On 3/7/21 5:25 AM, Marek Behún wrote: > > When compiling with LTO, the compiler fails with an error saying that > > `crc_table` causes a section type conflict with `efi_var_buf`. > > > > This is because both are declared to be in the same se

Re: [PATCH u-boot 05/39] checkpatch: require quotes around section name in the __section() macro

2021-03-06 Thread Marek Behun
On Sun, 7 Mar 2021 05:47:56 +0100 Marek Vasut wrote: > On 3/7/21 5:25 AM, Marek Behún wrote: > > 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(-) > >

Re: [PATCH u-boot 05/39] checkpatch: require quotes around section name in the __section() macro

2021-03-06 Thread Marek Vasut
On 3/7/21 5:25 AM, Marek Behún wrote: 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 755f4802a4..fd1e9

Re: [PATCH u-boot 14/39] lib: crc32: make the crc_table variable non-const

2021-03-06 Thread Marek Vasut
On 3/7/21 5:25 AM, Marek Behún wrote: When compiling with LTO, the compiler fails with an error saying that `crc_table` causes a section type conflict with `efi_var_buf`. This is because both are declared to be in the same section (via macro `__efi_runtime_data`), but one is const while the othe

[PATCH u-boot 38/39] ARM: enable LTO for some boards

2021-03-06 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 --- configs/da850evm_defconfig| 1 + configs/da850evm_direct_nor_defconfig | 1 + configs/da850evm_nand_defconfig | 1 + configs

[PATCH u-boot 37/39] ARM: don't use -ffunction-sections/-fdata-sections with LTO build

2021-03-06 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 4153f7e371..2b2c6ad2e5 100644 --- a

[PATCH u-boot 39/39] DO NOT MERGE! ARM: enable LTO by default

2021-03-06 Thread Marek Behún
Build ARM targets with LTO by default. Signed-off-by: Marek Behún --- arch/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/Kconfig b/arch/Kconfig index bf4b8afcb4..d0f5a16b95 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -37,6 +37,7 @@ config ARM select CREATE_ARCH_SYM

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

2021-03-06 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 b884b7b248..bf4b8afcb4 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -33,6 +33,7 @

[PATCH u-boot 35/39] ata: ahci: fix ahci_link_up() type mismatch for LTO

2021-03-06 Thread Marek Behún
When building highbank_defconfig with LTO, the compiler complains about type mismatch of function ahci_link_up(). The third parameter of this function is of type u8 in drivers/ata/ahci.c, but of type int in board/highbank/ahci.c. There is no reason in using u8, and the code using this function ac

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

2021-03-06 Thread Marek Behún
Adam Ford says that DM3730 needs board.c compiled without LTO flags. Also add clock.c, since it says in Makefile that it need different flags. Signed-off-by: Marek Behún Suggested-by: Adam Ford --- arch/arm/mach-omap2/omap3/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/ar

[PATCH u-boot 32/39] ARM: fix LTO for rockchip and samsung

2021-03-06 Thread Marek Behún
When building with LTO, the compiler complains about type mismatch of function usb_gadget_handle_interrupts(). This function is defined without parameters in files arch/arm/mach-rockchip/board.c board/samsung/common/exynos5-dt.c but it should have one parameter, int index. Fix this. Signed-of

[PATCH u-boot 34/39] armv8: SPL: discard relocation information

2021-03-06 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 30/39] ARM: imx6m: fix imx_eqos_txclk_set_rate() type mismatch for LTO

2021-03-06 Thread Marek Behún
When building imx8mp_evk_defconfig with LTO, the compiler complains about type mismatch of function imx_eqos_txclk_set_rate() in file drivers/net/dwc_eth_qos.c:845:12 which contains a weak definition of this function, vs file arch/arm/mach-imx/imx8m/clock_imx8mm.c which contains an implementati

[PATCH u-boot 31/39] ARM: fix LTO for seaboard

2021-03-06 Thread Marek Behún
When seaboard_defconfig is compiled with LTO, the compiler complains about some instructions not being supported in ARM mode. This is caused by arch/arm/mach-tegra/tegra20/warmboot_avp.c having different CFLAGS declared in Makefile. This file needs to be compiled without LTO. Fix this by removing

[PATCH u-boot 29/39] ARM: kona: fix clk_bsc_enable() type mismatch for LTO

2021-03-06 Thread Marek Behún
When building with LTO, the compiler complains about type mismatch of function clk_bsc_enable() in file: arch/arm/cpu/armv7/kona-common/clk-stubs.c vs other files that define or use this function: warning: type of ‘clk_bsc_enable’ does not match original declaration. Change the type of this fu

[PATCH u-boot 28/39] ARM: fix LTO for keystone

2021-03-06 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 27/39] ARM: fix LTO for apf27

2021-03-06 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(-) di

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

2021-03-06 Thread Marek Behún
On ARM, the gd pointer is stored in registers r9 / x18. For this the -ffixed-r9 / -ffixed-x18 flag is used when compiling, but using global register variables causes errors when building with LTO, and these errors are very difficult to overcome. Richard Biener says [1]: Note that global register

[PATCH u-boot 26/39] ARM: fix LTO for imx28_xea

2021-03-06 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 --- arch/ar

[PATCH u-boot 25/39] ARM: fix LTO build for some thumb-interwork cases

2021-03-06 Thread Marek Behún
Fix LTO build for some thumb-interwork usecases (such as for da850evm_defconfig), where inline assmebly such as mrc p15,0,r2,c1,c0,0 causes the compiler to fail during LTO linking with Error: selected processor does not support `mrc p15,0,r2,c1,c0,0' in Thumb mode Signed-off-by: Marek

[PATCH u-boot 23/39] ARM: global_data: make set_gd() work for armv5 and armv6

2021-03-06 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/arc

[PATCH u-boot 20/39] sandbox: use sections instead of symbols for getopt array boundaries

2021-03-06 Thread Marek Behún
In style of linked lists, instead of declaring symbols for boundaries of getopt options array in the linker script, declare corresponding sections and retrieve the boundaries via static inline functions. Without this clang's LTO produces binary without any getopt options, because for some reason i

[PATCH u-boot 22/39] sandbox: enable LTO by default

2021-03-06 Thread Marek Behún
Build sandbox targets with LTO by default. Signed-off-by: Marek Behún --- arch/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/Kconfig b/arch/Kconfig index a6dab3e56d..b884b7b248 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -123,6 +123,7 @@ config SANDBOX select SYSRE

[PATCH u-boot 21/39] sandbox: make LTO available

2021-03-06 Thread Marek Behún
Make LTO available for sandbox architecture. Signed-off-by: Marek Behún --- arch/Kconfig | 1 + arch/sandbox/config.mk | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index 27843cd79c..a6dab3e56d 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -101,6

[PATCH u-boot 19/39] sandbox: errno: avoid conflict with libc's errno

2021-03-06 Thread Marek Behún
When building with LTO, the system libc's `errno` variable used in arch/sandbox/cpu/os.c conflicts with U-Boot's `errno` (defined in lib/errno.c) with the following error: .../ld: errno@@GLIBC_PRIVATE: TLS definition in /lib64/libc.so.6 section .tbss mismatches non-TLS reference in

[PATCH u-boot 17/39] build: support building with Link Time Optimizations

2021-03-06 Thread Marek Behún
Add plumbing for building U-Boot with Link Time Optimizations. Signed-off-by: Marek Behún --- Kbuild | 2 ++ Kconfig | 19 +++ Makefile | 36 scripts/Makefile.lib | 3 +++ scripts/Makefile.spl | 14

[PATCH u-boot 16/39] build: use thin archives instead of incremental linking

2021-03-06 Thread Marek Behún
Currently we use incremental linking (ld -r) to link several object files from one directory into one built-in.o object file containing the linked code from that directory (and its subdirectories). Linux has, some time ago, moved to thin archives instead. Thin archives are archives (.a) that do n

[PATCH u-boot 18/39] build: LTO: move platform libs into --start-group list

2021-03-06 Thread Marek Behún
When building with LTO, move $(PLATFORM_LIBS) into the --start-group / --end-group list. Otherwise some functions declared in assembly may not be resolved and linking may fail. Signed-off-by: Marek Behún --- Makefile | 3 ++- scripts/Makefile.spl | 3 ++- 2 files changed, 4 insertion

[PATCH u-boot 14/39] lib: crc32: make the crc_table variable non-const

2021-03-06 Thread Marek Behún
When compiling with LTO, the compiler fails with an error saying that `crc_table` causes a section type conflict with `efi_var_buf`. This is because both are declared to be in the same section (via macro `__efi_runtime_data`), but one is const while the other is not. Make this variable non-const

[PATCH u-boot 15/39] Makefile, Makefile.spl: cosmetic change

2021-03-06 Thread Marek Behún
Indent the linking commands so that they look cosmetically better. Signed-off-by: Marek Behún --- Makefile | 12 +++- scripts/Makefile.spl | 15 +-- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 68ce5195b2..7b0ba9df9a 1

[PATCH u-boot 13/39] efi_loader: fix warning when linking with LTO

2021-03-06 Thread Marek Behún
When linking with LTO, the compiler complains about type mismatch of variables `__efi_runtime_start`, `__efi_runtime_stop`, `__efi_runtime_rel_start` and `__efi_runtime_rel_stop`: include/efi_loader.h:218:21: warning: type of ‘__efi_runtime_start’ does not m

[PATCH u-boot 12/39] string: make memcpy() and memset() visible to fix LTO linking errors

2021-03-06 Thread Marek Behún
It seems that sometimes (happening on ARM64, for example with turris_mox_defconfig) GCC, when linking with LTO, changes the symbol names of some functions, for example lib/string.c's memcpy() function to memcpy.isra.0. This is a problem however when GCC for a code such as this: struct some

[PATCH u-boot 11/39] binman: declare symbols externally visible

2021-03-06 Thread Marek Behún
Use the `externally_visible` attribute to declare binman symbols externally visible, so that when building with LTO the compiler does not optimize this data away. Signed-off-by: Marek Behún --- include/binman_sym.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/

[PATCH u-boot 10/39] linker_lists: declare lists and entries as __ADDRESSABLE for LTO

2021-03-06 Thread Marek Behún
Use the __ADDRESSABLE() macro to make entries and lists declared by ll_entry_declare() and ll_entry_declare_list() addressable so that when building with LTO the compiler does not optimize this data away. Signed-off-by: Marek Behún --- include/linker_lists.h | 8 ++-- 1 file changed, 6 inser

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

2021-03-06 Thread Marek Behún
This commit does the same thing as Linux commit 33def8498fdd. Use a more generic form for __section that requires quotes to avoid complications with clang and gcc differences. Remove the quote operator # from compiler_attributes.h __section macro. Convert all unquoted __section(foo) uses to quot

[PATCH u-boot 09/39] test/py: improve regular expression for ut subtest symbol matcher

2021-03-06 Thread Marek Behún
Improve the regular expression that matches unittest symbols in u-boot.sym. Currently we do not enforce no prefix in symbol string, but with the soon to come change in linker lists declaring lists and entries with the __ADDRESSABLE macro (because of LTO), the symbol file will contain for every sym

[PATCH u-boot 08/39] linker_lists: prepare macros to avoid code repetition

2021-03-06 Thread Marek Behún
Prepare private macros expanding to linker list entry symbol name and declaration to avoid nasty code repetition in the next patch. We also avoid some code repetition in current code with these macros. Signed-off-by: Marek Behún --- include/linker_lists.h | 46 --

[PATCH u-boot 07/39] compiler.h: align the __ADDRESSABLE macro with Linux' version

2021-03-06 Thread Marek Behún
Use UNIQUE_ID in the __ADDRESSABLE macro. Signed-off-by: Marek Behún --- 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/linux/compiler.h +++ b/inclu

[PATCH u-boot-marvell 02/39] ddr: marvell: axp: fix array types have different bounds warning

2021-03-06 Thread Marek Behún
The arrays `pbs_dq_mapping`, `div_ratio1to1` and `div_ratio2to1` have different bounds declared in header files where these variables are also defined from the ones declared in source files. This causes the compiler to complain (when building with LTO): ddr3_sdram.c:24:12: warning: type of ‘pbs_

[PATCH u-boot-dm 03/39] regmap: fix a serious pointer casting bug

2021-03-06 Thread Marek Behún
There is a serious bug in regmap_read() and regmap_write() functions where an uint pointer is cast to (void *) which is then cast to (u8 *), (u16 *), (u32 *) or (u64 *), depending on register width of the map. For example given a regmap with 16-bit register width the code int val = 0x12340

[PATCH u-boot 04/39] api: fix a potential serious bug caused by undef CONFIG_SYS_64BIT_LBA

2021-03-06 Thread Marek Behún
The api_public.h header file undefined macro CONFIG_SYS_64BIT_LBA. But api/api_storage.c includes this header before including part.h, causing the type of lbaint_t and subsequently the type signature of blk_dread() and blk_dwrite() functions to change from the rest of U-Boot (if CONFIG_SYS_64BIT_L

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

2021-03-06 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 755f4802a4..fd1e9c4d24 100755 --- a/scripts/checkpatch.pl +

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

2021-03-06 Thread Marek Behún
Hello, so after the RFC I am now sending first version of patches adding support for LTO to U-Boot. This series was tested by Github/Azure CI at https://github.com/u-boot/u-boot/pull/57 and also by Pali Rohar and Adam Ford for some boards. There is one test that fails and one that did not comp

[PATCH u-boot-marvell 01/39] ddr: marvell: axp: align signature of mv_xor_mem_init() with a38x

2021-03-06 Thread Marek Behún
In arch/arm/mach-mvebu/dram.c we always include axp's xor.h for common XOR definitions, regardless whether we compile for axp or a38x. But the declaration of this function has a different signature in axp's xor.h from the one used in a38x' implementation - one parameter is u64 instead of u32. This

Re: [RFC PATCH u-boot 00/12] U-Boot LTO (Sandbox + ARM Nokia RX-51)

2021-03-06 Thread Marek Behun
On Sat, 6 Mar 2021 21:45:02 -0600 Adam Ford wrote: > On Sat, Mar 6, 2021 at 3:49 PM Marek Behun wrote: > > > > On Sat, 6 Mar 2021 22:38:52 +0100 > > Pali Rohár wrote: > > > > > On Saturday 06 March 2021 22:19:22 Marek Behun wrote: > > > > On Sat, 6 Mar 2021 22:00:45 +0100 > > > > Pali Rohár

[PATCH 2/2] arm: omap3: Make secure_unlock_mem() static

2021-03-06 Thread Adam Ford
secure_unlock_mem() is only used in one file, so make it static in that file. This may help with some further optimization in the future. Signed-off-by: Adam Ford diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c index 879b0f..74b5a4b111 100644 --- a/arch/ar

[PATCH 1/2] arm: omap3: Make secureworld_exit() static

2021-03-06 Thread Adam Ford
secureworld_exit() is only used in one file, so make it static to that file and remove it from sys_proto.h. This may help with some further optimization in the future. Signed-off-by: Adam Ford diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h

[PATCH v6 4/4] qemu: arm: select QFW, MMIO on qemu-arm

2021-03-06 Thread Asherah Connor
Select CMD_QFW and QFW_MMIO in the qemu-arm board (covers arm and arm64). Signed-off-by: Asherah Connor --- (no changes since v5) Changes in v5: * Split adding MMIO driver to QEMU arm/64 into own commit. * Use the generic qemu-arm board config rather than adding to multiple defconfigs. boa

[PATCH v6 3/4] qemu: add MMIO driver for QFW

2021-03-06 Thread Asherah Connor
Add MMIO driver for QFW. Note that there is no consumer as of this patch. Signed-off-by: Asherah Connor --- (no changes since v5) Changes in v5: * Split MMIO driver into its own commit. * Add CONFIG_QFW_MMIO for selection by arch/board. drivers/misc/Kconfig| 7 +++ drivers/misc/Makefil

[PATCH v6 2/4] test: qemu: add qfw sandbox driver, dm tests, qemu tests

2021-03-06 Thread Asherah Connor
A sandbox driver and test are added for the qfw uclass, and a test in QEMU added for qfw functionality to confirm it doesn't break in real world use. Signed-off-by: Asherah Connor Reviewed-by: Simon Glass --- (no changes since v1) drivers/misc/Makefile | 1 + drivers/misc/qfw_sandbox.c

[PATCH v6 1/4] x86: qemu: move QFW to its own uclass

2021-03-06 Thread Asherah Connor
We move qfw into its own uclass and split the PIO functions into a specific driver for that uclass. The PIO driver is selected in the qemu-x86 board config (this covers x86 and x86_64). include/qfw.h is cleaned up and documentation added. Signed-off-by: Asherah Connor --- Changes in v6: * San

[PATCH v6 0/4] Move qfw to DM, add Arm support

2021-03-06 Thread Asherah Connor
This series moves the QFW driver into a uclass, UCLASS_QFW, and splits the driver into qfw_pio and qfw_mmio. Each driver is selected on the appropriate QEMU board. A sandbox driver is also added, and a DM unit test against that driver. The qfw command is tested in QEMU, and documentation added.

Re: [PATCH v5 1/3] x86: qemu: move QFW to its own uclass

2021-03-06 Thread Asherah Connor
Hi Bin, Simon, On 21/03/05 10:03:p, Bin Meng wrote: > On Fri, Mar 5, 2021 at 10:31 PM Simon Glass wrote: > > If I previously reviewed it you can add my tag. I wasn't sure of the correct etiquette when a large rearrangement of the patches had been done; I'll keep this in mind. > > I think sandbo

[PATCH] arm: omap3: Make try_unlock_memory() static

2021-03-06 Thread Adam Ford
try_unlock_memory() is only used in one file, so make it static in that file and remove it from the sys_proto header file. This may help with some further optimization in the future. Signed-off-by: Adam Ford diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-om

Re: [RFC PATCH u-boot 00/12] U-Boot LTO (Sandbox + ARM Nokia RX-51)

2021-03-06 Thread Adam Ford
On Sat, Mar 6, 2021 at 3:49 PM Marek Behun wrote: > > On Sat, 6 Mar 2021 22:38:52 +0100 > Pali Rohár wrote: > > > On Saturday 06 March 2021 22:19:22 Marek Behun wrote: > > > On Sat, 6 Mar 2021 22:00:45 +0100 > > > Pali Rohár wrote: > > > > > > > On Saturday 06 March 2021 21:54:00 Marek Behun wro

Re: [RFC PATCH u-boot 02/12] sandbox: errno: avoid conflict with libc's errno

2021-03-06 Thread Marek Behun
On Fri, 5 Mar 2021 18:21:51 +0100 Heinrich Schuchardt wrote: > On 05.03.21 16:37, Marek Behun wrote: > > On Fri, 5 Mar 2021 11:00:45 +0800 > > Bin Meng wrote: > > > >> On Wed, Mar 3, 2021 at 12:13 PM Marek Behún wrote: > >>> > >>> When building with LTO, the system libc's `errno` variable u

Re: U-Boot CI error, unable to reproduce locally

2021-03-06 Thread Marek Behun
On Sat, 6 Mar 2021 21:11:34 -0500 Tom Rini wrote: > On Sun, Mar 07, 2021 at 02:27:33AM +0100, Marek Behun wrote: > > > Hello Tom, > > > > I seem to run into an error on Azure's CI for U-Boot that I cannot > > reproduce locally. > > > > It concerns my LTO work https://github.com/u-boot/u-boot/p

Re: U-Boot CI error, unable to reproduce locally

2021-03-06 Thread Tom Rini
On Sun, Mar 07, 2021 at 02:27:33AM +0100, Marek Behun wrote: > Hello Tom, > > I seem to run into an error on Azure's CI for U-Boot that I cannot > reproduce locally. > > It concerns my LTO work https://github.com/u-boot/u-boot/pull/57 > > The test > u-boot.u-boot (test.py xilinx_zynq_virt) >

request for i.MX8MM Venice test

2021-03-06 Thread Marek Behun
[sorry for the spam, I accidentally sent this e-mail from my personal address] Hello Tim, you are listed as maintainer of i.MX8MM Venice board in U-Boot. I am currently working on LTO support for U-Boot, and I have encountered a problem with i.MX8MM Venice board: when LTO is enabled, the linking

Re: Fastboot

2021-03-06 Thread Sean Anderson
On 3/6/21 8:38 PM, Jonas Vautherin wrote: Thanks a lot Sean! I tried to enable logging by using the following CONFIG_: ``` CONFIG_LOG=y CONFIG_SPL_LOG=y CONFIG_TPL_LOG=y CONFIG_LOG_MAX_LEVEL=5 You need to increase this. Log levels are only compiled-in if they are less than the max log level.

Re: Fastboot

2021-03-06 Thread Jonas Vautherin
Thanks a lot Sean! I tried to enable logging by using the following CONFIG_: ``` CONFIG_LOG=y CONFIG_SPL_LOG=y CONFIG_TPL_LOG=y CONFIG_LOG_MAX_LEVEL=5 CONFIG_SPL_LOG_MAX_LEVEL=3 CONFIG_TPL_LOG_MAX_LEVEL=3 CONFIG_LOG_DEFAULT_LEVEL=7 CONFIG_LOG_CONSOLE=y CONFIG_SPL_LOG_CONSOLE=y CONFIG_TPL_LOG_CONS

Re: [PATCH v2 10/19] video: sunxi: dw-hdmi: probe driver by compatible

2021-03-06 Thread Andre Przywara
On Sat, 6 Mar 2021 20:54:28 +0100 Jernej Skrabec wrote: > Currently sunxi dw-hdmi driver is probed unconditionally, even if there > is no such device. > > Switch driver to probing via compatible string. This brings many > benefits - driver can read DT node and allows driver to be always > enabl

Re: [PATCH v2 09/19] video: sunxi: de2: switch to public uclass functions

2021-03-06 Thread Andre Przywara
On Sat, 6 Mar 2021 20:54:27 +0100 Jernej Skrabec wrote: > Currently DE2 driver uses functions which are defined in internal > headers. They are not meant to be used outside of uclass framework. > Switch DE2 driver to public ones. This has additional benefit that > device_probe doesn't need to be

Re: [PATCH v2 08/19] video: sunxi: Remove TV probe from DE2

2021-03-06 Thread Andre Przywara
On Sat, 6 Mar 2021 20:54:26 +0100 Jernej Skrabec wrote: > TV driver was never fully implemented. Remove search for it from DE2 > driver. Correct, there is no driver in the tree which would match this string. > Signed-off-by: Jernej Skrabec Reviewed-by: Andre Przywara Cheers, Andre > --- >

Re: [PATCH v2 06/19] video: sunxi: Use DW-HDMI hpd function

2021-03-06 Thread Andre Przywara
On Sat, 6 Mar 2021 20:54:24 +0100 Jernej Skrabec wrote: > It turns out that there are two ways how hot plug detection can be done. > One is standard way for DW HDMI controller - checking bit 2 in 0x3004 > register. Another way is applicable only to Allwinner custom PHY - by > checking bit 19 in

Re: [PATCH v2 04/19] common: edid: extract code for detailed timing search

2021-03-06 Thread Andre Przywara
On Sat, 6 Mar 2021 20:54:22 +0100 Jernej Skrabec wrote: > Code which searches for valid detailed timing entry will be used in more > places. Extract it. > > No functional change is made. However, descriptors are casted to > edid_detailed_timing instead of edid_monitor_descriptor. Descriptor can

U-Boot CI error, unable to reproduce locally

2021-03-06 Thread Marek Behun
Hello Tom, I seem to run into an error on Azure's CI for U-Boot that I cannot reproduce locally. It concerns my LTO work https://github.com/u-boot/u-boot/pull/57 The test u-boot.u-boot (test.py xilinx_zynq_virt) is failing with this log https://dev.azure.com/u-boot/a1096300-2999-4ec4-a21a-4c22

request for i.MX8MM Venice test

2021-03-06 Thread Marek Behun
Hello Tim, you are listed as maintainer of i.MX8MM Venice board in U-Boot. I am currently working on LTO support for U-Boot, and I have encountered a problem with i.MX8MM Venice board: when LTO is enabled, the linking process for SPL does not throw away relocation information, making the resultin

[PATCH] armv8: SPL: discard relocation information

2021-03-06 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-marvell] ddr: marvell: axp: fix array types have different bounds warning

2021-03-06 Thread Marek Behún
The arrays `pbs_dq_mapping`, `div_ratio1to1` and `div_ratio2to1` have different bounds declared in header files where these variables are also defined from the ones declared in source files. This causes the compiler to complain (when building with LTO): ddr3_sdram.c:24:12: warning: type of ‘pbs_

test/image/test-imagetools.sh: Broken by 3f04db89

2021-03-06 Thread Vagrant Cascadian
It seems like commit: 3f04db891a353f4b127ed57279279f851c6b4917 image: Check for unit addresses in FIT Broke test/image/test-imagetools.sh. I get the impression test-imagetools.sh is more-or-less unmaintained and deprecated. Does test-imagetools.sh perform tests that are not covered elsewhere? If

[PATCH u-boot] api: fix a potential serious bug caused by undef CONFIG_SYS_64BIT_LBA

2021-03-06 Thread Marek Behún
The api_public.h header file undefined macro CONFIG_SYS_64BIT_LBA. But api/api_storage.c includes this header before including part.h, causing the type of lbaint_t and subsequently the type signature of blk_dread() and blk_dwrite() functions to change from the rest of U-Boot (if CONFIG_SYS_64BIT_L

[PATCH] Nokia RX-51: Enable CONFIG_WDT to remove deprecation warning

2021-03-06 Thread Pali Rohár
Signed-off-by: Pali Rohár --- This patch increase u-boot.bin binary size above maximal limit. So this patch cannot be applied yet. But it can be applied on top of the LTO patches. So please put this patch into the queue and include it into U-Boot after LTO patches are merged. --- configs/nokia_rx

Re: [PATCH 1/1] configs: EXT4, FAT, hush shell, env on S-mode MAIX

2021-03-06 Thread Sean Anderson
On 3/6/21 3:20 AM, Heinrich Schuchardt wrote: * enable storing the environment in the SPI flash * enable EXT4 and FAT file system * enable hush shell * run k210_bootcmd as default boot command Signed-off-by: Heinrich Schuchardt --- configs/sipeed_maix_smode_defconfig | 11 +++ 1 file

Re: [RFC PATCH u-boot 00/12] U-Boot LTO (Sandbox + ARM Nokia RX-51)

2021-03-06 Thread Marek Behun
On Sat, 6 Mar 2021 22:38:52 +0100 Pali Rohár wrote: > On Saturday 06 March 2021 22:19:22 Marek Behun wrote: > > On Sat, 6 Mar 2021 22:00:45 +0100 > > Pali Rohár wrote: > > > > > On Saturday 06 March 2021 21:54:00 Marek Behun wrote: > > > > On Sat, 6 Mar 2021 21:41:14 +0100 > > > > Pali Rohá

Re: [PATCH 1/5] risv: add missing SBI extension definitions

2021-03-06 Thread Sean Anderson
On 3/6/21 12:59 AM, Bin Meng wrote: On Fri, Mar 5, 2021 at 1:02 AM Heinrich Schuchardt wrote: Add the System Reset Extension and the Hart State Management Extension definitions. Add missing RFENCE Extension enum values. The SBI 0.1 extension constants are needed for for the sbi command. Remo

Re: [RFC PATCH u-boot 00/12] U-Boot LTO (Sandbox + ARM Nokia RX-51)

2021-03-06 Thread Pali Rohár
On Saturday 06 March 2021 22:19:22 Marek Behun wrote: > On Sat, 6 Mar 2021 22:00:45 +0100 > Pali Rohár wrote: > > > On Saturday 06 March 2021 21:54:00 Marek Behun wrote: > > > On Sat, 6 Mar 2021 21:41:14 +0100 > > > Pali Rohár wrote: > > > > > > > On Saturday 06 March 2021 15:08:13 Tom Rini w

Re: [RFC PATCH u-boot 01/12] build: use thin archives instead of incremental linking

2021-03-06 Thread Marek Behun
On Fri, 5 Mar 2021 08:37:28 -0500 Tom Rini wrote: > On Fri, Mar 05, 2021 at 09:34:42PM +0800, Bin Meng wrote: > > Hi Marek, > > > > On Fri, Mar 5, 2021 at 2:17 AM Marek Behun wrote: > > > > > > On Thu, 4 Mar 2021 18:57:11 +0800 > > > Bin Meng wrote: > > > > > > > Hi Marek, > > > > > > > >

Re: [RFC PATCH u-boot 00/12] U-Boot LTO (Sandbox + ARM Nokia RX-51)

2021-03-06 Thread Marek Behun
On Sat, 6 Mar 2021 22:00:45 +0100 Pali Rohár wrote: > On Saturday 06 March 2021 21:54:00 Marek Behun wrote: > > On Sat, 6 Mar 2021 21:41:14 +0100 > > Pali Rohár wrote: > > > > > On Saturday 06 March 2021 15:08:13 Tom Rini wrote: > > > > Perhaps we'll default to yes on some SoCs. The omap3

Re: [RFC PATCH u-boot 00/12] U-Boot LTO (Sandbox + ARM Nokia RX-51)

2021-03-06 Thread Pali Rohár
On Saturday 06 March 2021 21:54:00 Marek Behun wrote: > On Sat, 6 Mar 2021 21:41:14 +0100 > Pali Rohár wrote: > > > On Saturday 06 March 2021 15:08:13 Tom Rini wrote: > > > Perhaps we'll default to yes on some SoCs. The omap3 thing is a bit > > > odd, but we'll see what happens on real N900 hard

Re: [RFC PATCH u-boot 00/12] U-Boot LTO (Sandbox + ARM Nokia RX-51)

2021-03-06 Thread Marek Behun
On Sat, 6 Mar 2021 21:41:14 +0100 Pali Rohár wrote: > On Saturday 06 March 2021 15:08:13 Tom Rini wrote: > > Perhaps we'll default to yes on some SoCs. The omap3 thing is a bit > > odd, but we'll see what happens on real N900 hardware. > > Hello! > > Could you send me a link to git repo / br

[PATCH] doc: stm32mp1: Use u-boot.itb if CONFIG_SPL_LOAD_FIT=y

2021-03-06 Thread Marek Vasut
For systems where SPL loads fitImage, i.e. CONFIG_SPL_LOAD_FIT=y, use u-boot.itb in the relevant documentation parts. Otherwise use u-boot.img. Signed-off-by: Marek Vasut Cc: Patrice Chotard Cc: Patrick Delaunay --- doc/board/st/stm32mp1.rst | 16 +++- 1 file changed, 11 insertions

Re: [RFC PATCH u-boot 00/12] U-Boot LTO (Sandbox + ARM Nokia RX-51)

2021-03-06 Thread Pali Rohár
On Saturday 06 March 2021 15:08:13 Tom Rini wrote: > Perhaps we'll default to yes on some SoCs. The omap3 thing is a bit > odd, but we'll see what happens on real N900 hardware. Hello! Could you send me a link to git repo / branch and tell me from which commit should I do tests on real N900 hard

Re: [PATCH] cmd: part: number: remove inconsistent 0x from returned value

2021-03-06 Thread Tom Rini
On Fri, Mar 05, 2021 at 07:35:24AM -0700, Simon Glass wrote: > Hi, > > On Fri, 5 Mar 2021 at 07:33, Stefan Herbrechtsmeier > wrote: > > > > Hi Eugeniu, > > > > Am 05.03.2021 um 12:52 schrieb Eugeniu Rosca: > > > Hello Stefan, > > > > > > On Fri, Mar 05, 2021 at 07:39:04AM +, Stefan Herbrechts

Re: [RFC PATCH u-boot 00/12] U-Boot LTO (Sandbox + ARM Nokia RX-51)

2021-03-06 Thread Tom Rini
On Sat, Mar 06, 2021 at 06:37:49PM +0100, Marek Behun wrote: > On Sat, 6 Mar 2021 05:12:12 -0600 > Adam Ford wrote: > > > On Fri, Mar 5, 2021 at 9:03 PM Adam Ford wrote: > > > > > > On Fri, Mar 5, 2021 at 11:10 AM Adam Ford wrote: > > > > > > > > On Fri, Mar 5, 2021 at 6:31 AM Stefan Roese w

[PATCH v2 19/19] video: sunxi: dw-hdmi: Use new PHY driver

2021-03-06 Thread Jernej Skrabec
Remove direct PHY managing from dw-hdmi platform driver and use dedicated driver instead. While at it, enable clocks and deassert reset lines through clk and reset framework instead of manually configuring bits. Signed-off-by: Jernej Skrabec --- drivers/video/sunxi/sunxi_dw_hdmi.c | 225 +---

[PATCH v2 18/19] video: sunxi: Add DW HDMI PHY driver

2021-03-06 Thread Jernej Skrabec
This commit adds standalone driver for DW HDMI PHY. It deprecates code which is included in sunxi dw-hdmi platform driver. Signed-off-by: Jernej Skrabec --- arch/arm/mach-sunxi/Kconfig | 1 + drivers/video/sunxi/Makefile| 2 +- drivers/video/sunxi/sunxi_dw_hdmi_phy.c

[PATCH v2 17/19] video: dw-hdmi: modify phy init callback to include full timings

2021-03-06 Thread Jernej Skrabec
Currently PHY init callback has only pixel clock as a parameter, but other timing parameters may be needed for custom PHYs. Modify callback signature to include full timings. Cc: Neil Armstrong Signed-off-by: Jernej Skrabec --- drivers/video/dw_hdmi.c | 6 +++--- drivers/video/meson

[PATCH v2 16/19] video: sunxi: de2: switch clock setup to DM model

2021-03-06 Thread Jernej Skrabec
Now that proper DM clock and reset driver exists for Display Engine 2 and 3, remove all clock and reset related code and use appropriate framework instead. Signed-off-by: Jernej Skrabec --- arch/arm/mach-sunxi/Kconfig | 1 + drivers/video/sunxi/sunxi_de2.c | 67 +++--

[PATCH v2 15/19] clk: sunxi: add DE2 clock driver

2021-03-06 Thread Jernej Skrabec
Video driver currently manages clocks and resets by directly writing to registers. This is already a bit messy because each SoC has some specifics. It's much better to implement proper clock and reset driver which takes information from device tree file. Note that this driver is not perfect yet. I

[PATCH v2 14/19] clk: sunxi: Add DE2 and HDMI clocks to H3 and A64

2021-03-06 Thread Jernej Skrabec
These clocks and resets are needed for video drivers. Cc: Lukasz Majewski Signed-off-by: Jernej Skrabec --- drivers/clk/sunxi/clk_a64.c | 12 drivers/clk/sunxi/clk_h3.c | 12 2 files changed, 24 insertions(+) diff --git a/drivers/clk/sunxi/clk_a64.c b/drivers/clk/sun

[PATCH v2 13/19] video: sunxi: de2: read address from DT node

2021-03-06 Thread Jernej Skrabec
Currently DE2 uses hardcoded address based on SoC for which U-Boot is built. Read it from DT instead so there is no need to specify it when support for new SoC is added. Signed-off-by: Jernej Skrabec --- drivers/video/sunxi/sunxi_de2.c | 8 1 file changed, 4 insertions(+), 4 deletions(-

[PATCH v2 12/19] video: sunxi: de2: switch to DT probing

2021-03-06 Thread Jernej Skrabec
Currently DE2 driver is probed via driver info. Switch probing to device tree compatible string method. Display is now searched via driver name which has same limitation as previous method. This can be improved only when all drivers in chain are probed via device tree compatible strings. Signed-o

[PATCH v2 11/19] video: sunxi: dw-hdmi: read address from DT node

2021-03-06 Thread Jernej Skrabec
Currently HDMI controller MMIO address is hardcoded. Change that so address is read from DT node. That will make adding support for new variants a bit easier. Signed-off-by: Jernej Skrabec --- drivers/video/sunxi/sunxi_dw_hdmi.c | 38 ++--- 1 file changed, 24 insertions(+

[PATCH v2 10/19] video: sunxi: dw-hdmi: probe driver by compatible

2021-03-06 Thread Jernej Skrabec
Currently sunxi dw-hdmi driver is probed unconditionally, even if there is no such device. Switch driver to probing via compatible string. This brings many benefits - driver can read DT node and allows driver to be always enabled. Signed-off-by: Jernej Skrabec --- drivers/video/sunxi/sunxi_dw_h

[PATCH v2 09/19] video: sunxi: de2: switch to public uclass functions

2021-03-06 Thread Jernej Skrabec
Currently DE2 driver uses functions which are defined in internal headers. They are not meant to be used outside of uclass framework. Switch DE2 driver to public ones. This has additional benefit that device_probe doesn't need to be called manually. Signed-off-by: Jernej Skrabec --- drivers/vide

  1   2   >