Re: [PATCH V5 04/12] iot2050: Add watchdog start to bootcmd

2023-02-03 Thread Jan Kiszka
On 03.02.23 19:51, Tom Rini wrote: > On Fri, Feb 03, 2023 at 01:26:33PM +0100, Jan Kiszka wrote: > >> From: Jan Kiszka >> >> Allows run-time control over watchdog auto-start and the timeout via >> setting the environment variable watchdog_timeout_ms. A value of zero >> means "do not start". Use

Re: [PATCH V5 07/12] tools: Add script for converting public key into device tree include

2023-02-03 Thread Jan Kiszka
On 04.02.23 01:20, Simon Glass wrote: > Hi Jan, > > On Fri, 3 Feb 2023 at 05:29, Jan Kiszka wrote: >> >> From: Jan Kiszka >> >> Allows to create a public key device tree dtsi for inclusion into U-Boot >> SPL and proper during first build already. This can be achieved via >>

Re: [PATCH V5 05/12] iot2050: Add CONFIG_ENV_FLAGS_LIST_STATIC

2023-02-03 Thread Jan Kiszka
On 03.02.23 19:52, Tom Rini wrote: > On Fri, Feb 03, 2023 at 01:26:34PM +0100, Jan Kiszka wrote: >> From: Jan Kiszka >> >> Will be needed when CONFIG_ENV_WRITEABLE_LIST is enabled. The listed >> variables shall remain writable, for informational purposes - they have >> to be considered untrusted

Re: [PATCH V5 08/12] iot2050: Add script for signing artifacts

2023-02-03 Thread Jan Kiszka
On 03.02.23 19:51, Tom Rini wrote: > On Fri, Feb 03, 2023 at 01:26:37PM +0100, Jan Kiszka wrote: > >> From: Jan Kiszka >> >> There are many ways to get a signed firmware for the IOT2050 devices, >> namely for the parts under user-control. This script documents one way >> of doing it, given a

U-Boot 'BIOS' UI

2023-02-03 Thread Simon Glass
Hi Heinrich, Do you have any ideas on the best way to implement a 'BIOS-style' UI in U-Boot/ The expo stuff is a start, but as you said it doesn't have the necessary widgets. Regards, Simon

Re: U-Boot tools and binman build fails in macOS 13

2023-02-03 Thread Simon Glass
Hi Alif, On Fri, 3 Feb 2023 at 19:29, Alif Ilhan wrote: > > I do have the python library. It is libpython3.11.dylib in my case and is > located under /Library/Framework/Python.Framework/Versions/3.11/lib/. I even > tried manually adding them to KBUILD_HOSTLDFLAGS, adding the directory as >

Re: [PATCH v2 08/14] net: dwc_eth_qos: Add Qcom ethernet driver glue layer

2023-02-03 Thread Ramon Fried
On Wed, Feb 1, 2023 at 3:59 PM Sumit Garg wrote: > > The Qualcom ETHQOS hardware supports an RGMII macro which needs to be > configured according to following link speeds: > - SPEED_1000 > - SPEED_100 > - SPEED_10 > > So add a corresponding glue driver to configure RGMII macro. > > Signed-off-by:

Re: [PATCH v2 07/14] net: dwc_eth_qos: Allow platform to override tx/rx_fifo_sz

2023-02-03 Thread Ramon Fried
On Wed, Feb 1, 2023 at 3:59 PM Sumit Garg wrote: > > The GMAC controller on QCS404 SoC (support added by upcoming patch) fails > to work with maximum tx/rx_fifo_sz supported by the hardware (16K). So > allow platforms to override FIFO size using corresponding DT node > properties. > >

Re: [PATCH v2 06/14] net: dwc_eth_qos: Make eqos_get_tick_clk_rate callback optional

2023-02-03 Thread Ramon Fried
On Wed, Feb 1, 2023 at 3:59 PM Sumit Garg wrote: > > Signed-off-by: Sumit Garg > --- > drivers/net/dwc_eth_qos.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c > index afc47b56ff..753a912607 100644 > ---

Re: [PATCH v2 0/5] net: sun8i-emac: Allwinner D1 Support

2023-02-03 Thread Ramon Fried
On Wed, Feb 1, 2023 at 2:28 AM Andre Przywara wrote: > > On Sun, 22 Jan 2023 16:51:01 -0600 > Samuel Holland wrote: > > Hi Joe, Ramon, > > > D1 is a RISC-V SoC containing an EMAC compatible with the A64 EMAC. In a > > very roundabout way, this series finishes adding support for the D1 EMAC: > >

[RFC PATCH v2 12/56] lib: Add VPL options for SHA1 and SHA256

2023-02-03 Thread Simon Glass
Add these options so these algorithms can be used in VPL. Signed-off-by: Simon Glass --- (no changes since v1) lib/Kconfig | 20 1 file changed, 20 insertions(+) diff --git a/lib/Kconfig b/lib/Kconfig index 47edd0719aa..6de50f31bc0 100644 --- a/lib/Kconfig +++

Re: [PATCH 3/9] net: dwc_eth_qos: Drop unused dm_gpio_free() on STM32

