Re: [PATCH] board: turris: Initialize serial# env

2022-08-27 Thread Marek Behún
On Sat, 27 Aug 2022 20:06:30 +0200 Pali Rohár wrote: > Store serial number from atsha cryptochip into the serial# env variable. > U-Boot automatically puts content of this variable into the root device > tree property serial-number when booting Linux kernel. Refactor turris > atsha code and from

Re: [PATCH] arm: mvebu: turris_{omnia, mox}: Reset bootdelay env for rescue

2022-08-27 Thread Marek Behún
On Sat, 27 Aug 2022 20:49:20 +0200 Pali Rohár wrote: > When rescue mode was activated reset also bootdelay env variable to its > default value. This will ensure that reset button works and starts rescue > mode also in the case when user changed bootdelay env variable to -1 (which > has meaning

Re: [PATCH] board_f: Add support for CONFIG_OF_BOARD_FIXUP for XIP images

2022-08-27 Thread Marek Behún
Can you rename the option to OF_FDT_READONLY_BEFORE_RELOC ? The INITIAL in the name may confuse people. The functions are called *_fdt (reloc_fdt, fix_fdt), so maybe put FDT instead of DTB in the config option name. Marek

Re: [PATCH v3] dm: core: Do not stop uclass iteration on error

2022-08-27 Thread Simon Glass
Hi Michal, On Fri, 19 Aug 2022 at 14:23, Michal Suchanek wrote: > > When probing a device fails NULL pointer is returned, and other devices > cannot be iterated. Skip to next device on error instead. > > Fixes: 6494d708bf ("dm: Add base driver model support") I think you should drop this as you

Re: [PATCH] fdt_support: add optional board_rng_seed() hook

2022-08-27 Thread Simon Glass
Hi Rasmus, On Wed, 24 Aug 2022 at 19:25, Simon Glass wrote: > > Hi Rasmus, > > On Tue, 23 Aug 2022 at 23:57, Rasmus Villemoes > wrote: > > > > On 23/08/2022 16.35, Simon Glass wrote: > > > Hi Rasmus, > > > > > > On Tue, 23 Aug 2022 at 07:06, Rasmus Villemoes > > > wrote: > > >> > > >> On

Re: Please pull u-boot-dm

2022-08-27 Thread Tom Rini
On Fri, Aug 26, 2022 at 08:01:44PM -0600, Simon Glass wrote: > Hi Tom, > > https://source.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/13234 > > > The following changes since commit aea087a665c447dfb89bf2113cad74ad53fa17a0: > > Merge

[PATCH] arm: mvebu: turris_{omnia, mox}: Reset bootdelay env for rescue

2022-08-27 Thread Pali Rohár
When rescue mode was activated reset also bootdelay env variable to its default value. This will ensure that reset button works and starts rescue mode also in the case when user changed bootdelay env variable to -1 (which has meaning to not start autoboot). Signed-off-by: Pali Rohár ---

[PATCH] board_f: Add support for CONFIG_OF_BOARD_FIXUP for XIP images

2022-08-27 Thread Pali Rohár
When U-Boot is running from flash memory (execute in place) then gd->fdt_blob before relocation points to read-only flash memory. So U-Boot calls board_fix_fdt() with read-only gd->fdt_blob pointer which cause immediate CPU crash when callback is trying to modify gd->fdt_blob. Fix this issue by

[PATCH] board: turris: Initialize serial# env

2022-08-27 Thread Pali Rohár
Store serial number from atsha cryptochip into the serial# env variable. U-Boot automatically puts content of this variable into the root device tree property serial-number when booting Linux kernel. Refactor turris atsha code and from turris_atsha_otp_get_serial_number() function returns directly

Re: [PATCH 2/4] cpu: microblaze: remove unused ret variable

2022-08-27 Thread Ovidiu Panait
Hi Michal, On 8/25/22 11:59, Michal Simek wrote: On 8/25/22 08:41, Ovidiu Panait wrote: Drop the unused ret variable from microblaze_cpu_get_desc(). Signed-off-by: Ovidiu Panait ---   drivers/cpu/microblaze_cpu.c | 7 +++   1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[PATCH] tools: mkimage: fix build with recent LibreSSL

2022-08-27 Thread Mark Kettenis
Recent versions of LibreSSL, such as those shipped as part of OpenBSD 7.1 and later have an opaque RSA object and do provide the RSA_get0_* functions that OpenSSL provides. Fixes: 2ecc354b8e46 ("tools: mkimage: fix build with LibreSSL") Signed-off-by: Mark Kettenis --- tools/sunxi_toc0.c | 2 +-

[PATCH 14/15] sandbox: Convert to use driver model for SCSI

2022-08-27 Thread Simon Glass
At present sandbox is producing a warning about SCSI migration. Drop the legacy code and replace it with a new implementation. Also drop the SATA command, which does not work with driver model. Signed-off-by: Simon Glass --- arch/Kconfig | 1 -

[PATCH 12/15] sandbox: Enable SCSI for all builds

2022-08-27 Thread Simon Glass
This will be needed to run unit tests, once the SCSI code is used for USB as well. Enable it for all sandbox builds. Signed-off-by: Simon Glass --- configs/sandbox64_defconfig| 5 + configs/sandbox_flattree_defconfig | 4 configs/sandbox_noinst_defconfig | 4

[PATCH 11/15] sandbox: scsi: Move structs to header file

2022-08-27 Thread Simon Glass
Move these to the SCSI header file so we can access them from multiple emulators. Signed-off-by: Simon Glass --- drivers/usb/emul/sandbox_flash.c | 26 -- include/scsi.h | 26 ++ 2 files changed, 26 insertions(+), 26

[PATCH 10/15] sandbox: scsi: Remove setup calls from handle_read()

2022-08-27 Thread Simon Glass
Move the device-specific code out into the top-level function. Signed-off-by: Simon Glass --- drivers/usb/emul/sandbox_flash.c | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/drivers/usb/emul/sandbox_flash.c b/drivers/usb/emul/sandbox_flash.c

[PATCH 13/15] sandbox: scsi: Move request-handling code to scsi_emul

2022-08-27 Thread Simon Glass
Move this code into the emulator file so it can be used by multiple drivers. Signed-off-by: Simon Glass --- drivers/scsi/Makefile| 1 + drivers/scsi/scsi_emul.c | 74 +++ drivers/usb/emul/sandbox_flash.c | 87

[PATCH 15/15] sandbox: Add a test for SCSI

2022-08-27 Thread Simon Glass
Add a simple uclass test for SCSI. It reads the partition table from a disk image and checks that it looks correct. Signed-off-by: Simon Glass --- arch/sandbox/dts/sandbox.dtsi | 4 arch/sandbox/dts/test.dts | 5 + test/dm/Makefile | 1 + test/dm/scsi.c

[PATCH 09/15] sandbox: scsi: Move reply setup out of helper

2022-08-27 Thread Simon Glass
Move this code out of the helper function so we can (later) add it as part of the shared emulation code. Set a default value of 0 for buff_used since that is what we use when there is an error. Signed-off-by: Simon Glass --- drivers/usb/emul/sandbox_flash.c | 22 +- 1 file

[PATCH 08/15] sandbox: scsi: Move file size into shared struct

2022-08-27 Thread Simon Glass
Move this information into struct scsi_emul_info so we can use it in common code. Signed-off-by: Simon Glass --- drivers/usb/emul/sandbox_flash.c | 7 +++ include/scsi_emul.h | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git

[PATCH 07/15] sandbox: scsi: Move block size into shared struct

2022-08-27 Thread Simon Glass
Move this information into struct scsi_emul_info so we can use it in common code. Signed-off-by: Simon Glass --- drivers/usb/emul/sandbox_flash.c | 11 ++- include/scsi_emul.h | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git

[PATCH 06/15] scsi: Move vendor/product info into the shared struct

2022-08-27 Thread Simon Glass
Move this information into struct scsi_emul_info so we can use it in common code. Signed-off-by: Simon Glass --- drivers/usb/emul/sandbox_flash.c | 10 -- include/scsi_emul.h | 5 + 2 files changed, 9 insertions(+), 6 deletions(-) diff --git

[PATCH 05/15] sandbox: Move buffer to scsi_emul_info

2022-08-27 Thread Simon Glass
Move the buffer into this struct so it can be shared between different implementations. Signed-off-by: Simon Glass --- drivers/usb/emul/sandbox_flash.c | 41 +++- include/scsi_emul.h | 5 2 files changed, 35 insertions(+), 11 deletions(-) diff

[PATCH 04/15] scsi: Move core emulation state into a new struct

2022-08-27 Thread Simon Glass
In preparation for sharing the emulation code between two drivers, move some of the fields into a new struct. Use a separate header file so it can be used by various drivers. Signed-off-by: Simon Glass --- drivers/usb/emul/sandbox_flash.c | 60

[PATCH 03/15] scsi: Move cmd_phase enum to the header

2022-08-27 Thread Simon Glass
This can be used by common files, so move it to the SCSI header and rename it. Signed-off-by: Simon Glass --- drivers/usb/emul/sandbox_flash.c | 24 +--- include/scsi.h | 6 ++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git

[PATCH 02/15] sandbox: usb: Rename transfer_len in protocol struct

2022-08-27 Thread Simon Glass
This has the same name as a field in our local private struct, which is confusing. Change the name to xfer_len instead. Signed-off-by: Simon Glass --- drivers/usb/emul/sandbox_flash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/emul/sandbox_flash.c

[PATCH 01/15] scsi: Tidy up comments for struct scsi_cmd

2022-08-27 Thread Simon Glass
These comments are bit of a mess. Tidy them up to match the correct coding style. Signed-off-by: Simon Glass --- include/scsi.h | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/include/scsi.h b/include/scsi.h index

[PATCH 00/15] scsi: Convert sandbox SCSI to driver model

2022-08-27 Thread Simon Glass
This series moves sandbox over to use driver model for SCSI. It takes the opportunity to use common code with the USB flash driver. This is mostly refactoring, but there is a small amount of new code, notably a test which checks that data can be read from a SCSI device. Simon Glass (15):

Re: [PATCH v2] xyz-modem: Allow to configure initial timeout for loadx and loady

2022-08-27 Thread Pali Rohár
On Saturday 27 August 2022 10:41:00 Tom Rini wrote: > On Sat, Aug 27, 2022 at 04:32:37PM +0200, Pali Rohár wrote: > > On Saturday 27 August 2022 10:30:05 Tom Rini wrote: > > > On Sat, Aug 27, 2022 at 02:56:15PM +0200, Pali Rohár wrote: > > > > On Saturday 27 August 2022 08:53:08 Tom Rini wrote: >

[PATCH v3] xyz-modem: Allow to configure initial timeout for loadx and loady

2022-08-27 Thread Pali Rohár
Now when loadx and loady commands could be aborted / cancelled by CTRL+C, allow to configure timeout for initial x/y-modem packet via env variable $loadxy_timeout and by default use value from new compile-time config option CONFIG_CMD_LOADXY_TIMEOUT. Value is in seconds and zero value means

Re: [PATCH v2] xyz-modem: Allow to configure initial timeout for loadx and loady

2022-08-27 Thread Tom Rini
On Sat, Aug 27, 2022 at 04:32:37PM +0200, Pali Rohár wrote: > On Saturday 27 August 2022 10:30:05 Tom Rini wrote: > > On Sat, Aug 27, 2022 at 02:56:15PM +0200, Pali Rohár wrote: > > > On Saturday 27 August 2022 08:53:08 Tom Rini wrote: > > > > On Sat, Aug 27, 2022 at 01:48:35PM +0200, Pali Rohár

Re: [PATCH v2] xyz-modem: Allow to configure initial timeout for loadx and loady

2022-08-27 Thread Pali Rohár
On Saturday 27 August 2022 10:30:05 Tom Rini wrote: > On Sat, Aug 27, 2022 at 02:56:15PM +0200, Pali Rohár wrote: > > On Saturday 27 August 2022 08:53:08 Tom Rini wrote: > > > On Sat, Aug 27, 2022 at 01:48:35PM +0200, Pali Rohár wrote: > > > > > > > Now when loadx and loady commands could be

Re: [PATCH v2] xyz-modem: Allow to configure initial timeout for loadx and loady

2022-08-27 Thread Tom Rini
On Sat, Aug 27, 2022 at 02:56:15PM +0200, Pali Rohár wrote: > On Saturday 27 August 2022 08:53:08 Tom Rini wrote: > > On Sat, Aug 27, 2022 at 01:48:35PM +0200, Pali Rohár wrote: > > > > > Now when loadx and loady commands could be aborted / cancelled by CTRL+C, > > > allow to configure timeout

Re: [PATCH v2] xyz-modem: Allow to configure initial timeout for loadx and loady

2022-08-27 Thread Pali Rohár
On Saturday 27 August 2022 08:53:08 Tom Rini wrote: > On Sat, Aug 27, 2022 at 01:48:35PM +0200, Pali Rohár wrote: > > > Now when loadx and loady commands could be aborted / cancelled by CTRL+C, > > allow to configure timeout for initial x/y-modem packet via env variable > > $loadxy_timeout and by

Re: [PATCH v2] xyz-modem: Allow to configure initial timeout for loadx and loady

2022-08-27 Thread Tom Rini
On Sat, Aug 27, 2022 at 01:48:35PM +0200, Pali Rohár wrote: > Now when loadx and loady commands could be aborted / cancelled by CTRL+C, > allow to configure timeout for initial x/y-modem packet via env variable > $loadxy_timeout and by default use value from new compile-time config > option

[PATCH] bootm: Fix upper bound of FDT overlap checks

2022-08-27 Thread Pali Rohár
FTD blob can be put immediately after the OS image. So use strict inequality for start address check. Fixes: fbde7589ce30 ("common: bootm: add checks to verify if ramdisk / fdtimage overlaps OS image") Signed-off-by: Pali Rohár --- boot/bootm.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v2] pci: Do not enable PCIe GEN3 link retrain workaround by default

