[PATCH v5 0/1] kconfig: Add some new macros

2022-07-31 Thread Simon Glass
This series adds a few more macros to kconfig, along with a bit of refactoring of what is there. It also adds some basic tests for the kconfig macros. Finally, to make the tests work, it enhances buildman to support changing CONFIG options on the fly when building. Changes in v5: - Correct a

Re: [PATCH v2 5/5] test: add test for full FAT16 directory

2022-07-31 Thread AKASHI Takahiro
On Sun, Jul 31, 2022 at 01:58:37PM +0200, Heinrich Schuchardt wrote: > Add a unit test checking that a full FAT16 directory leads to an error > when trying to add an additional entry. Thank you for adding this test case, but why do you restrict this test to fat16 and the root directory? The root

[PATCH] configs: imx8mn_beacon_fspi: Add config for booting from QSPI

2022-07-31 Thread Adam Ford
The imx8mn-beacon SOM has a QSPI part on it connected to the FlexSPI controller. Add a defconfig option which supports booting from the QSPI NOR flash instead of sd/mmc. Signed-off-by: Adam Ford --- This won't fully function without this series:

[PATCH 8/8] Convert CONFIG_SYS_FSL_QMAN_V3 et al to Kconfig

2022-07-31 Thread Tom Rini
This converts the following to Kconfig: CONFIG_FSL_NGPIXIS CONFIG_SYS_FSL_QMAN_V3 CONFIG_SYS_FSL_RAID_ENGINE CONFIG_SYS_FSL_RMU CONFIG_SYS_FSL_SINGLE_SOURCE_CLK CONFIG_SYS_FSL_SRIO_LIODN CONFIG_SYS_FSL_TBCLK_DIV CONFIG_SYS_FSL_USB1_PHY_ENABLE

[PATCH 6/8] Convert CONFIG_SYS_FSL_NUM_CC_PLLS to Kconfig

2022-07-31 Thread Tom Rini
This converts the following to Kconfig: CONFIG_SYS_FSL_NUM_CC_PLLS Signed-off-by: Tom Rini --- arch/Kconfig.nxp | 6 ++ arch/arm/cpu/armv7/ls102xa/clock.c | 4 arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c | 4

[PATCH 7/8] Convert CONFIG_SYS_FSL_PCIE_COMPAT to Kconfig

2022-07-31 Thread Tom Rini
This converts the following to Kconfig: CONFIG_SYS_FSL_PCIE_COMPAT To do this, introduce a choice and option for each of the strings used and set CONFIG_SYS_FSL_PCIE_COMPAT based on that. Signed-off-by: Tom Rini --- README| 5 ---

[PATCH 5/8] Convert CONFIG_SYS_FSL_MAX_NUM_OF_SEC to Kconfig

2022-07-31 Thread Tom Rini
This converts the following to Kconfig: CONFIG_SYS_FSL_MAX_NUM_OF_SEC Signed-off-by: Tom Rini --- arch/arm/include/asm/arch-fsl-layerscape/config.h | 11 --- arch/arm/include/asm/arch-imx8/imx-regs.h | 1 - arch/arm/include/asm/arch-imx8m/imx-regs.h| 1 -

[PATCH 3/8] Remove CONFIG_SYS_FSL_SCFG_IODSECR1_ADDR et al

2022-07-31 Thread Tom Rini
This removes the following symbols: CONFIG_SYS_FSL_DSPI_BE CONFIG_SYS_FSL_DSP_CCSRBAR_DEFAULT CONFIG_SYS_FSL_DSP_CCSR_DDR_ADDR CONFIG_SYS_FSL_DSP_CCSR_DDR_OFFSET CONFIG_SYS_FSL_DSP_DDR_ADDR CONFIG_SYS_FSL_DSP_M2_RAM_ADDR CONFIG_SYS_FSL_DSP_M3_RAM_ADDR

[PATCH 4/8] Convert CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE to Kconfig

2022-07-31 Thread Tom Rini
This converts the following to Kconfig: CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE Signed-off-by: Tom Rini --- configs/pico-imx6_defconfig | 1 + configs/warp7_bl33_defconfig | 1 + configs/warp7_defconfig | 1 + configs/warp_defconfig | 1 + drivers/mmc/Kconfig | 4

