Re: [PATCH 1/1] pxe: simplify label_boot()

2021-11-15 Thread Art Nikpal
On Tue, Nov 16, 2021 at 2:26 AM Heinrich Schuchardt wrote: > > Coverity CID 131256 indicates a possible buffer overflow in label_boot(). > This would only occur if the size of the downloaded file would exceed 4 > GiB. But anyway we can simplify the code by using snprintf() and checking > the retur

Re: [PATCH next v7 04/12] crypto: aspeed: Add AST2600 HACE support

2021-11-15 Thread Joel Stanley
On Thu, 21 Oct 2021 at 02:13, ChiaWei Wang wrote: > > > From: Joel Stanley > > Sent: Thursday, October 21, 2021 8:08 AM > > > > On Wed, 20 Oct 2021 at 02:50, Chia-Wei Wang > > wrote: > > > > > > From: Johnny Huang > > > > > > Hash and Crypto Engine (HACE) is designed to accelerate the throughpu

Re: [PATCH RFC] cmd: fix net list command

2021-11-15 Thread Ramon Fried
On Mon, Nov 15, 2021 at 6:45 PM Marek Vasut wrote: > > On 11/15/21 4:21 PM, Michael Walle wrote: > > Hi, > > > > Am 2021-11-15 16:15, schrieb Wolfgang Denk: > > > >> | And if you don't want to use this feature just don't enable it via > >> | CONFIG_NET_RANDOM_ETHADDR. > >> > >> This say all, no pa

Re: Please pull u-boot-net/next

2021-11-15 Thread Ramon Fried
On Mon, Nov 15, 2021 at 7:37 PM Tom Rini wrote: > > On Wed, Nov 10, 2021 at 07:58:42PM +0200, Ramon Fried wrote: > > > his PR includes the following net changes for next: > > > > - Various DSA additions > > - bootp: fix for VCI string > > - tsec: support for promiscuous mode > > - macb: Fix for ra

Re: [PATCH] net: eqos: connect and config PHY from probe stage instead of starting EQOS

2021-11-15 Thread Ramon Fried
On Wed, Nov 10, 2021 at 7:42 AM Joakim Zhang wrote: > > For EQOS ethernet, it will do phy_connect() and phy_config() when start > the ethernet (eqos_srart()), users need wait seconds for PHY auto negotiation > to complete when do tftp boot. > phy_config() > -> board_phy_config() >

Re: [PATCH] net: dwc_eth_qos: Enable clock in probe

2021-11-15 Thread Ramon Fried
On Sat, Nov 13, 2021 at 4:23 AM Marek Vasut wrote: > > Enable DWC IP clock in driver probe, so the MII access is possible even > outside of active network transfers. This is particularly useful when > using 'mii' or 'mdio' commands to explore PHY state, neither of which > works with DWMAC currentl

Re: [PATCH] net: eth-phy: Handle gpio_request_by_name() return value

2021-11-15 Thread Ramon Fried
On Sat, Nov 13, 2021 at 4:23 AM Marek Vasut wrote: > > The gpio_request_by_name() returns zero in case of success, however the > conditional return value check in gpio_request_by_name() checks only for > (ret != -ENOENT) and if the condition is true, returns ret outright. > > This leads to a situa

Re: [PATCH 1/1] pxe: simplify label_boot()

2021-11-15 Thread Ramon Fried
On Mon, Nov 15, 2021 at 8:26 PM Heinrich Schuchardt wrote: > > Coverity CID 131256 indicates a possible buffer overflow in label_boot(). > This would only occur if the size of the downloaded file would exceed 4 > GiB. But anyway we can simplify the code by using snprintf() and checking > the retur

[PATCH v7 12/12] (RFC) efi_loader, dts: add public keys for capsules to device tree

2021-11-15 Thread AKASHI Takahiro
By specifying CONFIG_EFI_CAPSULE_KEY_PATH, the build process will automatically insert the given key into the device tree. Otherwise, users are required to do so manually, possibly, with the utility script, fdtsig.sh. Signed-off-by: AKASHI Takahiro --- doc/develop/uefi/uefi.rst | 4 dts/Ma

[PATCH v7 11/12] (RFC) tools: add fdtsig.sh

2021-11-15 Thread AKASHI Takahiro
With this script, a public key is added to a device tree blob as the default efi_get_public_key_data() expects. Signed-off-by: AKASHI Takahiro --- MAINTAINERS | 1 + tools/fdtsig.sh | 40 2 files changed, 41 insertions(+) create mode 100755 tools/fd

[PATCH v7 10/12] test/py: efi_capsule: check the results in case of CAPSULE_AUTHENTICATE

2021-11-15 Thread AKASHI Takahiro
Before the capsule authentication is supported, this test script works correctly, but with the feature enabled, most tests will fail due to unsigned capsules. So check the results depending on CAPSULE_AUTHENTICATE or not. Signed-off-by: AKASHI Takahiro Reviewed-by: Simon Glass --- .../test_efi_

[PATCH v7 09/12] test/py: efi_capsule: add a test for "--guid" option

2021-11-15 Thread AKASHI Takahiro
This test scenario tests a new feature of mkeficapsule, "--guid" option, which allows us to specify FMP driver's guid explicitly at the command line. Signed-off-by: AKASHI Takahiro --- test/py/tests/test_efi_capsule/conftest.py| 3 + .../test_efi_capsule/test_capsule_firmware.py | 67 ++

[PATCH v7 07/12] tools: mkeficapsule: allow for specifying GUID explicitly