2023-02-03 Thread Ramon Fried
On Thu, Jan 19, 2023 at 11:45 PM Marek Vasut wrote: > > The dm_gpio_free() is never called, because for stm32, the phy_reset_gpio > pointer is never valid. This is because only tegra186 ever claims the > phy_reset_gpio, all other platforms use the PHY framework to reset the > PHY instead. Drop

Re: [PATCH 6/9] net: dwc_eth_qos: Add i.MX8M Plus RMII support

2023-02-03 Thread Ramon Fried
On Thu, Jan 19, 2023 at 11:45 PM Marek Vasut wrote: > > With DM clock support in place, it is easy to add RMII support into the > MAC driver. The RMII cannot operate at 1000 Mbps and at 100 and 10 Mbps > the clock frequency is 50 MHz and 5 MHz instead of 25 MHz and 2.5 MHz. > > The board DT

[RFC PATCH v2 23/56] test: Tidy up sandbox handling in test-main

2023-02-03 Thread Simon Glass
This is pretty messy at present since it relies on a SPL_SANDBOX option that does not exist. Use the normal options instead, so that it will work with split config. Signed-off-by: Simon Glass --- (no changes since v1) test/test-main.c | 10 +- 1 file changed, 5 insertions(+), 5

Re: [PATCH 4/9] net: dwc_eth_qos: Set DMA_MODE SWR bit to reset the MAC

2023-02-03 Thread Ramon Fried
On Thu, Jan 19, 2023 at 11:45 PM Marek Vasut wrote: > > The driver currently only waits for DMA_MODE SWR bit to clear itself. > This is insufficient e.g. on i.MX8M Plus, where the MAC must be reset > before IOMUX GPR[1] content is latched into the MAC and used. Without > the proper reset, the

[RFC PATCH v2 54/56] kconfig: Move closer to the Linux version

2023-02-03 Thread Simon Glass
This header file originally came from Linux and it has changed a little upstream since. Bring in some of these changes. Note that IS_ENABLED() in U-Boot supports a three-parameter version, so it not equivalent to the Linux version. Signed-off-by: Simon Glass --- (no changes since v1)

[RFC PATCH v2 56/56] Makefile: Drop SPL_ and SPL_TPL_ macros

2023-02-03 Thread Simon Glass
These are not needed anymore with split configs. Drop them. This also drops an incorrect $(SPL_TPL) in arch/powerpc/lib/Makefile Signed-off-by: Simon Glass --- Changes in v2: - Reworked based on earlier patches Makefile | 6 +- arch/arm/config.mk

[RFC PATCH v2 10/56] boot: Add a Kconfig for SPL_AVB_VERIFY

2023-02-03 Thread Simon Glass
This is implicitly used in the source and seems useful, so add it. Signed-off-by: Simon Glass --- (no changes since v1) common/Kconfig | 4 1 file changed, 4 insertions(+) diff --git a/common/Kconfig b/common/Kconfig index 44aa7d8b1cd..c5f2a528943 100644 --- a/common/Kconfig +++

[RFC PATCH v2 34/56] rockchip: Avoid checking environment without ENV_SUPPORT

2023-02-03 Thread Simon Glass
With split config, this causes a build error in SPL where the environment may not be enabled. It affects two rk3399 boards. Add a condition. Signed-off-by: Simon Glass --- (no changes since v1) board/theobroma-systems/puma_rk3399/puma-rk3399.c | 2 +-

[RFC PATCH v2 55/56] checkpatch: Remove unwanted CONFIG_IS_ENABLED rules

2023-02-03 Thread Simon Glass
These are not relevant anymore so drop them. Signed-off-by: Simon Glass Suggested-by: Tom Rini --- (no changes since v1) scripts/checkpatch.pl | 16 tools/patman/test_checkpatch.py | 6 -- 2 files changed, 22 deletions(-) diff --git a/scripts/checkpatch.pl

[RFC PATCH v2 46/56] Makefile: Include the config for the phase being built

2023-02-03 Thread Simon Glass
At present there is only a single auto.conf file used within the makefiles. Update them to use the correct one for each phase. Also update kconfig.h to include the correct autoconf.h or autoconf_spl.h file for each phase. This allows the macros to be simplified. With this, CONFIG_IS_ENABLED() is

[RFC PATCH v2 35/56] freescale: Drop old pre-DM_ETH code

2023-02-03 Thread Simon Glass
This is used by ls1021atwr_sdcard_ifc_SECURE_BOOT with split config, but is not needed anymore, since Ethernet migration is complete. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/cpu/armv7/ls102xa/fdt.c | 12 1 file changed, 12 deletions(-) diff --git

[RFC PATCH v2 38/56] freescale: Fix odd use of ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE

2023-02-03 Thread Simon Glass
This is not a CONFIG option so we should not be using IS_ENABLED() on it, particularly not when it is not defined to anything, so shows up as calling IS_ENABLED() with no arguments. Just check it normally. This fixes a build error with split config on T2080QDS. Signed-off-by: Simon Glass ---

[RFC PATCH v2 41/56] x86: Fix monitor base for split config

2023-02-03 Thread Simon Glass
This currently makes SPL refer to its own address. Use the PPL symbol to avoid this. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/intel_common/car2.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/cpu/intel_common/car2.S

[RFC PATCH v2 52/56] kconfig: drop config_opt_enabled()