[PATCH 1/8] Convert CONFIG_SYS_FSL_DDR_MAIN_NUM_CTRLS et al to Kconfig

2022-07-31 Thread Tom Rini
This converts the following to Kconfig: CONFIG_SYS_FSL_DDR_MAIN_NUM_CTRLS CONFIG_SYS_FSL_OTHER_DDR_NUM_CTRLS And we remove the entries from the README for a number of already converted items. Signed-off-by: Tom Rini --- README| 51

[PATCH 2/8] arc: Move SYS_LITTLE_ENDIAN / SYS_BIG_ENDIAN selection to Kconfig

2022-07-31 Thread Tom Rini
We can determine which of these we need given CPU_BIG_ENDIAN being enabled or not, so move that logic to Kconfig from config.mk. Cc: Alexey Brodkin Cc: Eugeniy Paltsev Signed-off-by: Tom Rini --- This is not a size neutral patch as apparently before we were not fully populating SYS_BIG_ENDIAN

Re: [PATCH v2 1/5] fs: fat: finding an empty FAT cluster

2022-07-31 Thread AKASHI Takahiro
On Sun, Jul 31, 2022 at 01:58:33PM +0200, Heinrich Schuchardt wrote: > Currently we have two functions with redundant coding to find an empty > cluster: > > * find_empty_cluster() seeks from the beginning of the FAT table > * determine_fatent() seeks after a given entry > > Both do not detect

[GIT PULL] please pull fsl-qoirq-2022-7-29

2022-07-31 Thread Peng Fan
Hi Tom, Please pull fsl-qoriq-2022-7-29 mpc85xx: support for generating QorIQ pre-PBL eSDHC boot sector p1_p2_rdb_pc: Remove I-flag from second L2 SRAM mapping p1_p2_rdb_pc: Fix parsing inverted bits from boot input data p1_p2_rdb_pc: Simplify SPL offset

[PATCH 7/7] arm: dts: imx8mn-venice: Consolidate with imx8mn-u-boot

2022-07-31 Thread Adam Ford
Now that a unified imx8mn-u-boot is available, remove duplicated code for generating flash.bin and other common imx8mn peripherals. Signed-off-by: Adam Ford diff --git a/arch/arm/dts/imx8mn-venice-u-boot.dtsi b/arch/arm/dts/imx8mn-venice-u-boot.dtsi index 9fb3871452..aea48f2d79 100644 ---

[PATCH 6/7] arm: dts: imx8mn-var-som-symphony: Consolidate with imx8mn-u-boot

2022-07-31 Thread Adam Ford
Now that a unified imx8mn-u-boot is available, remove duplicated code for generating flash.bin and other common imx8mn peripherals. Signed-off-by: Adam Ford diff --git a/arch/arm/dts/imx8mn-var-som-symphony-u-boot.dtsi b/arch/arm/dts/imx8mn-var-som-symphony-u-boot.dtsi index

[PATCH 5/7] arm: dts: imx8mn-evk: Consolidate with imx8mn-u-boot

2022-07-31 Thread Adam Ford
Now that a unified imx8mn-u-boot is available, remove duplicated code for generating flash.bin and other common imx8mn peripherals. Signed-off-by: Adam Ford diff --git a/arch/arm/dts/imx8mn-evk-u-boot.dtsi b/arch/arm/dts/imx8mn-evk-u-boot.dtsi index c4b83d3f7e..6c6c949f43 100644 ---

[PATCH 4/7] arm: dts: imx8mn-ddr4-evk: Consolidate with imx8mn-u-boot

2022-07-31 Thread Adam Ford
Now that a unified imx8mn-u-boot is available, remove duplicated code for generating flash.bin and other common imx8mn peripherals. Signed-off-by: Adam Ford diff --git a/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi b/arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi index 78773c198e..54f3ebe88b 100644 ---

[PATCH 3/7] arm: dts: imx8mn-bsh-smm-s2: Consolidate with imx8mn-u-boot