2021-11-15 Thread AKASHI Takahiro
The existing options, "--fit" and "--raw," are only used to put a proper GUID in a capsule header, where GUID identifies a particular FMP (Firmware Management Protocol) driver which then would handle the firmware binary in a capsule. In fact, mkeficapsule does the exact same job in creating a capsu

[PATCH v7 06/12] test/py: efi_capsule: add image authentication test

2021-11-15 Thread AKASHI Takahiro
Add a couple of test cases against capsule image authentication for capsule-on-disk, where only a signed capsule file with the verified signature will be applied to the system. Due to the difficulty of embedding a public key (esl file) in U-Boot binary during pytest setup time, all the keys/certif

[PATCH v7 08/12] test/py: efi_capsule: align with the syntax change of mkeficapsule

2021-11-15 Thread AKASHI Takahiro
Since the syntax of mkeficapsule was changed in the previous commit, we need to modify command line arguments in a pytest script. Signed-off-by: AKASHI Takahiro Reviewed-by: Simon Glass --- test/py/tests/test_efi_capsule/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) dif

[PATCH v7 04/12] tools: mkeficapsule: add man page

2021-11-15 Thread AKASHI Takahiro
Add a man page for mkeficapsule command. Signed-off-by: AKASHI Takahiro Reviewed-by: Simon Glass --- MAINTAINERS| 1 + doc/mkeficapsule.1 | 95 ++ 2 files changed, 96 insertions(+) create mode 100644 doc/mkeficapsule.1 diff --git a/MAINTAIN

[PATCH v7 03/12] tools: mkeficapsule: add firmwware image signing

2021-11-15 Thread AKASHI Takahiro
With this enhancement, mkeficapsule will be able to sign a capsule file when it is created. A signature added will be used later in the verification at FMP's SetImage() call. To do that, We need specify additional command parameters: -monotonic-cout : monotonic count -private-key : private k

[PATCH v7 05/12] doc: update UEFI document for usage of mkeficapsule

2021-11-15 Thread AKASHI Takahiro
Now we can use mkeficapsule command instead of EDK-II's script to create a signed capsule file. So update the instruction for capsule authentication. Signed-off-by: AKASHI Takahiro Reviewed-by: Simon Glass --- doc/develop/uefi/uefi.rst | 143 ++ 1 file change

[PATCH v7 02/12] tools: build mkeficapsule with tools-only_defconfig

2021-11-15 Thread AKASHI Takahiro
We want to always build mkeficapsule if tools-only_defconfig is used. Signed-off-by: AKASHI Takahiro --- configs/tools-only_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig index f482c9a1c1b0..5427797dd4c3 100644 --- a/conf

[PATCH v7 01/12] tools: mkeficapsule: rework the code a little bit

2021-11-15 Thread AKASHI Takahiro
Abstract common routines to make the code easily understandable. No functional change. Signed-off-by: AKASHI Takahiro Reviewed-by: Simon Glass --- tools/mkeficapsule.c | 223 ++- 1 file changed, 159 insertions(+), 64 deletions(-) diff --git a/tools/mkefi

[PATCH v7 00/12] efi_loader: capsule: improve capsule authentication support

2021-11-15 Thread AKASHI Takahiro
As I proposed and discussed in [1] and [2], I have made a couple of improvements on the current implementation of capsule update in this patch set. * add signing feature to mkeficapsule * add "--guid" option to mkeficapsule * add man page of mkeficapsule * update uefi document regarding capsule up

[PATCH v3 1/1] imx8mn_var_som: Add support for Variscite VAR-SOM-MX8M-NANO board

2021-11-15 Thread Ariel D'Alessandro
Add support for iMX8MN VAR-SOM-MX8M-NANO board. Enables support for: - 1GiB DDR4 RAM - 16 GiB eMMC - SD card - Gigabit ethernet - USBOTG1 peripheral - fastboot Signed-off-by: Ariel D'Alessandro --- arch/arm/dts/Makefile | 1 + .../dts/imx8mn-var-som-symphony-u-boot.dts

[PATCH v3 0/1] imx8mn_var_som: Add support for Variscite VAR-SOM-MX8M-NANO board

2021-11-15 Thread Ariel D'Alessandro
Changes in v3: * Picked device tree from kernel. * Properly added MAINTAINERS entry. * Removed CONFIG_SPL_BUILD anti-pattern in board config. Changes in v2: * Reordered dt properties alphabetically. * Removed downstream stuff in bootargs. * Fixed binman configuration. * Several code styling fixes.

Re: [PATCH] imx8mn_var_som: Add support for Variscite VAR-SOM-MX8M-NANO board

2021-11-15 Thread Ariel D'Alessandro
On 11/15/21 6:39 PM, Fabio Estevam wrote: > On Tue, Nov 2, 2021 at 8:19 PM Ariel D'Alessandro > wrote: > >> --- /dev/null >> +++ b/arch/arm/dts/imx8mn-var-som.dts > > In the Linux kernel, this is called imx8mn-var-som.dtsi. > >> @@ -0,0 +1,425 @@ >> +// SPDX-License-Identifier: GPL-2.0+ >> +

Re: [RFC 07/22] dm: blk: add UCLASS_PARTITION

2021-11-15 Thread AKASHI Takahiro
On Tue, Nov 16, 2021 at 01:02:55AM +0100, Heinrich Schuchardt wrote: > On 11/16/21 00:51, AKASHI Takahiro wrote: > > > > Is the patch good enough to include in the series? > > > > > > > > If not, you could reply to it with what needs doing. > > ? I have already replied to your patch:) > > Basicall

[PATCH v4] lib: sparse: Make CHUNK_TYPE_RAW buffer aligned