2023-02-03 Thread Simon Glass
This is include used in three places. It does not appear in Linux. Use IS_ENABLED() instead since it provides a similar feature, albeit needing brackets. Signed-off-by: Simon Glass --- (no changes since v1) drivers/fastboot/fb_command.c | 12 ++-- drivers/fastboot/fb_common.c | 4

[RFC PATCH v2 50/56] kconfig: Drop CONFIG_IF_ENABLED_INT()

2023-02-03 Thread Simon Glass
We can use IF_ENABLED_INT() instead, so drop the other macro. Also clean up a few things left behind and fix the comment. Signed-off-by: Simon Glass --- (no changes since v1) include/linux/kconfig.h | 32 ++-- test/lib/kconfig.c| 15

[RFC PATCH v2 53/56] kconfig: Drop CONFIG_VAL()

2023-02-03 Thread Simon Glass
This serves no purpose now since we can write CONFIG_FOO instead of CONFIG_VAL(FOO) Drop it. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/lib/bdinfo.c | 4 +- arch/arm/mach-at91/arm926ejs/eflash.c | 4 +- arch/arm/mach-k3/am654_init.c

[RFC PATCH v2 51/56] kconfig: Drop CONFIG_IS_ENABLED()

2023-02-03 Thread Simon Glass
We can use IS_ENABLED() now, so drop the CONFIG_IS_ENABLED() macro. Signed-off-by: Simon Glass --- (no changes since v1) include/linux/kconfig.h | 23 --- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index

[RFC PATCH v2 47/56] Makefile: Use empty SPL_ and SPL_TPL_ vars

2023-02-03 Thread Simon Glass
Now that we include an auto.conf file specific to the phase being built we can make these variables empty. With this done, we can also remove them from U-Boot entirely, dropping them from all Makefiles. That is left for a future clean-up since we cannot apply this series until CONFIG migration is

Re: [PATCH] net: ravb: Drop SoC-specific compatible support

2023-02-03 Thread Ramon Fried
On Thu, Jan 26, 2023 at 10:17 PM Marek Vasut wrote: > > The current set of U-Boot upstream R-Car Gen3 DTs all contain generic > "renesas,etheravb-rcar-gen3" compatible strings, drop the SoC specific > compatible string support from U-Boot to reduce size and duplication. > > Signed-off-by: Marek

Re: [PATCH v2 5/5] net: sun8i-emac: Remove the SoC variant ID

2023-02-03 Thread Ramon Fried
On Mon, Jan 23, 2023 at 7:24 PM Andre Przywara wrote: > > On 22/01/2023 22:51, Samuel Holland wrote: > > Hi, > > > Now that all differences in functionality are covered by individual > > flags, remove the enumeration of SoC variants. > > My favourite patch of this series ;-) > > > Signed-off-by:

Re: [PATCH v2 4/5] net: sun8i-emac: Use common syscon setup for R40

2023-02-03 Thread Ramon Fried
On Mon, Jan 23, 2023 at 7:24 PM Andre Przywara wrote: > > On 22/01/2023 22:51, Samuel Holland wrote: > > While R40 puts the EMAC syscon register at a different address from > > other variants, the relevant portion of the register's layout is the > > same. Factor out the register offset so the

Re: [PATCH v2 3/5] net: sun8i-emac: Add a flag for the internal PHY switch

2023-02-03 Thread Ramon Fried
On Mon, Jan 23, 2023 at 7:24 PM Andre Przywara wrote: > > On 22/01/2023 22:51, Samuel Holland wrote: > > Describe this feature instead of using the SoC ID. > > > > Signed-off-by: Samuel Holland > > Reviewed-by: Andre Przywara > > Cheers, > Andre > > > --- > > > > Changes in v2: > > - New

Re: [PATCH v2 2/5] net: sun8i-emac: Add a flag for RMII support

2023-02-03 Thread Ramon Fried
On Mon, Jan 23, 2023 at 7:23 PM Andre Przywara wrote: > > On 22/01/2023 22:51, Samuel Holland wrote: > > Describe this feature instead of using the SoC ID. > > Looks alright, also compared against the kernel driver. > > > Signed-off-by: Samuel Holland > > Reviewed-by: Andre Przywara > > Cheers,

Re: [PATCH v2 1/5] net: sun8i-emac: Add a structure for variant data

2023-02-03 Thread Ramon Fried
On Mon, Jan 23, 2023 at 7:21 PM Andre Przywara wrote: > > On 22/01/2023 22:51, Samuel Holland wrote: > > Currently, EMAC variants are distinguished by their identity, but this > > gets unwieldy as more overlapping variants are added. Add a structure so > > we can describe the individual feature

Re: [PATCH 08/14] net: dwc_eth_qos: Add Qcom ethernet driver glue layer

2023-02-03 Thread Ramon Fried
On Fri, Jan 20, 2023 at 9:18 AM Sumit Garg wrote: > > The Qualcom ETHQOS hardware supports an RGMII macro which needs to be > configured according to following link speeds: > - SPEED_1000 > - SPEED_100 > - SPEED_10 > > So add a corresponding glue driver to configure RGMII macro. > >

Re: [PATCH 07/14] net: dwc_eth_qos: Allow platform to override tx/rx_fifo_sz