2022-07-31 Thread Adam Ford
Now that a unified imx8mn-u-boot is available, remove duplicated code for generating flash.bin and other common imx8mn peripherals. Signed-off-by: Adam Ford diff --git a/arch/arm/dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi b/arch/arm/dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi index

[PATCH 2/7] arm: dts: imx8mn-beacon-kit: Consolidate with imx8mn-u-boot

2022-07-31 Thread Adam Ford
Now that a unified imx8mn-u-boot is available, remove duplicated code for generating flash.bin and other common imx8mn peripherals. Signed-off-by: Adam Ford diff --git a/arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi b/arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi index 0efa6862eb..3180d57239 100644

[PATCH 1/7] arm: dts: imx8mn-u-boot: Create common imx8mn-u-boot.dtsi

2022-07-31 Thread Adam Ford
Multiple boards create duplicate entries in their respective -u-boot.dtsi files which all basically do the same thing. To consolidate these and make it easier to make improvements going forward, consolidate them all into one place. This file creates a flash.bin image using binman, and supports

[PATCH 0/7] arm: dts: Create common imx8mn-u-boot

2022-07-31 Thread Adam Ford
Every imx8mn board has a bunch of similar entries on their respective board-u-boot.dtsi file to make the board bootable. Instead of maintaining multiple files with duplicate code, have them all point to a new, common file. This file includes the necessary nodes that were common to nearly all

Re: [PATCH 1/1] fs/erofs: silence erofs_probe()

2022-07-31 Thread Gao Xiang
On Sun, Jul 31, 2022 at 10:53:52PM +0200, Heinrich Schuchardt wrote: > > > On 7/31/22 20:41, Simon Glass wrote: > > On Sun, 31 Jul 2022 at 03:10, Heinrich Schuchardt > > wrote: > > > > > > fs_set_blk_dev() probes all file-systems until it finds one that matches > > > the volume. We do not

[PATCH v3] common: Drop display_options.h from common header

2022-07-31 Thread Simon Glass
Move this out of the common header and include it only where needed. Signed-off-by: Simon Glass --- Changes in v3: - Rebase to master Changes in v2: - Rebase to master arch/arm/cpu/armv7/s5p-common/cpu_info.c | 1 + arch/arm/mach-at91/arm926ejs/eflash.c| 1 + arch/arm/mach-imx/hab.c

Re: [PATCH 1/1] fs/erofs: silence erofs_probe()

2022-07-31 Thread Heinrich Schuchardt
On 7/31/22 20:41, Simon Glass wrote: On Sun, 31 Jul 2022 at 03:10, Heinrich Schuchardt wrote: fs_set_blk_dev() probes all file-systems until it finds one that matches the volume. We do not expect any console output for non-matching file-systems. Convert error messages in

Re: [PATCH 1/1] Makefile: avoid false positive -Wmaybe-uninitialized

2022-07-31 Thread Simon Glass
On Sun, 31 Jul 2022 at 02:06, Heinrich Schuchardt wrote: > > When compiling with -Og gcc reports false positive -Wmaybe-uninitialized as > reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78394. > > Silence these warnings when building with CONFIG_CC_OPTIMIZE_FOR_DEBUG. > > Signed-off-by:

Re: [Bug] Buidling sandbox_vpl_defconfig is unstable

2022-07-31 Thread Simon Glass
Hi, On Sun, 31 Jul 2022 at 06:29, Tom Rini wrote: > > On Sun, Jul 31, 2022 at 02:08:13PM +0200, Heinrich Schuchardt wrote: > > On 7/31/22 13:47, Tom Rini wrote: > > > On Sun, Jul 31, 2022 at 12:51:51PM +0200, Heinrich Schuchardt wrote: > > > > Hello Simon, > > > > > > > > Something is wrong with

Re: [RFCv1] doc: develop: Describe using CONFIG vs CFG for values

2022-07-31 Thread Simon Glass
Hi Tom, On Sun, 31 Jul 2022 at 05:46, Tom Rini wrote: > > On Sat, Jul 30, 2022 at 07:27:31PM -0600, Simon Glass wrote: > > Hi Tom, > > > > On Thu, 28 Jul 2022 at 07:20, Tom Rini wrote: > > > > > > Document how and when to use CONFIG or CFG namespace for options. There > > > are times where