2022-08-27 Thread Pali Rohár
PCIe GEN3 link retrain workaround, specially designed for system with PCIe ASMedia ASM2824 Switch and other Endpoint devices, unconditionally increase size of all SPL binaries with PCIe support, even those which do not require it. Moreover this workaround is enabled for all existing hardware and

Re: [PATCH] distroboot: ubifs: Add support for specifying UBI header offset

2022-08-27 Thread Tom Rini
On Sun, Aug 07, 2022 at 09:04:22PM +0200, Pali Rohár wrote: > Some UBI partitions may use non-standard UBI header offset. For attaching > these UBI partitions it is required to pass second argument with offset to > "ubi part" command. > > Therefore extend distroboot to allow specifying

Re: [PATCH] disk: part: remove dependency to ubifs for spl

2022-08-27 Thread Tom Rini
On Mon, Aug 08, 2022 at 04:45:17PM +0200, Stefan Herbrechtsmeier wrote: > From: Stefan Herbrechtsmeier > > The spl doesn't support ubifs and thereby doesn't provide the > ubifs_is_mounted function. Remove the dependency to ubifs for the spl. > > Signed-off-by: Stefan Herbrechtsmeier Applied

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

2022-08-27 Thread Tom Rini
On Sun, Jul 31, 2022 at 03:31:31PM +0900, Hector Martin wrote: > 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