2023-02-03 Thread Ramon Fried
On Fri, Jan 20, 2023 at 9:18 AM Sumit Garg wrote: > > The GMAC controller on QCS404 SoC (support added by upcoming patch) fails > to work with maximum tx/rx_fifo_sz supported by the hardware (16K). So > allow platforms to override FIFO size using corresponding DT node > properties. > >

Re: [PATCH 06/14] net: dwc_eth_qos: Make eqos_get_tick_clk_rate callback optional

2023-02-03 Thread Ramon Fried
On Fri, Jan 20, 2023 at 9:18 AM Sumit Garg wrote: > > Signed-off-by: Sumit Garg > --- > drivers/net/dwc_eth_qos.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c > index afc47b56ff..753a912607 100644 > ---

Re: [PATCH 7/9] net: dwc_eth_qos: Add board_interface_eth_init() for i.MX8M Plus

2023-02-03 Thread Ramon Fried
On Thu, Jan 19, 2023 at 11:45 PM Marek Vasut wrote: > > Implement common board_interface_eth_init() and call it from the DWMAC > driver to configure IOMUXC GPR[1] register according to the PHY mode > obtained from DT. This supports all three interface modes supported by > the i.MX8M Plus DWMAC

Re: [PATCH 2/9] net: dwc_eth_qos: Drop bogus return after goto

2023-02-03 Thread Ramon Fried
On Thu, Jan 19, 2023 at 11:45 PM Marek Vasut wrote: > > The return is never triggered due to the goto just above it. > Drop it. No functional change. > > Signed-off-by: Marek Vasut > --- > Cc: "Ariel D'Alessandro" > Cc: "NXP i.MX U-Boot Team" > Cc: Andrey Zhizhikin > Cc: Fabio Estevam > Cc:

Re: [PATCH 3/3] net: ftmac100: add mii read and write callbacks

2023-02-03 Thread Ramon Fried
On Thu, Jan 19, 2023 at 9:55 PM Sergei Antonov wrote: > > On Tue, 10 Jan 2023 at 20:13, Ramon Fried wrote: > > > Reviewed-by: Ramon Fried > > Hello, Ramon! I have just submitted a v2 of this patch. The only > substantial difference there is a Kconfig addition. If you are fine > with it, could

Re: [PATCH v2 3/3] net: ftmac100: add mii read and write callbacks

2023-02-03 Thread Ramon Fried
On Thu, Jan 19, 2023 at 9:51 PM Sergei Antonov wrote: > > Register mii_bus with read and write callbacks to allow the 'mii' > command to work. Use a timeout of 10 ms to wait for the R/W > operations to complete. > > Signed-off-by: Sergei Antonov > --- > > v1 -> v2: > * fix a typo in the

[RFC PATCH v2 37/56] net: Add an SPL config for atheros

2023-02-03 Thread Simon Glass
Add a new SPL_PHY_ATHEROS to avoid a build error on am335x_evm with split config. Signed-off-by: Simon Glass --- (no changes since v1) drivers/net/phy/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index

[RFC PATCH v2 44/56] power: wanderboard: Correct conditions for split config

2023-02-03 Thread Simon Glass
This currently causes a build error with wanderboard. Fix it by adding a missing CONFIG and correcting the build condition so that it does not change when building SPL. Signed-off-by: Simon Glass --- (no changes since v1) configs/wandboard_defconfig | 1 + include/power/pmic.h| 3 +--

[RFC PATCH v2 49/56] kconfig: Adjust the meaning of CONFIG_IS_ENABLED()

2023-02-03 Thread Simon Glass
Adjust this to require the CONFIG option be provided, so that instead of: CONFIG_IS_ENABLED(FOO) you must write: CONFIG_IS_ENABLED(CONFIG_FOO) This is in preparation for dropping this and just using it is as the new implementation of IS_ENABLED(). For now, update IS_ENABLED() to use

[RFC PATCH v2 45/56] venice: Simplify conditions for network init

2023-02-03 Thread Simon Glass
The conditions in this code do not align when doing an SPL build with split config. Use __maybe_unused to avoid needing to be so explicit. Of course a better solution would be to refactor all of this to avoid using #ifdef. Signed-off-by: Simon Glass --- (no changes since v1)

[RFC PATCH v2 39/56] serial: Support ns16550 driver in TPL

2023-02-03 Thread Simon Glass
Add options for this since they are needed by P1020RDB-PC_NAND. Signed-off-by: Simon Glass --- (no changes since v1) drivers/serial/Kconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index bb5083201b3..6f40c051604 100644 ---

[RFC PATCH v2 40/56] pci: Use the correct symbol to enable struct members

2023-02-03 Thread Simon Glass
This ends up being quite complicated since we have various pieces of code assuming that it can access the members and the conditions may not line up with SPL_PCI and serial SPL_ configs. Fix it by using a PPL condition, so that the condition does not change when split config is enabled.

[RFC PATCH v2 43/56] x86: coral: Avoid build errors with missing SPL symbols

2023-02-03 Thread Simon Glass
With split config this does not build due to the missing symbols. Add them and fix the PCI condition. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/Makefile | 2 +- configs/chromebook_coral_defconfig | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)

[RFC PATCH v2 42/56] dm: Add a TPL symbol for simple-bus