Re: [PATCH 1/1] fs/erofs: silence erofs_probe()

2022-07-31 Thread Simon Glass
On Sun, 31 Jul 2022 at 03:10, Heinrich Schuchardt wrote: > > fs_set_blk_dev() probes all file-systems until it finds one that matches > the volume. We do not expect any console output for non-matching > file-systems. > > Convert error messages in erofs_read_superblock() to debug output. > >

Re: [PATCH] arm: dts: imx8mn-beacon-kit-u-boot: Fix broken booting

2022-07-31 Thread Adam Ford
On Sun, Jul 31, 2022 at 12:36 PM Adam Ford wrote: > > On Sun, Jul 31, 2022 at 12:28 PM Michael Nazzareno Trimarchi > wrote: > > > > Hi Adam > > > > On Sun, Jul 31, 2022 at 7:16 PM Adam Ford wrote: > > > > > > When the imx8mm.dtsi file was pulled in from Linux, the UARTs > > > were moved into an

[PATCH] dm: rtc: Avoid a race in the rtc_reset test

2022-07-31 Thread Simon Glass
Since resetting the RTC on sandbox causes it to read the base time from the system, we cannot rely on this being unchanged since it was last read. Allow for a one-second delay. Fixes: https://source.denx.de/u-boot/u-boot/-/issues/4 Reported-by: Bin Meng Reported-by: Tom Rini Suggested-by:

Re: [PATCH] arm: dts: imx8mn-beacon-kit-u-boot: Fix broken booting

2022-07-31 Thread Adam Ford
On Sun, Jul 31, 2022 at 12:28 PM Michael Nazzareno Trimarchi wrote: > > Hi Adam > > On Sun, Jul 31, 2022 at 7:16 PM Adam Ford wrote: > > > > When the imx8mm.dtsi file was pulled in from Linux, the UARTs > > were moved into an spba sub-node which wasn't being included > > in the SPL device tree.

Re: [PATCH] arm: dts: imx8mn-beacon-kit-u-boot: Fix broken booting

2022-07-31 Thread Michael Nazzareno Trimarchi
Hi Adam On Sun, Jul 31, 2022 at 7:16 PM Adam Ford wrote: > > When the imx8mm.dtsi file was pulled in from Linux, the UARTs > were moved into an spba sub-node which wasn't being included > in the SPL device tree. This meant the references to the UART > weren't being handled properly and when

[PATCH] arm: dts: imx8mn-beacon-kit-u-boot: Fix broken booting

2022-07-31 Thread Adam Ford
When the imx8mm.dtsi file was pulled in from Linux, the UARTs were moved into an spba sub-node which wasn't being included in the SPL device tree. This meant the references to the UART weren't being handled properly and when booting the system would constantly reboot. Fix this by adding the spba

Re: [PATCH v1 21/26] imx8mn: synchronise device tree with linux

2022-07-31 Thread Adam Ford
On Thu, Jul 21, 2022 at 8:44 AM Marcel Ziswiler wrote: > > From: Marcel Ziswiler > > Synchronise device tree with linux v5.19-rc5. > > Signed-off-by: Marcel Ziswiler For what it's worth to others who may have been impacted, this patch broke my nano booting because the imx8mn.dtsi now has the

Re: [PATCH 1/1] fs/erofs: silence erofs_probe()

2022-07-31 Thread Huang Jianan
在 2022/7/31 17:10, Heinrich Schuchardt 写道: fs_set_blk_dev() probes all file-systems until it finds one that matches the volume. We do not expect any console output for non-matching file-systems. Convert error messages in erofs_read_superblock() to debug output. Fixes: 830613f8f5bb

Re: [PATCH] Revert "fdtdec: drop needlessly convoluted CONFIG_PHANDLE_CHECK_SEQ"