2021-11-15 Thread qianfanguijin
From: qianfan Zhao CHUNK_TYPE_RAW buffer is not aligned, and flash sparse images by fastboot will report "Misaligned operation" if DCACHE is enabled. Flashing Sparse Image CACHE: Misaligned operation at range [8428, 84001028] CACHE: Misaligned operation at range [84001034, 84002034] CACHE: M

Re: [PATCH] drivers: musb_gadget: Save endpoint desc to usb_ep->desc

2021-11-15 Thread Sean Anderson
On 11/15/21 7:30 PM, qianfangui...@qq.com wrote: From: qianfan Zhao Fix fastboot flash bug. If the downloading file size is equal to the partition size, "fastboot flash" can't work, at least in sunxi platform, because used an uninitalized point: ep->desc. This patch also fixed 'data abort' bu

[PATCH] drivers: musb_gadget: Save endpoint desc to usb_ep->desc

2021-11-15 Thread qianfanguijin
From: qianfan Zhao Fix fastboot flash bug. If the downloading file size is equal to the partition size, "fastboot flash" can't work, at least in sunxi platform, because used an uninitalized point: ep->desc. This patch also fixed 'data abort' bug in am335x platform. Reproduce: fastboot flash lo

Re: [RFC 07/22] dm: blk: add UCLASS_PARTITION

2021-11-15 Thread Heinrich Schuchardt
On 11/16/21 00:51, AKASHI Takahiro wrote: Is the patch good enough to include in the series? If not, you could reply to it with what needs doing. ? I have already replied to your patch:) Basically, it seems to be fine to me. Regards, Simon The patch is not usable as is. It assumes only GPT

Re: [RFC 07/22] dm: blk: add UCLASS_PARTITION

2021-11-15 Thread AKASHI Takahiro
On Mon, Nov 15, 2021 at 08:16:25PM +0100, Heinrich Schuchardt wrote: > On 11/15/21 20:05, Simon Glass wrote: > > Hi Takahiro, > > > > On Sun, 14 Nov 2021 at 18:43, AKASHI Takahiro > > wrote: > > > > > > Hi Simon, > > > > > > On Sat, Nov 13, 2021 at 02:32:20PM -0700, Simon Glass wrote: > > > > H

[PATCH 09/10] board: sl28: remove "Useful I2C tricks" section from docs

2021-11-15 Thread Michael Walle
They are no longer needed, because we now have proper driver support for the sl28cpld management controller. Signed-off-by: Michael Walle --- doc/board/kontron/sl28.rst | 15 --- 1 file changed, 15 deletions(-) diff --git a/doc/board/kontron/sl28.rst b/doc/board/kontron/sl28.rst ind

[PATCH 10/10] board: sl28: disable random MAC address generation

2021-11-15 Thread Michael Walle
Nowadays, u-boot (when CONFIG_NET_RANDOM_ETHADDR is set) will set enetaddr to a random value if not set and then pass the randomly generated MAC address to linux. This is bad for the following reasons: (1) it makes it impossible for linux to detect this error (2) linux won't trigger any fallback

[PATCH 07/10] board: sl28: enable SoC watchdog support

2021-11-15 Thread Michael Walle
The SoC provides two additional watchdogs integrated in the SoC. Enable support for these. Signed-off-by: Michael Walle --- configs/kontron_sl28_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/kontron_sl28_defconfig b/configs/kontron_sl28_defconfig index 48cf3cf5e6..af90717

[PATCH 08/10] board: sl28: disable recovery watchdog

2021-11-15 Thread Michael Walle
This board has an internal watchdog which supervises the board startup. Although, the initial state of the watchdog is configurable, it is enabled by default. In board_late_init(), which means almost everything worked as expected, disable the watchdog. Signed-off-by: Michael Walle --- board/kont

[PATCH 06/10] board: sl28: enable sl28cpld support

2021-11-15 Thread Michael Walle
Enable the GPIO and watchdog driver. Don't start the watchdog automatically, though. Signed-off-by: Michael Walle --- configs/kontron_sl28_defconfig | 8 1 file changed, 8 insertions(+) diff --git a/configs/kontron_sl28_defconfig b/configs/kontron_sl28_defconfig index 31a1083b0a..48cf3

[PATCH 05/10] board: sl28: print CPLD version on bootup

2021-11-15 Thread Michael Walle
Most of the time it is very useful to have the version of the board management controller. Now that we have a driver, print it during startup. Signed-off-by: Michael Walle --- board/kontron/sl28/sl28.c | 28 include/sl28cpld.h| 2 ++ 2 files changed, 30 inse

[PATCH 03/10] gpio: add sl28cpld driver

2021-11-15 Thread Michael Walle
The gpio block is part of the sl28cpld sl28cpld management controller. There are three different flavors: the usual input and output where the direction is configurable, but also input only and output only variants. Signed-off-by: Michael Walle --- MAINTAINERS | 1 + drivers/g

[PATCH 04/10] board: sl28: fix DRAM pretty print

2021-11-15 Thread Michael Walle
The current console output is: DRAM: 4 GiB DDR4 GiB (DDR3, 32-bit, CL=11, ECC on) The size is printed twice and we can save one line of console output if we join both lines. The new output is as follows: DRAM: 4 GiB (DDR3, 32-bit, CL=11, ECC on) Signed-off-by: Michael Walle --- board/ko

[PATCH 01/10] misc: add sl28cpld base driver

2021-11-15 Thread Michael Walle
Add a multi-function device driver which will probe its children and provides methods to access the device. Signed-off-by: Michael Walle --- MAINTAINERS | 5 ++ drivers/misc/Kconfig| 8 +++ drivers/misc/Makefile | 1 + drivers/misc/sl28cpld.c | 105 +++