Re: [PATCH] pci: Add checks to prevent config space overflow

2022-08-27 Thread Tom Rini
On Sun, Jul 03, 2022 at 12:48:06PM +0200, Pali Rohár wrote: > PCIe config space has address range 0-4095. So do not allow reading from > addresses outside of this range. Lot of U-Boot drivers do not expect that > passed value is not in this range. PCI DM read function is extended to > fill read

[PATCH] arm: mvebu: Espressobin: When emmc is not present disable it also in OF_LIVE

2022-08-27 Thread Pali Rohár
Signed-off-by: Pali Rohár --- board/Marvell/mvebu_armada-37xx/board.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c index 5ae133879f32..45779198b678 100644 --- a/board/Marvell/mvebu_armada-37xx/board.c +++

Re: [PATCH 1/2] xyz-modem: Wait infinitely for initial y-modem packet

2022-08-27 Thread Pali Rohár
On Monday 13 September 2021 15:02:50 Wolfgang Denk wrote: > Dear Pali Rohár, > > In message <20210913122245.my6ik4yjy7rwlh65@pali> you wrote: > > > > Timeout is not too slow, but sometimes user is (when is interrupted by > > other things during selecting file). And then it is not obvious why > >

[PATCH v2] xyz-modem: Allow to configure initial timeout for loadx and loady