2022-07-31 Thread Tom Rini
On Sat, Jul 30, 2022 at 07:27:26PM -0600, Simon Glass wrote: > Hi Tom, > > On Tue, 5 Jul 2022 at 10:42, Simon Glass wrote: > > > > Hi Rasmus, > > > > On Tue, 5 Jul 2022 at 07:47, Rasmus Villemoes > > wrote: > > > > > > On 05/07/2022 11.47, Simon Glass wrote: > > > > Hi Tom, > > > > > > > > On

Re: [Bug] Buidling sandbox_vpl_defconfig is unstable

2022-07-31 Thread Tom Rini
On Sun, Jul 31, 2022 at 02:08:13PM +0200, Heinrich Schuchardt wrote: > On 7/31/22 13:47, Tom Rini wrote: > > On Sun, Jul 31, 2022 at 12:51:51PM +0200, Heinrich Schuchardt wrote: > > > Hello Simon, > > > > > > Something is wrong with building sandbox_vpl_defconfig on Gitlab: > > > > > > The

Re: [Bug] Buidling sandbox_vpl_defconfig is unstable

2022-07-31 Thread Heinrich Schuchardt
On 7/31/22 13:47, Tom Rini wrote: On Sun, Jul 31, 2022 at 12:51:51PM +0200, Heinrich Schuchardt wrote: Hello Simon, Something is wrong with building sandbox_vpl_defconfig on Gitlab: The following build job failed: https://source.denx.de/u-boot/custodians/u-boot-efi/-/jobs/475640 The

[PATCH v2 4/5] test: let fs_obj_mkdir() provide full file system type

2022-07-31 Thread Heinrich Schuchardt
The fixuture fs_obj_mkdir() up to now only supplies an abbreviated file system type (e.g. fat). Provide the full file system type too (e.g. fat32). Signed-off-by: Heinrich Schuchardt --- v2: new patch --- test/py/tests/test_fs/conftest.py | 6 ++-- test/py/tests/test_fs/test_mkdir.py

[PATCH v2 5/5] test: add test for full FAT16 directory

2022-07-31 Thread Heinrich Schuchardt
Add a unit test checking that a full FAT16 directory leads to an error when trying to add an additional entry. Signed-off-by: Heinrich Schuchardt --- v2: new patch --- test/py/tests/test_fs/test_mkdir.py | 17 + 1 file changed, 17 insertions(+) diff --git

[PATCH v2 3/5] fs: fat: carve out fat_create_dir_entry()

2022-07-31 Thread Heinrich Schuchardt
fat_mkdir() and file_fat_write_at() use identical code to create a new directory entry. Carve out a new function fat_create_dir_entry() to avoid this code duplication. Signed-off-by: Heinrich Schuchardt --- v2: handle errors returned by fat_create_dir_entry() --- fs/fat/fat_write.c | 93

[PATCH v2 2/5] fs: fat: determine_fatent() error handling

2022-07-31 Thread Heinrich Schuchardt
Handle disk full errors. Signed-off-by: Heinrich Schuchardt --- v2: no change --- fs/fat/fat_write.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index a137e14f41..57522f96a8 100644 --- a/fs/fat/fat_write.c +++

[PATCH v2 1/5] fs: fat: finding an empty FAT cluster

2022-07-31 Thread Heinrich Schuchardt
Currently we have two functions with redundant coding to find an empty cluster: * find_empty_cluster() seeks from the beginning of the FAT table * determine_fatent() seeks after a given entry Both do not detect the end of the FAT table correctly and return an invalid cluster number if no empty

[PATCH v2 0/5] fs/fat: fix handling of full disk

2022-07-31 Thread Heinrich Schuchardt
Currently we have two functions with redundant coding to find an empty cluster: * find_empty_cluster() seeks from the beginning of the FAT table * determine_fatent() seeks after a given entry Both do not detect the end of the FAT table correctly and return an invalid cluster number if no empty

Re: [Bug] Buidling sandbox_vpl_defconfig is unstable

2022-07-31 Thread Tom Rini
On Sun, Jul 31, 2022 at 12:51:51PM +0200, Heinrich Schuchardt wrote: > Hello Simon, > > Something is wrong with building sandbox_vpl_defconfig on Gitlab: > > The following build job failed: > https://source.denx.de/u-boot/custodians/u-boot-efi/-/jobs/475640 > > The following build job