2023-02-03 Thread Simon Glass
This is used in some x86 code, so add a symbol for it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/core/Kconfig | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig index f1ef5cd35f3..ae4f184b93f 100644 ---

[RFC PATCH v2 32/56] imx: watchdog: Correct watchdog error condition

2023-02-03 Thread Simon Glass
This is intended to make sure that one of the conditions is met, but causes a build error with imx6qdl_icore_mmc. Fix it by using the PPL condition instead, so that nothing changes when building for SPL with split config. In fact we should drop the old watchdog code and just use the new watchdog

[RFC PATCH v2 33/56] socfpga: Use the correct condition for SYS_L2_PL310

2023-02-03 Thread Simon Glass
Update this to use the PPL condition instead, so that nothing changes when building for SPL with split config. Signed-off-by: Simon Glass --- (no changes since v1) arch/arm/mach-socfpga/misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-socfpga/misc.c

[RFC PATCH v2 36/56] imx: Use SATA instead of CMD_SATA

2023-02-03 Thread Simon Glass
This causes a build failure on mx6cuboxi with split config, since CMD_SATA shows up as enabled in SPl (because there is no SPL_CMD_SATA). The condition is wrong anyway, so change it to use SATA instead. Signed-off-by: Simon Glass --- (no changes since v1) board/solidrun/mx6cuboxi/mx6cuboxi.c

[RFC PATCH v2 29/56] Add VPL options for BLOBLIST

2023-02-03 Thread Simon Glass
We can use this feature in VPL, so add some options for it. Also fix a typo in the SPL help while we are here. Signed-off-by: Simon Glass --- (no changes since v1) common/Kconfig | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/common/Kconfig

[RFC PATCH v2 27/56] Rename CONFIG_TEXT_BASE

2023-02-03 Thread Simon Glass
This means the text base for U-Boot proper. With split config it will mean something different in SPL (CONFIG_SPL_TEXT_BASE), so use the PPL prefix to avoid any problems. Signed-off-by: Simon Glass --- (no changes since v1) Makefile | 26

[RFC PATCH v2 26/56] kconfig: Support writing separate SPL files

2023-02-03 Thread Simon Glass
At present kconfig writes out several files, including: auto.conf - CONFIG settings used by make autoconf.h - header file used by C code This works well but is a bit ugly in places, for example requiring the use of a SPL_TPL_ macro in Makefiles to distinguish between options intended for

[RFC PATCH v2 13/56] x86: Use string functions for all 32-bit builds

2023-02-03 Thread Simon Glass
At present these are not included in SPL. They do add to code size but are a bit faster, so adjust the setting to add them. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/include/asm/string.h | 2 +- arch/x86/lib/Makefile | 2 +- 2 files changed, 2 insertions(+), 2

[RFC PATCH v2 31/56] freescale: pm9g45: Fix problems with ls1021aqds_nand et al