2022-08-27 Thread Pali Rohár
Now when loadx and loady commands could be aborted / cancelled by CTRL+C, allow to configure timeout for initial x/y-modem packet via env variable $loadxy_timeout and by default use value from new compile-time config option CONFIG_CMD_LOADXY_TIMEOUT. Value is in seconds and zero value means

Re: [PATCH 3/4] arm: dts: chameleonv3: Override chameleonv3 bitstream names

2022-08-27 Thread Alexandru M Stan
On Fri, Aug 26, 2022 at 12:54 AM Paweł Anikiel wrote: > > Set the bitstream name per Chameleon variant. This allows the same > boot filesystem with all bitstream variants to be used on different > boards. > > Signed-off-by: Paweł Anikiel > --- >

Re: [PATCH 2/4] socfpga: chameleonv3: Move environment to a text file

2022-08-27 Thread Alexandru M Stan
On Fri, Aug 26, 2022 at 12:54 AM Paweł Anikiel wrote: > > Move the environment to an easily editable text file in the boot > partition > > Signed-off-by: Paweł Anikiel > --- > board/google/chameleonv3/environment.txt | 13 + > include/configs/socfpga_chameleonv3.h| 9 -

Re: [PATCH 1/4] socfpga: chameleonv3: Enable ext4 in SPL

2022-08-27 Thread Alexandru M Stan
On Fri, Aug 26, 2022 at 12:54 AM Paweł Anikiel wrote: > > Allow SPL to boot from an ext4 filesystem. > > Signed-off-by: Paweł Anikiel > --- > configs/socfpga_chameleonv3_defconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/configs/socfpga_chameleonv3_defconfig >

Re: [PATCH] ARM: imx: Enable SPL GPIO hog on i.MX8M Plus DHCOM

2022-08-27 Thread Fabio Estevam
On 26/08/2022 18:16, Marek Vasut wrote: Enable GPIO hog support in SPL to match the GPIO hog support in U-Boot proper. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic Cc: uboot-imx Reviewed-by: Fabio Estevam

Re: [PATCH] usb: Add delay for control messages to reach usb stick

2022-08-27 Thread Janne Grunau
On 2022-08-26 18:20:57 -0600, Simon Glass wrote: > Hi, > > On Fri, 26 Aug 2022 at 13:37, Janne Grunau wrote: > > > > Hej, > > > > On 2022-08-25 23:35:33 -0600, Ashok Reddy Soma wrote: > > > We are seeing timing issues with transcend usb sticks. These devices > > > seems to require more time than