Re: [RFCv1] doc: develop: Describe using CONFIG vs CFG for values

2022-07-31 Thread Tom Rini
On Sat, Jul 30, 2022 at 07:27:31PM -0600, Simon Glass wrote: > Hi Tom, > > On Thu, 28 Jul 2022 at 07:20, Tom Rini wrote: > > > > Document how and when to use CONFIG or CFG namespace for options. There > > are times where Kconfig is not a great fit for our needs, so we want to > > use the CFG

Re: [PATCH] nvme: Do a clean NVMe shutdown

2022-07-31 Thread Mark Kettenis
> From: Hector Martin > Date: Sun, 31 Jul 2022 15:31:31 +0900 > > The brute-force controller disable method can end up racing controller > initilization and causing a crash when we shut down Apple ANS2 NVMe > controllers. Do a proper controlled shutdown, which does block until > things are

[Bug] Buidling sandbox_vpl_defconfig is unstable

2022-07-31 Thread Heinrich Schuchardt
Hello Simon, Something is wrong with building sandbox_vpl_defconfig on Gitlab: The following build job failed: https://source.denx.de/u-boot/custodians/u-boot-efi/-/jobs/475640 The following build job succeeded: https://source.denx.de/u-boot/custodians/u-boot-efi/-/jobs/475673 Best regards

[PATCH] nvme: Do a clean NVMe shutdown

2022-07-31 Thread Hector Martin
The brute-force controller disable method can end up racing controller initilization and causing a crash when we shut down Apple ANS2 NVMe controllers. Do a proper controlled shutdown, which does block until things are quiesced properly. This is nicer in general for all controllers.

[PATCH 1/1] sunxi: support half DQ width memory on R40

2022-07-31 Thread Evgeny Boger
Half DQ width memory configuration is detected in the same way as rank: by trying to access memory in full-width configuration and checking for timeout error code. The code is modeled after time_out_detect() routine from a leaked vendor lib-dram u-boot source code. It's very fragile and accessing

[PATCH 0/1] sunxi: support half DQ width memory on R40

2022-07-31 Thread Evgeny Boger
On Allwinner boards memory configuration is detected by bootloader. However, R40 (A40i/T3) is somewhat unique because the detection by the DRAM controller via PIR_QSGATE is broken (either in U-Boot or in the controller). So the memory configuration must be detected by other means. Dual rank

[PATCH v2] spl: fit: Report fdt error for loading u-boot

2022-07-31 Thread Su, Bao Cheng
Commit 71551055cbdb ("spl: fit: Load devicetree when a Linux payload is found") made a change to not report the spl_fit_append_fdt error at all if next-stage image is u-boot. However for u-boot image without CONFIG_OF_EMBED, the error should be reported to uplevel caller. Otherwise, uplevel

[PATCH] spl: fit: Report fdt error for loading u-boot

2022-07-31 Thread Su, Bao Cheng
Commit 71551055cbdb ("spl: fit: Load devicetree when a Linux payload is found") made a change to not report the spl_fit_append_fdt error at all if next-stage image is u-boot. However for u-boot image without CONFIG_OF_EMBED, the error should be reported to uplevel caller. Otherwise, uplevel

[PATCH 1/1] fs/erofs: silence erofs_probe()

2022-07-31 Thread Heinrich Schuchardt
fs_set_blk_dev() probes all file-systems until it finds one that matches the volume. We do not expect any console output for non-matching file-systems. Convert error messages in erofs_read_superblock() to debug output. Fixes: 830613f8f5bb ("fs/erofs: add erofs filesystem support") Signed-off-by:

[PATCH 1/1] Makefile: avoid false positive -Wmaybe-uninitialized

2022-07-31 Thread Heinrich Schuchardt
When compiling with -Og gcc reports false positive -Wmaybe-uninitialized as reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78394. Silence these warnings when building with CONFIG_CC_OPTIMIZE_FOR_DEBUG. Signed-off-by: Heinrich Schuchardt --- Makefile | 8 +++- 1 file changed, 7