2023-02-03 Thread Simon Glass
These boards need to access the 'proper' symbol for NAND_BOOT, to avoid build errors in SPL. Fix this up. Also fix pm9g45 which has the same problem. Drop the unnecessary condition in fdt_support.h to avoid needing to do something clever there too. Signed-off-by: Simon Glass --- (no changes

[RFC PATCH v2 22/56] lib: Add an SPL config for LIB_UUID

2023-02-03 Thread Simon Glass
This is selected by PARTITION_UUIDS which has a separate option for SPL. Add an SPL option for LIB_UUID also, so that we can keep them consistent. Also add one for PARTITION_TYPE_GUID to avoid a build error in part_efi.c which wants to call a uuid function in SPL. Signed-off-by: Simon Glass ---

[RFC PATCH v2 24/56] kconfig: Add a configuration file for nospl

2023-02-03 Thread Simon Glass
This file indicates which options are not for use in U-Boot SPL. It allows the kconfig tool to correctly generate its output. It was generated with ./tools/move_config.py --scan-source -u Note that this only produces sensible results when used with the current source code, as of this patch.

[RFC PATCH v2 28/56] x86: Fix up some Kconfig options

2023-02-03 Thread Simon Glass
There are a few inconsistencies in various options on x86. Fix these up so that conversion to a split config is possible: - use Proper config in irq, timer and environment - drop the invalid SPL_ in a CONFIG_IS_ENABLED() usage - use the correct X86_64 option in msr.h Signed-off-by: Simon Glass

[RFC PATCH v2 30/56] omap: Correct an SPL build error with watchdog

2023-02-03 Thread Simon Glass
The logic here is strange since the call to hw_watchdog_init() depends on CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG but the code it calls is only enabled if !CONFIG_IS_ENABLED(WDT). This seems to work, but with split config we get a build error in SPL with CONFIG_WATCHDOG, since it is interpreted as

[RFC PATCH v2 25/56] kconfig: Refactor code into separate writer functions

2023-02-03 Thread Simon Glass
Separate out the code that writes the Makefile and headers so we can reuse these functions when writing out SPL files. This makes no functional change. Signed-off-by: Simon Glass --- (no changes since v1) scripts/kconfig/confdata.c | 65 ++

[RFC PATCH v2 20/56] fixdep: Add some tests for parse_config_line()

2023-02-03 Thread Simon Glass
Add tests for this code to cover the basic cases. Signed-off-by: Simon Glass --- (no changes since v1) scripts/basic/fixdep.c | 73 ++ 1 file changed, 73 insertions(+) diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index

[RFC PATCH v2 15/56] sandbox: Tidy up RTC options

2023-02-03 Thread Simon Glass
At present we enable the sandbox RTC driver for all builds. Add a separate Kconfig option to control this, so that it can be disabled in TPL, where it is not needed. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/dts/sandbox.dts | 2 +- arch/sandbox/dts/sandbox.dtsi |

[RFC PATCH v2 11/56] env: Allow VPL environment to be nowhere

2023-02-03 Thread Simon Glass
Add an option to put the VPL environment nowhere (not in storage). Signed-off-by: Simon Glass --- (no changes since v1) env/Kconfig | 10 ++ 1 file changed, 10 insertions(+) diff --git a/env/Kconfig b/env/Kconfig index 9222330a676..927f9a38fa2 100644 --- a/env/Kconfig +++

[RFC PATCH v2 21/56] test: Add SPL versions of the TEST_KCONFIG options

2023-02-03 Thread Simon Glass
These are needed since we need a separate value in SPL and Proper. Signed-off-by: Simon Glass --- (no changes since v1) test/lib/Kconfig | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/test/lib/Kconfig b/test/lib/Kconfig index dbb03e4a36f..134cbb85b83

[RFC PATCH v2 19/56] fixdep: Refactor to make testing easier

2023-02-03 Thread Simon Glass
Move the config parsing into a separate function so that it is possible to write tests for the function. Signed-off-by: Simon Glass --- (no changes since v1) scripts/basic/fixdep.c | 87 ++ 1 file changed, 54 insertions(+), 33 deletions(-) diff --git

[RFC PATCH v2 16/56] sandbox: Use the generic VPL option to enable VPL

2023-02-03 Thread Simon Glass
Avoid using CONFIG_SANDBOX_VPL since we have a generic option which works just as well. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/dts/sandbox.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sandbox/dts/sandbox.dts

[RFC PATCH v2 17/56] sandbox: Tidy up I2C options

2023-02-03 Thread Simon Glass
At present we enable the sandbox I2C driver for all builds. Add a separate Kconfig option to control this, so that it can be disabled in TPL, where it is not needed. Signed-off-by: Simon Glass --- (no changes since v1) drivers/i2c/Kconfig | 20 1 file changed, 20

[RFC PATCH v2 09/56] env: Avoid checking ENV_IS_IN when env disabled

2023-02-03 Thread Simon Glass
This check is not needed when the environment is not enabled, e.g. in SPL. Add a condition to handle this. Signed-off-by: Simon Glass --- (no changes since v1) cmd/nvedit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 7cbc3fd573a..277293679df 100644

[RFC PATCH v2 18/56] fixdep: Add support for VPL

2023-02-03 Thread Simon Glass
Add VPL files into the mix so that we can fix up the dependencies there. Signed-off-by: Simon Glass --- (no changes since v1) scripts/basic/fixdep.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 5ced0f6b069..3d40bd7ee25 100644 ---

[RFC PATCH v2 14/56] lib: Fix build condition for tiny-printf

2023-02-03 Thread Simon Glass
This should be checking for any SPL build. Drop the use of SPL_TPL_ since it is not necessary and will not work with split config. Signed-off-by: Simon Glass --- (no changes since v1) lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Makefile b/lib/Makefile

[RFC PATCH v2 08/56] boot: Add a Kconfig for SPL_UT_COMPRESSION

2023-02-03 Thread Simon Glass
This is implicitly used in the source and seems useful, so add it. Signed-off-by: Simon Glass --- (no changes since v1) test/Kconfig | 5 + 1 file changed, 5 insertions(+) diff --git a/test/Kconfig b/test/Kconfig index 465028265b2..944d4eb1560 100644 --- a/test/Kconfig +++ b/test/Kconfig

[RFC PATCH v2 07/56] cros_ec: Add SPL Kconfigs for cros_ec features

2023-02-03 Thread Simon Glass
At present we rely on this not existing to avoid building various EC features. But with the new split configs this does not work. Add separates Kconfigs instead. Signed-off-by: Simon Glass --- (no changes since v1) drivers/i2c/Kconfig | 10 ++ 1 file changed, 10 insertions(+) diff

[RFC PATCH v2 06/56] boot: Add a Kconfig for SPL_QCOM_PMIC_GPIO

2023-02-03 Thread Simon Glass
This is implicitly used in the source and seems useful, so add it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/gpio/Kconfig | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 365615a53f7..8a4787f4195 100644 ---

[RFC PATCH v2 04/56] bootstd: Add Kconfig options for SPL

2023-02-03 Thread Simon Glass
Create new SPL options so that standard boot can be excluded for SPL. Signed-off-by: Simon Glass --- (no changes since v1) boot/Kconfig | 24 1 file changed, 24 insertions(+) diff --git a/boot/Kconfig b/boot/Kconfig index dcfbe6ae9e0..81a3dba399a 100644 ---

[RFC PATCH v2 05/56] cmd: Add an SPL Kconfig for CMDLINE and HUSH

2023-02-03 Thread Simon Glass
At present we rely on this not existing to avoid building various command-line features. But with the new split configs this does not work. Add separates Kconfigs instead. Signed-off-by: Simon Glass --- (no changes since v1) cmd/Kconfig | 10 ++ 1 file changed, 10 insertions(+) diff

[RFC PATCH v2 03/56] event: Add Kconfig options for SPL

2023-02-03 Thread Simon Glass
Add options to enable events in SPL. This is mostly so the code can be excluded from SPL builds. Signed-off-by: Simon Glass --- (no changes since v1) common/Kconfig | 16 1 file changed, 16 insertions(+) diff --git a/common/Kconfig b/common/Kconfig index

[RFC PATCH v2 02/56] sandbox: Expand size for VPL image

2023-02-03 Thread Simon Glass
Allow this to get larger to accommodate more test code with LTO disabled. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/dts/sandbox_vpl.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sandbox/dts/sandbox_vpl.dtsi

[RFC PATCH v2 01/56] moveconfig: Various minor improvements

2023-02-03 Thread Simon Glass
It turns out that the conf_noproper file is not neeed, since if an option does not appear in U-Boot proper we can just omit it from the autoconf for that build. Drop it. Also add more control over what is output from the tool. Add this in here. It should be added to the previous series (splb).

[RFC PATCH v2 00/56] Migrate to split config

2023-02-03 Thread Simon Glass
U-Boot uses an SPL prefix on CONFIG options to indicate when an option relates to SPL. For example, while CONFIG_TEXT_BASE is the text base for U-Boot proper, CONFIG_SPL_TEXT_BASE is the text base for SPL. Within the code it is possible do things like CONFIG_VAL(TEXT_BASE) to get that value. It

Re: U-Boot tools and binman build fails in macOS 13

2023-02-03 Thread Simon Glass
Hi, On Fri, 3 Feb 2023 at 06:18, Alif Ilhan wrote: > > Hi, I have been trying to build U-Boot’s tools, especially binman in macOS 13 > because the new hardware I am working with needs binman. I have python 3.11 > installed, compiler is Apple Clang V14.0.0 and XCode is 14.1. Before enabling >

Re: [PATCH 3/8] blk: blkmap: Add basic infrastructure

2023-02-03 Thread Simon Glass
Hi Tobias, On Fri, 3 Feb 2023 at 02:38, Tobias Waldekranz wrote: > > On ons, feb 01, 2023 at 13:20, Simon Glass wrote: > > Hi Tobias, > > Hi Simon, > > Thanks for the review! > > > On Wed, 1 Feb 2023 at 11:10, Tobias Waldekranz > > wrote: > >> > >> blkmaps are loosely modeled on Linux's

Re: [PATCH V5 07/12] tools: Add script for converting public key into device tree include

2023-02-03 Thread Simon Glass
Hi Jan, On Fri, 3 Feb 2023 at 05:29, Jan Kiszka wrote: > > From: Jan Kiszka > > Allows to create a public key device tree dtsi for inclusion into U-Boot > SPL and proper during first build already. This can be achieved via > CONFIG_DEVICE_TREE_INCLUDES. > > Signed-off-by: Jan Kiszka > --- >

Re: [PATCH 1/1] efi_loader: stop watchdogs in ExitBootServices()

2023-02-03 Thread Simon Glass
Hi, On Fri, 3 Feb 2023 at 08:51, Tom Rini wrote: > > On Thu, Feb 02, 2023 at 07:15:35PM -0700, Simon Glass wrote: > > Hi Tom, > > > > On Thu, 2 Feb 2023 at 10:22, Tom Rini wrote: > > > > > > On Thu, Feb 02, 2023 at 10:12:07AM -0700, Simon Glass wrote: > > > > Hi, > > > > > > > > On Thu, 2 Feb

[PATCH] schemas: Add schema for firmware logs

2023-02-03 Thread Simon Glass
A common way to detect problems in firmware is to collect logs from the firmware, then pass them to the OS for storage and analysis. Logs can take the form of simple text output, or structured logs where the filename and line number, etc. are provided. Timestamps can sometimes be useful, too.

Re: [PATCH] arm: kirkwood: Enable uart0 dm-pre-reloc for Kirkwood boards

2023-02-03 Thread Tony Dinh
Hi Pali, On Fri, Feb 3, 2023 at 2:05 PM Pali Rohár wrote: > > On Thursday 02 February 2023 19:04:45 Pali Rohár wrote: > > On Wednesday 01 February 2023 13:13:16 Tony Dinh wrote: > > > Hi all, > > > > > > On Wed, Feb 1, 2023 at 11:05 AM Pali Rohár wrote: > > > > > > > > On Wednesday 01 February

Re: [PATCH 1/2] net: dhcp6: Add DHCPv6 (DHCP for IPv6)

2023-02-03 Thread Tom Rini
On Thu, Feb 02, 2023 at 10:12:04AM -0700, Simon Glass wrote: > Hi, > > On Wed, 1 Feb 2023 at 17:26, wrote: > > > > From: Sean Edmond > > > > Adds DHCPv6 protocol to u-boot. > > > > Allows for address assignement with DHCPv6 4-message exchange > > (SOLICIT->ADVERTISE->REQUEST->REPLY). Includes

Re: [PATCH] arm: kirkwood: Enable uart0 dm-pre-reloc for Kirkwood boards

2023-02-03 Thread Pali Rohár
On Thursday 02 February 2023 19:04:45 Pali Rohár wrote: > On Wednesday 01 February 2023 13:13:16 Tony Dinh wrote: > > Hi all, > > > > On Wed, Feb 1, 2023 at 11:05 AM Pali Rohár wrote: > > > > > > On Wednesday 01 February 2023 09:17:15 Michael Walle wrote: > > > > > > > When DM_SERIAL is enabled,

Re: [PATCH] arm: kirkwood: Enable uart0 dm-pre-reloc for Kirkwood boards

2023-02-03 Thread Tony Dinh
Hi Stefan, On Thu, Feb 2, 2023 at 8:28 PM Tony Dinh wrote: > > Hi all, > > On Thu, Feb 2, 2023 at 3:59 PM Tony Dinh wrote: > > > > Hi all, > > > > On Thu, Feb 2, 2023 at 10:04 AM Pali Rohár wrote: > > > > > > On Wednesday 01 February 2023 13:13:16 Tony Dinh wrote: > > > > Hi all, > > > > > > >

Re: [PATCH u-boot 3/3] tools: imagetool: Skip autodetection of gpimage type

2023-02-03 Thread Tom Rini
On Fri, Feb 03, 2023 at 08:24:20PM +0100, Pali Rohár wrote: > On Monday 30 January 2023 13:02:42 Tom Rini wrote: > > On Mon, Jan 30, 2023 at 08:50:15AM -0700, Simon Glass wrote: > > > On Sun, 29 Jan 2023 at 09:46, Pali Rohár wrote: > > > > > > > > gpimage type requires only that two first 32-bit

Re: [PATCH u-boot 3/3] tools: imagetool: Skip autodetection of gpimage type

2023-02-03 Thread Pali Rohár
On Monday 30 January 2023 13:02:42 Tom Rini wrote: > On Mon, Jan 30, 2023 at 08:50:15AM -0700, Simon Glass wrote: > > On Sun, 29 Jan 2023 at 09:46, Pali Rohár wrote: > > > > > > gpimage type requires only that two first 32-bit words of data file are > > > non-zero. So basically every random data

Re: [PATCH v2 2/3] net: ftmac100: simplify priv->iobase casting

2023-02-03 Thread Sergei Antonov
On Fri, 3 Feb 2023 at 01:05, Tom Rini wrote: > > On Thu, Jan 19, 2023 at 10:51:15PM +0300, Sergei Antonov wrote: > > > Replace 'phys_addr_t iobase' with 'struct ftmac100 *ftmac100' > > in order to cast once on assignment and remove casting in a > > number of other places. > > > > Signed-off-by:

[PATCH v3 3/3] net: ftmac100: add mii read and write callbacks

2023-02-03 Thread Sergei Antonov
Register mii_bus with read and write callbacks to allow the 'mii' command to work. Use a timeout of 10 ms to wait for the R/W operations to complete. Signed-off-by: Sergei Antonov --- v2 -> v3: no change v1 -> v2: * fix a typo in the description * add a dependency from MII to Kconfig

[PATCH v3 2/3] net: ftmac100: simplify priv->iobase casting

2023-02-03 Thread Sergei Antonov
Replace 'phys_addr_t iobase' with 'struct ftmac100 *ftmac100' in struct ftmac100_data. It allows to remove casting in a number of places. Since priv->iobase is phys_addr_t, use phys_to_virt() to make a pointer from it. Signed-off-by: Sergei Antonov --- v2 -> v3: Fix the following warning by

[PATCH v3 1/3] net: ftmac100: change driver name from nds32_mac to ftmac100

2023-02-03 Thread Sergei Antonov
So it will be named similarly to the related ftgmac100 driver. The old name 'nds32_mac' is not referred to anywhere in U-Boot. Signed-off-by: Sergei Antonov Reviewed-by: Ramon Fried --- v2 -> v3: no change v1 -> v2: no change drivers/net/ftmac100.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH V5 05/12] iot2050: Add CONFIG_ENV_FLAGS_LIST_STATIC

2023-02-03 Thread Tom Rini
On Fri, Feb 03, 2023 at 01:26:34PM +0100, Jan Kiszka wrote: > From: Jan Kiszka > > Will be needed when CONFIG_ENV_WRITEABLE_LIST is enabled. The listed > variables shall remain writable, for informational purposes - they have > to be considered untrusted because the persistent U-Boot env is not

Re: [PATCH V5 08/12] iot2050: Add script for signing artifacts

2023-02-03 Thread Tom Rini
On Fri, Feb 03, 2023 at 01:26:37PM +0100, Jan Kiszka wrote: > From: Jan Kiszka > > There are many ways to get a signed firmware for the IOT2050 devices, > namely for the parts under user-control. This script documents one way > of doing it, given a signing key. Augment the board documentation

Re: [PATCH V5 04/12] iot2050: Add watchdog start to bootcmd

2023-02-03 Thread Tom Rini
On Fri, Feb 03, 2023 at 01:26:33PM +0100, Jan Kiszka wrote: > From: Jan Kiszka > > Allows run-time control over watchdog auto-start and the timeout via > setting the environment variable watchdog_timeout_ms. A value of zero > means "do not start". Use CONFIG_WATCHDOG_TIMEOUT_MSECS as initial

  1   2   >