[PATCH 02/10] watchdog: add sl28cpld watchdog driver

2021-11-15 Thread Michael Walle
The watchdog timer is part of the sl28cpld management controller. The watchdog timer usually supervises the bootloader boot-up and if it bites the failsafe bootloader will be activated. Apart from that it supports the usual board level reset and one SMARC speciality: driving the WDT_TIMEOUT# signal

[PATCH 00/10] board: sl28: add sl28cpld support and board cleanups

2021-11-15 Thread Michael Walle
Add support for the sl28cpld management controller found on this board. This is especially useful, because of the integrated watchdog in this controller. It is used to supervise the bootup of the bootloader and will automatically switch to the failsafe bootloader if u-boot didn't start. Up until no

Re: [PATCH v2 07/11] mmc: fsl_esdhc_imx: simplify 64bit check for SDMA transfers

2021-11-15 Thread Jaehoon Chung
On 11/16/21 12:12 AM, Sean Anderson wrote: > > > On 11/15/21 3:39 AM, Jaehoon Chung wrote: >> On 11/13/21 4:15 AM, Sean Anderson wrote: >>> [ fsl_esdhc commit da86e8cfcb03ed5c1d8e0718bc8bc8583e60ced8 ] >>> >>> SDMA can only do DMA with 32 bit addresses. This is true for all >>> architectures (jus

Re: [PATCH v2] imx8mn_var_som: Add support for Variscite VAR-SOM-MX8M-NANO board

2021-11-15 Thread Ariel D'Alessandro
On 11/15/21 6:28 PM, Tom Rini wrote: > On Mon, Nov 15, 2021 at 06:27:08PM -0300, Ariel D'Alessandro wrote: >> Hi Tom, >> >> Thanks for the feedback. >> >> On 11/15/21 6:11 PM, Tom Rini wrote: >>> On Mon, Nov 15, 2021 at 05:24:22PM -0300, Ariel D'Alessandro wrote: >>> Add support for iMX8MN V

Re: [PATCH] imx8mn_var_som: Add support for Variscite VAR-SOM-MX8M-NANO board

2021-11-15 Thread Fabio Estevam
On Tue, Nov 2, 2021 at 8:19 PM Ariel D'Alessandro wrote: > --- /dev/null > +++ b/arch/arm/dts/imx8mn-var-som.dts In the Linux kernel, this is called imx8mn-var-som.dtsi. > @@ -0,0 +1,425 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Copyright 2021 Collabora Ltd. In the Linux kernel it

Re: [PATCH v2] imx8mn_var_som: Add support for Variscite VAR-SOM-MX8M-NANO board

2021-11-15 Thread Tom Rini
On Mon, Nov 15, 2021 at 06:27:08PM -0300, Ariel D'Alessandro wrote: > Hi Tom, > > Thanks for the feedback. > > On 11/15/21 6:11 PM, Tom Rini wrote: > > On Mon, Nov 15, 2021 at 05:24:22PM -0300, Ariel D'Alessandro wrote: > > > >> Add support for iMX8MN VAR-SOM-MX8M-NANO board. Enables support for

Re: [PATCH v2] imx8mn_var_som: Add support for Variscite VAR-SOM-MX8M-NANO board

2021-11-15 Thread Ariel D'Alessandro
Hi Tom, Thanks for the feedback. On 11/15/21 6:11 PM, Tom Rini wrote: > On Mon, Nov 15, 2021 at 05:24:22PM -0300, Ariel D'Alessandro wrote: > >> Add support for iMX8MN VAR-SOM-MX8M-NANO board. Enables support for: >> >> - 1GiB DDR4 RAM >> - 16 GiB eMMC >> - SD card >> - Gigabit ethernet >> - USB

Re: [PATCH v2] imx8mn_var_som: Add support for Variscite VAR-SOM-MX8M-NANO board

2021-11-15 Thread Tom Rini
On Mon, Nov 15, 2021 at 05:24:22PM -0300, Ariel D'Alessandro wrote: > Add support for iMX8MN VAR-SOM-MX8M-NANO board. Enables support for: > > - 1GiB DDR4 RAM > - 16 GiB eMMC > - SD card > - Gigabit ethernet > - USBOTG1 peripheral - fastboot > > Signed-off-by: Ariel D'Alessandro > --- > MAINTA

[PATCH v2] imx8mn_var_som: Add support for Variscite VAR-SOM-MX8M-NANO board

2021-11-15 Thread Ariel D'Alessandro
Add support for iMX8MN VAR-SOM-MX8M-NANO board. Enables support for: - 1GiB DDR4 RAM - 16 GiB eMMC - SD card - Gigabit ethernet - USBOTG1 peripheral - fastboot Signed-off-by: Ariel D'Alessandro --- MAINTAINERS | 8 + arch/arm/dts/Makefile

Re: [PATCH] imx8mn_var_som: Add support for Variscite VAR-SOM-MX8M-NANO board

2021-11-15 Thread Ariel D'Alessandro
Hi Marcel, On 11/3/21 6:22 PM, Marcel Ziswiler wrote: > Hi Ariel > > On Tue, 2021-11-02 at 20:18 -0300, Ariel D'Alessandro wrote: >> Add support for iMX8MN VAR-SOM-MX8M-NANO board. Enables support for: >> >> - 1GiB DDR4 RAM >> - 16 GiB eMMC >> - SD card >> - Gigabit ethernet >> - USBOTG1 peripher

[PATCH v2 1/1] tpm: clear state post probing

2021-11-15 Thread Heinrich Schuchardt
Before we can start measuring the TPM must be cleared. Do this in the post_probe() method of the uclass. Signed-off-by: Heinrich Schuchardt --- v2: tpm_startup2() is not available on all boards. tpm_startup() takes care of translating the call. --- drivers/tpm/tpm-uclass.c | 13 +

Re: [RFC 07/22] dm: blk: add UCLASS_PARTITION

2021-11-15 Thread Heinrich Schuchardt
On 11/15/21 20:05, Simon Glass wrote: Hi Takahiro, On Sun, 14 Nov 2021 at 18:43, AKASHI Takahiro wrote: Hi Simon, On Sat, Nov 13, 2021 at 02:32:20PM -0700, Simon Glass wrote: Hi Heinrich, On Sat, 13 Nov 2021 at 11:42, Heinrich Schuchardt wrote: Am 13. November 2021 19:14:32 MEZ schrieb

Re: [RFC 07/22] dm: blk: add UCLASS_PARTITION

2021-11-15 Thread Simon Glass
Hi Takahiro, On Sun, 14 Nov 2021 at 18:43, AKASHI Takahiro wrote: > > Hi Simon, > > On Sat, Nov 13, 2021 at 02:32:20PM -0700, Simon Glass wrote: > > Hi Heinrich, > > > > On Sat, 13 Nov 2021 at 11:42, Heinrich Schuchardt > > wrote: > > > > > > Am 13. November 2021 19:14:32 MEZ schrieb Simon Glas

[PATCH 1/1] pxe: simplify label_boot()

2021-11-15 Thread Heinrich Schuchardt
Coverity CID 131256 indicates a possible buffer overflow in label_boot(). This would only occur if the size of the downloaded file would exceed 4 GiB. But anyway we can simplify the code by using snprintf() and checking the return value. Signed-off-by: Heinrich Schuchardt --- boot/pxe_utils.c |

[PATCH] cmd_nandbcb: Support secondary boot address of imx8mn

2021-11-15 Thread Michael Trimarchi
Add support of secondary boot address for imx8mn. The secondary boot address is hardcoded in the fuse. The value is calculated from there according to the algo. The fuse IMG_CNTN_SET1_OFFSET (0x490[22:19]) is defined as follows: • Secondary boot is disabled if fuse value is bigger than 10, n = fus

[PATCH] cmd_nandbcb: Support secondary boot address of imx8mn

2021-11-15 Thread Michael Trimarchi
Add support of secondary boot address for imx8mn. The secondary boot address is hardcoded in the fuse. The value is calculated from there according to the algo. The fuse IMG_CNTN_SET1_OFFSET (0x490[22:19]) is defined as follows: • Secondary boot is disabled if fuse value is bigger than 10, n = fus

[PATCH 1/1] test: test truncation in snprintf()

2021-11-15 Thread Heinrich Schuchardt
Test that the return value of snprintf() is correct in the case of truncation. Signed-off-by: Heinrich Schuchardt --- test/print_ut.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/test/print_ut.c b/test/print_ut.c index 152a8c3334..7b2e7bb152 100644 --- a/test/print_ut.

[scan-ad...@coverity.com: New Defects reported by Coverity Scan for Das U-Boot]

2021-11-15 Thread Tom Rini
Now I'm not 100% sure if this is actually new or due to the code moving, since there's a new helper function involved, and I also know I had to hand-merge this section due to the zboot related changes. - Forwarded message from scan-ad...@coverity.com - Date: Mon, 15 Nov 2021 17:10:36 +000

[PATCH v2 3/3] engicam: px30: Add Engicam PX30.Core C.TOUCH 2.0 10.1" OF

2021-11-15 Thread Jagan Teki
PX30.Core is an EDIMM SOM based on Rockchip PX30 from Engicam. C.TOUCH 2.0 is a general purpose carrier board with capacitive touch interface support. 10.1" OF is a capacitive touch 10.1" Open Frame panel solutions. PX30.Core needs to mount on top of C.TOUCH 2.0 carrier with pluged 10.1" OF for

[PATCH v2 2/3] arm64: dts: rockchip: Sync px30 from linux-next

2021-11-15 Thread Jagan Teki
Sync the px30 devicetree files from linux-next tree. commit <14ce8069f48b> ("lib/stackdepot: allow optional init and stack_table allocation by kvmalloc() - fixup3") Note, this path even sync rk3326 files as it depends on px30. Signed-off-by: Jagan Teki --- Changes for v2: - add sync on v5.15 -

[PATCH v2 1/3] arm64: dts: rockchip: px30: Move dmc into -u-boot.dtsi

2021-11-15 Thread Jagan Teki
dmc node is specific to U-Boot, it is always better practice to maintain U-Boot specific nodes into -u-boot.dtsi files in order to maintain Linux dts file sync compatibility. Move the dmc into px30-u-boot.dtsi, also add dmc node explicitly in rk3326-odroid-go2-u-boot.dtsi since it is using px30.dt

Re: Please pull u-boot-net/next

2021-11-15 Thread Tom Rini
On Wed, Nov 10, 2021 at 07:58:42PM +0200, Ramon Fried wrote: > his PR includes the following net changes for next: > > - Various DSA additions > - bootp: fix for VCI string > - tsec: support for promiscuous mode > - macb: Fix for random MAC address not saved to the environment. > The following ch

[PATCH] mkimage: Drop unused OPT_STRING constant

2021-11-15 Thread Jan Kiszka
From: Jan Kiszka The actual opt string is inlined - and different. Seems this was a left-over from older versions of 603e26f76346. Signed-off-by: Jan Kiszka --- tools/mkimage.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/mkimage.c b/tools/mkimage.c index fbe883ce36..a4844d0f18 100

[PATCH] configs: iot2050: Drop unused CONFIG_OF_LIST from defconfig

2021-11-15 Thread Jan Kiszka
From: Jan Kiszka DTBs are explicitly listed in the image source file for this board, and this list already became outdated. Signed-off-by: Jan Kiszka --- configs/iot2050_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/iot2050_defconfig b/configs/iot2050_defconfig index 4a8

[PATCH 1/1] test: unit test for the EFI_TCG2_PROTOCOL

2021-11-15 Thread Heinrich Schuchardt
Encapsulate the UEFI EFI_TCG2_PROTOCOL unit test in an Python test. Signed-off-by: Heinrich Schuchardt --- This patch should be merged after [PATCH 1/1] tpm: clear state post probing https://lists.denx.de/pipermail/u-boot/2021-November/467308.html [U-BOOT-TEST-HOOKS PATCH 1/1] Enable TPMv2 emul

[PATCH 1/1] configs: enable CMD_TPM on QEMU ARM

2021-11-15 Thread Heinrich Schuchardt
With TPM emulation enabled in u-boot-test-hooks we should also provide the tpm2 command used for the test/py/tests/test_tpm2.py test. One of the Python TPMv2 tests expects sandbox specific values. So disable it on other platforms. Signed-off-by: Heinrich Schuchardt --- configs/qemu_arm64_defcon

[ANN] U-Boot v2022.01-rc2 released

2021-11-15 Thread Tom Rini
Hey all, It's two weeks past v2022.01-rc1, so here's -rc2. As a reminder, what comes in with these later rc's is at the discretion of the custodian. If they're confident of changes that look a tad large, but are confined to a particular platform or SoC that's been well tested by them, OK. But by

Re: [PATCH RFC] cmd: fix net list command

2021-11-15 Thread Marek Vasut
On 11/15/21 4:21 PM, Michael Walle wrote: Hi, Am 2021-11-15 16:15, schrieb Wolfgang Denk: | And if you don't want to use this feature just don't enable it via | CONFIG_NET_RANDOM_ETHADDR. This say all, no patches needed. Yes, I'm giving up. I'll just deactivate that option then and open cod

Re: [U-Boot] [PATCH v2] usb: Make USB_MUSB_PIO_ONLY selected by USB_MUSB_SUNXI

2021-11-15 Thread Tom Rini
On Wed, Nov 27, 2019 at 02:56:02PM -0500, Samuel Dionne-Riel wrote: > This ensures the USB_MUSB_PIO_ONLY config is set to an apppropriate > value from the changes enabling USB_MUSB_GADGET does. > > Namely, USB_MUSB_PIO_ONLY default to =y on USB_MUSB_SUNXI being y. > > Signed-off-by: Samuel Dionn

Re: [PATCH RFC] cmd: fix net list command

2021-11-15 Thread Michal Simek
On 11/15/21 16:20, Wolfgang Denk wrote: Dear Michal, In message <2a51974b-41cf-56e4-c9c9-e6b699f27...@xilinx.com> you wrote: As we discussed in previous thread. I think there shouldn't be a problem when u-boot passes random mac address (in whatever way) but if Linux driver know how to get c

[RFC] libretech-cc: Disable CONFIG_NET_RANDOM_ETHADDR

2021-11-15 Thread Tom Rini
This board has a persistent ethernet MAC address and does not enable USB gadget ethernet support, so does not require this functionality. Remove it. Cc: Neil Armstrong Signed-off-by: Tom Rini --- As mentioned in https://lore.kernel.org/u-boot/f6aead46-f220-ff51-f70d-de95daac9...@xilinx.com/T/ i

Re: [PATCH 3/7] common: rename functions lcd_dt_simplefb to fdt_simplefb

2021-11-15 Thread Matthias Brugger
On 15/11/2021 16:32, Patrick Delaunay wrote: Rename the function named lcd_dt_simplefb* to fdt_simplefb* to be aligned with the associated file name fdt_simplefb.h/fdt_simplefb.c Signed-off-by: Patrick Delaunay Reviewed-by: Matthias Brugger --- board/raspberrypi/rpi/rpi.c | 2 +- c

Re: [PATCH 1/7] Convert CONFIG_LCD_DT_SIMPLEFB to Kconfig

2021-11-15 Thread Matthias Brugger
On 15/11/2021 16:32, Patrick Delaunay wrote: This converts the following to Kconfig: CONFIG_LCD_DT_SIMPLEFB This patch also renames this config to CONFIG_FDT_SIMPLEFB as the code in common/lcd_simplefb.c support CONFIG_LCD and CONFIG_VIDEO. Signed-off-by: Patrick Delaunay Reviewed-by:

Re: [PATCH 2/5] doc: add include/lmb.h to the HTML documentation

2021-11-15 Thread Ilias Apalodimas
On Sun, 14 Nov 2021 at 11:03, Heinrich Schuchardt wrote: > > Correct Sphinx style comments in include/lmb.h > > Add the logical memory block API to the HTML documentation. > > Signed-off-by: Heinrich Schuchardt > --- > doc/api/index.rst | 1 + > doc/api/lmb.rst | 7 +++ > include/lmb.h

Re: [PATCH 1/5] lmb: remove lmb_is_nomap() from include

2021-11-15 Thread Ilias Apalodimas
On Sun, 14 Nov 2021 at 11:03, Heinrich Schuchardt wrote: > > Defining static functions in includes should be avoided. > Function lmb_is_nomap() is only used in the unit test. > So move it to the unit test. > > Signed-off-by: Heinrich Schuchardt > --- > include/lmb.h | 7 --- > test/lib/lmb.

Re: [PATCH RFC] cmd: fix net list command

2021-11-15 Thread Tom Rini
On Mon, Nov 15, 2021 at 04:25:55PM +0100, Wolfgang Denk wrote: > Dear Tom, > > In message <2025151956.GN24579@bill-the-cat> you wrote: > > > > Well, what I mean is, where are the real MAC addresses? What is the > > rationale for setting NET_RANDOM_ETHADDR? > > One practical use case is boar

Re: [PATCH 3/5] lmb: remove extern keyword in lmb.h

2021-11-15 Thread Ilias Apalodimas
On Sun, 14 Nov 2021 at 11:03, Heinrich Schuchardt wrote: > > The extern keyword is not needed in include/lmb.h to declare functions. > Remove it. > > Signed-off-by: Heinrich Schuchardt > --- > include/lmb.h | 36 +--- > 1 file changed, 17 insertions(+), 19 deletio

Re: [PATCH 5/5] lmb: fix typo 'commun'

2021-11-15 Thread Ilias Apalodimas
On Sun, 14 Nov 2021 at 11:03, Heinrich Schuchardt wrote: > > %s/commun/common/ > > Signed-off-by: Heinrich Schuchardt > --- > lib/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/Kconfig b/lib/Kconfig > index 70bf8e7a46..807a4c6ade 100644 > --- a/lib/Kconfig >

Re: [PATCH 4/5] lmb: drop unused lmb_size_bytes()

2021-11-15 Thread Ilias Apalodimas
On Sun, 14 Nov 2021 at 11:03, Heinrich Schuchardt wrote: > > lmb_size_bytes() is unused. > > Signed-off-by: Heinrich Schuchardt > --- > include/lmb.h | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/include/lmb.h b/include/lmb.h > index 6182054f68..ab277ca800 100644 > --- a/include/

Re: [PATCH RFC] cmd: fix net list command

2021-11-15 Thread Tom Rini
On Mon, Nov 15, 2021 at 04:22:39PM +0100, Wolfgang Denk wrote: > Dear Tom, > > In message <2025150753.GL24579@bill-the-cat> you wrote: > > > > It might also be the case that in U-Boot some systems that are using > > NET_RANDOM_ETHADDR that really probably shouldn't? A quick grep shows > > 25

[PATCH 0/7] stm32mp1: enable simple framebuffer node for splashscreen

2021-11-15 Thread Patrick Delaunay
Use simple framebuffer node in the Linux kernel device tree to preserved the resources (clock, memory) used by the stm32 video driver to display the splashscreen. See Linux documentation for details: Documentation/devicetree/bindings/display/simple-framebuffer.yaml The 3 first commits of the se

[PATCH 1/7] Convert CONFIG_LCD_DT_SIMPLEFB to Kconfig

2021-11-15 Thread Patrick Delaunay
This converts the following to Kconfig: CONFIG_LCD_DT_SIMPLEFB This patch also renames this config to CONFIG_FDT_SIMPLEFB as the code in common/lcd_simplefb.c support CONFIG_LCD and CONFIG_VIDEO. Signed-off-by: Patrick Delaunay --- common/Kconfig | 9 + common/Makefi

[PATCH 2/7] common: rename lcd_simplefb.c file to fdt_simplefb.c

2021-11-15 Thread Patrick Delaunay
Rename the file lcd_simplefb.c to fdt_simplefb.c to be aligned with the configuration name and with the associated include file ./include/fdt_simplefb.h Signed-off-by: Patrick Delaunay --- common/Makefile | 2 +- common/{lcd_simplefb.c => fdt_simplefb.c} | 0 2 files c

[PATCH 7/7] board: stm32mp1: enable simple framebuffer node for splashscreen

2021-11-15 Thread Patrick Delaunay
Enable an existing simple framebuffer node in the Linux kernel device tree and the add the associated reserved memory node to preserved the resources (clock, memory) used by the stm32 video driver to display the splashscreen = background in exlinux.conf file. These resources will be released by th

[PATCH 6/7] video: stm32: stm32_ltdc: align framebuffer on 2MB

2021-11-15 Thread Patrick Delaunay
Align the framebuffer size on MMU_SECTION_SIZE in kernel, = max 2MB for LPAE for armV7, to avoid issue with the simple frame buffer activation, when U-Boot add a reserved memory in the kernel device tree to preserve the splash screen until Linux driver initialization. See Linux documentation for d

[PATCH 5/7] common: add fdt_simplefb_enable_and_mem_rsv function

2021-11-15 Thread Patrick Delaunay
Add a new function to activate an existing simple frame buffer node and add the associated reserved memory, with no-map properties. This device tree update is only done when the video device is active and the video buffer is used. This patch uses '#if CONFIG_IS_ENABLED(DM_VIDEO)' because gd->vide

[PATCH 4/7] video: Add video_is_active function

2021-11-15 Thread Patrick Delaunay
Add the helper function video_is_active() to test if one video device is active. This function can be used in board code to execute operation only when the display is probed / really used. Signed-off-by: Patrick Delaunay --- drivers/video/video-uclass.c | 14 ++ include/video.h

[PATCH 3/7] common: rename functions lcd_dt_simplefb to fdt_simplefb

2021-11-15 Thread Patrick Delaunay
Rename the function named lcd_dt_simplefb* to fdt_simplefb* to be aligned with the associated file name fdt_simplefb.h/fdt_simplefb.c Signed-off-by: Patrick Delaunay --- board/raspberrypi/rpi/rpi.c | 2 +- common/fdt_simplefb.c | 10 +- include/fdt_simplefb.h | 4 ++-- 3 fi

Re: [PATCH RFC] cmd: fix net list command

2021-11-15 Thread Wolfgang Denk
Dear Tom, In message <2025151956.GN24579@bill-the-cat> you wrote: > > Well, what I mean is, where are the real MAC addresses? What is the > rationale for setting NET_RANDOM_ETHADDR? One practical use case is board provisioning in the factory, which includes setting up valid produt data like

Re: [PATCH RFC] cmd: fix net list command

2021-11-15 Thread Wolfgang Denk
Dear Tom, In message <2025150753.GL24579@bill-the-cat> you wrote: > > It might also be the case that in U-Boot some systems that are using > NET_RANDOM_ETHADDR that really probably shouldn't? A quick grep shows > 253 platforms enabling it today, which feels high for the number of > boards in

Re: [PATCH RFC] cmd: fix net list command

2021-11-15 Thread Michael Walle
Hi, Am 2021-11-15 16:15, schrieb Wolfgang Denk: | And if you don't want to use this feature just don't enable it via | CONFIG_NET_RANDOM_ETHADDR. This say all, no patches needed. Yes, I'm giving up. I'll just deactivate that option then and open code it in my board. -michael

Re: [PATCH RFC] cmd: fix net list command

2021-11-15 Thread Wolfgang Denk
Dear Michal, In message <2a51974b-41cf-56e4-c9c9-e6b699f27...@xilinx.com> you wrote: > > As we discussed in previous thread. I think there shouldn't be a problem > when u-boot passes random mac address (in whatever way) but if Linux > driver know how to get correct one it should be tried first.

Re: [PATCH RFC] cmd: fix net list command

2021-11-15 Thread Tom Rini
On Mon, Nov 15, 2021 at 04:15:31PM +0100, Michael Walle wrote: > Am 2021-11-15 16:12, schrieb Tom Rini: > > On Mon, Nov 15, 2021 at 03:52:51PM +0100, Michael Walle wrote: > > > Hi, > > > > > > Am 2021-11-15 15:31, schrieb Wolfgang Denk: > > > > In message you wrote: > > > > > > > > > > And again

Re: [PATCH RFC] cmd: fix net list command

2021-11-15 Thread Michael Walle
Am 2021-11-15 16:12, schrieb Tom Rini: On Mon, Nov 15, 2021 at 03:52:51PM +0100, Michael Walle wrote: Hi, Am 2021-11-15 15:31, schrieb Wolfgang Denk: > In message you wrote: > > > > And again you're masking the error and possible fixes by linux itself. > > Seems like this isn't an argument. >

Re: [PATCH RFC] cmd: fix net list command

2021-11-15 Thread Wolfgang Denk
Dear Michael, In message you wrote: > > What is the will of the user in this case? In which case? When the user does not bother to set a specific MAC address and let the system gernerate a random one? Well it is his (maybe concious, maybe not) decision... > It is the will of the > developer t

Re: [PATCH v2 10/11] mmc: fsl_esdhc_imx: replace most #ifdefs by IS_ENABLED()

2021-11-15 Thread Sean Anderson
On 11/15/21 3:44 AM, Jaehoon Chung wrote: On 11/13/21 4:15 AM, Sean Anderson wrote: [ fsl_esdhc commit 52faec31827ec1a1837977e29c067424426634c5 ] Make the code cleaner and drop the old-style #ifdef constructs where it is possible. Signed-off-by: Michael Walle Signed-off-by: Sean Anderson

Re: [PATCH v2 07/11] mmc: fsl_esdhc_imx: simplify 64bit check for SDMA transfers

2021-11-15 Thread Sean Anderson
On 11/15/21 3:39 AM, Jaehoon Chung wrote: On 11/13/21 4:15 AM, Sean Anderson wrote: [ fsl_esdhc commit da86e8cfcb03ed5c1d8e0718bc8bc8583e60ced8 ] SDMA can only do DMA with 32 bit addresses. This is true for all architectures (just doesn't apply to 32 bit ones). Simplify the code and remove u

Re: [PATCH RFC] cmd: fix net list command

2021-11-15 Thread Tom Rini
On Mon, Nov 15, 2021 at 03:52:51PM +0100, Michael Walle wrote: > Hi, > > Am 2021-11-15 15:31, schrieb Wolfgang Denk: > > In message you wrote: > > > > > > And again you're masking the error and possible fixes by linux itself. > > > Seems like this isn't an argument. > > > > Respecting the expli

Re: [PATCH RFC] cmd: fix net list command

2021-11-15 Thread Tom Rini
On Mon, Nov 15, 2021 at 03:57:51PM +0100, Michal Simek wrote: > > > On 11/15/21 15:52, Michael Walle wrote: > > Hi, > > > > Am 2021-11-15 15:31, schrieb Wolfgang Denk: > > > In message you wrote: > > > > > > > > And again you're masking the error and possible fixes by linux itself. > > > > See

Re: [PATCH] lib: sparse: Make CHUNK_TYPE_RAW buffer aligned

2021-11-15 Thread Sean Anderson
(This should be [PATCH v3] for those following along at home) On 11/15/21 12:43 AM, qianfangui...@qq.com wrote: From: qianfan Zhao CHUNK_TYPE_RAW buffer is not aligned, and flash sparse images by fastboot will report "Misaligned operation" if DCACHE is enabled. Flashing Sparse Image CACHE: Mi

Re: [PATCH] xilinx: zynqmp: fix ZYNQMP_RESTORE_JTAG check

2021-11-15 Thread Michal Simek
On 11/4/21 20:28, Ricardo Salveti wrote: Config check should be done without the SPL_ prefix. Signed-off-by: Ricardo Salveti --- board/xilinx/zynqmp/zynqmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c ind

  1   2   >