Re: [PATCH 1/1] usb: request only 8 bytes for USB_SPEED_FULL bMaxPacketSize0 discovery

2022-09-25 Thread Janne Grunau
On 2022-09-26 01:52:37 +0200, Marek Vasut wrote: > On 8/29/22 08:31, Janne Grunau wrote: > > Fixes probing of various keyboards with DWC3 as integrated into Apple > > silicon SoCs. The problem appears to be requesting more data than the > > devices's bMaxPacketSize0 of 8. Older Logitech unifying

Re: [PATCH v2 1/1] usb: storage: continue probe on "Invalid device"

2022-09-25 Thread Janne Grunau
On 2022-08-10 21:54:22 +0200, Janne Grunau wrote: > Fixes a crash during probing of sd card readers without medium present. > > Link: https://github.com/AsahiLinux/linux/issues/44 > Link: https://lists.denx.de/pipermail/u-boot/2022-July/489717.html > Signed-off-by: Janne Grunau > --- > Changes

Re: [PATCH] configs: rockchip: Drop TPL_MAX_SIZE definition

2022-09-25 Thread Kever Yang
Hi Michael, On 2022/9/24 21:36, Michael Trimarchi wrote: The max size is defined at architectural level. On the same commit I have checked mostly all the other architecture and look like they are So how is this TPL_MAX_SIZE or SPL_PAD_TO is defined for rockchip platform? This value should be

Re: [PATCH v10 09/15] FWU: Add boot time checks as highlighted by the FWU specification

2022-09-25 Thread Jassi Brar
On Thu, Sep 15, 2022 at 3:17 AM Sughosh Ganu wrote: > diff --git a/include/fwu.h b/include/fwu.h > index 484289ed4f..d5f77ce83c 100644 > --- a/include/fwu.h > +++ b/include/fwu.h > @@ -256,4 +256,17 @@ int fwu_plat_get_update_index(uint *update_idx); > * > */ > void

Re: [PATCH v10 02/15] FWU: Add FWU metadata structure and driver for accessing metadata

2022-09-25 Thread Jassi Brar
On Thu, Sep 15, 2022 at 3:15 AM Sughosh Ganu wrote: > +/** > + * @mdata_check: check the validity of the FWU metadata partitions > + * @get_mdata() - Get a FWU metadata copy > + * @update_mdata() - Update the FWU metadata copy > + */ > +struct fwu_mdata_ops { > + /** > +*

Re: [PATCH v10 10/15] FWU: Add support for the FWU Multi Bank Update feature

2022-09-25 Thread Jassi Brar
On Thu, Sep 15, 2022 at 3:17 AM Sughosh Ganu wrote: > + > +static __maybe_unused void fwu_post_update_checks( > + struct efi_capsule_header *capsule, > + bool *fw_accept_os, bool *capsule_update) > +{ > + if (fwu_empty_capsule(capsule)) > + *capsule_update =

Re: [PATCH v10 03/15] FWU: Add FWU metadata access driver for GPT partitioned block devices

2022-09-25 Thread Jassi Brar
On Thu, Sep 15, 2022 at 3:16 AM Sughosh Ganu wrote: > diff --git a/drivers/fwu-mdata/Kconfig b/drivers/fwu-mdata/Kconfig > new file mode 100644 > index 00..7322da48b1 > --- /dev/null > +++ b/drivers/fwu-mdata/Kconfig > @@ -0,0 +1,16 @@ > +config FWU_MDATA > + bool "Driver support

[PULL] u-boot-usb/master

2022-09-25 Thread Marek Vasut
One outstanding driver and one bugfix. The following changes since commit 435596d57f8beedf36b5dc858fe7ba9d6c03334b: Merge tag 'u-boot-imx-20220922' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx (2022-09-22 10:29:29 -0400) are available in the Git repository at:

Re: Please pull u-boot-dm/next

2022-09-25 Thread Tom Rini
On Sun, Sep 25, 2022 at 03:15:51PM -0600, Simon Glass wrote: > Hi Tom, > > https://source.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/13590 > > (this is for -next) > > The following changes since commit 81da5042e514bfd27516d3530dde4d62a6708ca4: > > Merge branch

Re: [PATCH 14/45] dm: blk: Add udevice functions

2022-09-25 Thread AKASHI Takahiro
Hi Simon, On Sun, Sep 25, 2022 at 09:02:17AM -0600, Simon Glass wrote: > At present we have functions called blk_dread(), etc., which take a > struct blk_desc * to refer to the block device. Add some functions which > use udevice instead, since this is more in keeping with how driver model > is

Re: [PATCH 2/2] efi_loader: fill media_id from block device descriptor

2022-09-25 Thread AKASHI Takahiro
On Sun, Sep 25, 2022 at 08:15:36AM -0600, Simon Glass wrote: > Hi, > > On Fri, 23 Sept 2022 at 01:08, Ilias Apalodimas > wrote: > > > > On Thu, 15 Sept 2022 at 23:02, Heinrich Schuchardt > > wrote: > > > > > > Fill the media ID in the block IO protocol from the block device > > > descriptor >

Re: [PATCH 1/1] usb: request only 8 bytes for USB_SPEED_FULL bMaxPacketSize0 discovery

2022-09-25 Thread Marek Vasut
On 8/29/22 08:31, Janne Grunau wrote: Fixes probing of various keyboards with DWC3 as integrated into Apple silicon SoCs. The problem appears to be requesting more data than the devices's bMaxPacketSize0 of 8. Older Logitech unifying receivers (bcdDevice 12.03 or 12.10) are for eaxample

Re: [PATCH] Fix out of bound access of ep array.

2022-09-25 Thread Marek Vasut
On 9/22/22 06:01, Alison Huffman wrote: When processing USB_REQ_CLEAR_FEATURE, USB_REQ_SET_FEATURE, and USB_REQ_GET_STATUS packets in dwc2_ep0_setup an out of bounds access can occur. This is caused by the wIndex field of the usb control packet being used as an index into an array whose size is

Re: [PATCH] usb: common: Detect USB storage media with "miscellaneous" USB devices

2022-09-25 Thread Marek Vasut
On 9/25/22 16:46, Christian Kohlschütter wrote: When detecting USB storage devices, we currently skip everything that is not marked as "undefined device class". Composite devices such as tinyusb's CDC+MSC identify as "miscellaneous" (class 0xEF). Introduce a new constant, USB_CLASS_MISC

Please pull u-boot-dm/next

2022-09-25 Thread Simon Glass
Hi Tom, https://source.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/13590 (this is for -next) The following changes since commit 81da5042e514bfd27516d3530dde4d62a6708ca4: Merge branch '2022-09-24-add-console-flush' into next (2022-09-24 13:58:49 -0400) are available in the Git repository

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

2022-09-25 Thread Michal Suchánek
On Sun, Sep 25, 2022 at 08:15:31AM -0600, Simon Glass wrote: > Hi Michal, > > On Sat, 24 Sept 2022 at 14:10, Michal Suchánek wrote: > > > > Hello, > > > > On Sat, Sep 17, 2022 at 07:04:25PM +0200, Michal Suchánek wrote: > > > Hello, > > > > > > On Sat, Sep 17, 2022 at 09:02:53AM -0600, Simon

[PATCH 00/45] vbe: Implement the full firmware flow

2022-09-25 Thread Simon Glass
This series provides an implementation of VBE from TPL through to U-Boot proper, using VBE to load the relevant firmware stages. It builds a single image.bin file containing all the phases: TPL - initial phase, loads VPL using binman symbols VPL - main firmware phase, loads SPL using VBE

[PATCH] usb: common: Detect USB storage media with "miscellaneous" USB devices

2022-09-25 Thread Christian Kohlschütter
When detecting USB storage devices, we currently skip everything that is not marked as "undefined device class". Composite devices such as tinyusb's CDC+MSC identify as "miscellaneous" (class 0xEF). Introduce a new constant, USB_CLASS_MISC (0xEF), and allow the detection process to proceed for

[PATCH v4 00/21] Do not stop uclass iteration on error

2022-09-25 Thread Michal Suchanek
Hello, this patch series fixes the simple uclass iterators to be usable for iterating uclasses even if some devices fail to probe. Before this series when a probe error happens an error is returned without any device pointer, and iteration cannot continue to devices that happen to be after the

[PATCH 16/45] dm: blk: mmc: Tidy up some Makefile rules for SPL

2022-09-25 Thread Simon Glass
Use the correct SPL_TPL_ variable so that these features can be enabled in TPL and VPL as needed. Note that the default for TPL is y since some boards boot via MMC, so this addds 137 bytes on rockchip firefly-rk3288 for example. Other boards which enable BLK in TPL are: chromebook_coral

[PATCH 34/45] vbe: Support reading the next SPL phase via VBE

2022-09-25 Thread Simon Glass
Add an SPL loader to obtain the next-phase binary from a FIT provided by the VBE driver. Signed-off-by: Simon Glass --- arch/sandbox/cpu/spl.c | 3 +- arch/sandbox/include/asm/spl.h | 1 + boot/Makefile | 1 + boot/vbe_request.c | 2 +-

[PATCH 43/45] vbe: Add docs and a test for the VBE command

2022-09-25 Thread Simon Glass
After further development this seems to be useful for debugging and testing. Add documentation and a test. Signed-off-by: Simon Glass --- doc/usage/cmd/vbe.rst | 90 +++ doc/usage/index.rst | 1 + test/boot/Makefile| 1 + test/boot/vbe.c |

[PATCH 35/45] vbe: Move OS implementation into a separate file

2022-09-25 Thread Simon Glass
Move this into its own file so it can be built only by U-Boot proper. Signed-off-by: Simon Glass --- boot/Makefile| 1 + boot/vbe_simple.c| 102 +-- boot/vbe_simple.h| 34 +++ boot/vbe_simple_os.c

[PATCH 37/45] vbe: Add Kconfig options for VPL

2022-09-25 Thread Simon Glass
Enable the various features needed in VPL, by adding Kconfig options. Update the defconfig for sandbox_vpl so that the build for each phase includes what is needed. Drop LZMA for now and make sure partition support is omitted in SPL, since it is not needed. Fix up the sandbox_vpl setings so that

[PATCH 45/45] vbe: Add a test for the VBE flow into U-Boot proper

2022-09-25 Thread Simon Glass
Add a test which checks that VBE boots correctly from TPL through to U-Boot proper. This works by attaching the image.bin file to mmc3 so that it is accessible to sandbox_vpl. We don't want to include this in the generic sandbox build, since that image is of zero size and cannot be mapped with

[PATCH 33/45] vbe: Support selecting operations by SPL phase

2022-09-25 Thread Simon Glass
VBE supports booting firmware during the SPL phases, i.e. so that VPL can start SPL, then SPL can start U-Boot. It also supports booting an OS, when in U-Boot. As a first step towards these features, add functions to indicate the current VBE phase. The firmware selection is done in VPL and the

[PATCH 44/45] vbe: Add a subcommand to show the VBE state

2022-09-25 Thread Simon Glass
Add a VBE command which shows the current state. Currently this is just the phases which booted via VBE. Signed-off-by: Simon Glass --- cmd/vbe.c | 30 +- doc/usage/cmd/vbe.rst | 13 + include/spl.h | 2 ++ test/boot/vbe.c | 28

[PATCH 29/45] vbe: Rename vbe_fixup to vbe_request

2022-09-25 Thread Simon Glass
The vbe_fixup file handles device tree fixups, but these are called OS requests in VBE. Rename the file to reflect its wider purpose. Signed-off-by: Simon Glass --- boot/Makefile | 2 +- boot/{vbe_fixup.c => vbe_request.c} | 2 +- test/py/tests/test_event_dump.py| 2

[PATCH 28/45] image: Correct strncpy() warning with image_set_name()

2022-09-25 Thread Simon Glass
gcc 12 seems to warn on strncpy() as a matter of course. Rewrite the code a different way to do the same thing, to avoid the warning. Signed-off-by: Simon Glass --- include/image.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/image.h b/include/image.h

[PATCH 41/45] vbe: Use a manual test

2022-09-25 Thread Simon Glass
Use a manual test for the VBE test, so we can make the pytest and the C unit test work together properly. Signed-off-by: Simon Glass --- test/boot/vbe_fixup.c | 19 --- test/py/tests/test_vbe.py | 7 ++- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git

[PATCH 42/45] vbe: Record which phases loaded using VBE

2022-09-25 Thread Simon Glass
We expect VPL and SPL to load using VBE. Add a record of this so we can check it in U-Boot proper. Signed-off-by: Simon Glass --- boot/vbe_simple_fw.c | 10 ++ include/bloblist.h | 1 + include/vbe.h| 9 + 3 files changed, 20 insertions(+) diff --git

[PATCH 40/45] vbe: Correct pylint warnings in test_vbe

2022-09-25 Thread Simon Glass
Fix these before adding to the test. Signed-off-by: Simon Glass --- test/py/tests/test_vbe.py | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/test/py/tests/test_vbe.py b/test/py/tests/test_vbe.py index 559c2918868..a39cf0b31c6 100644 ---

[PATCH 27/45] image: Allow loading a FIT config for a particular phase

2022-09-25 Thread Simon Glass
Add support for filtering out FIT configs by phase. Rather than adding yet another argument to this already overloaded function, use a composite value, where the phase is only added in if needed. Tests for this come in a little later, as part of the updated VPL test. Signed-off-by: Simon Glass

[PATCH 39/45] sandbox: Add a binman image for VPL

2022-09-25 Thread Simon Glass
Use binman to build an image which includes all the U-Boot phases so that a full VBE boot can take place with just that image.bin file. VBE is used to load images in two phases: - In VPL, VBE decides which SPL image to load - In SPL, VBE decides which U-Boot image to load The latter

[PATCH 38/45] vbe: Add info about the VBE device to the fwupd node

2022-09-25 Thread Simon Glass
At present we put the driver in the /chosen node in U-Boot. This is a bit strange, since U-Boot doesn't normally use that node itself. It is better to put it under the bootstd node. To make this work we need to copy the node to appear under /chosen when fixing up the device tree. Copy over all

[PATCH 36/45] vbe: Drop the U-Boot prefix from the version

2022-09-25 Thread Simon Glass
We don't need the U-Boot prefix on the version and in fact it is harmful since pytest gets confused seeing the U-Boot banner bring displayed when the version is printed. Drop the prefix from the string. We could produce an entirely new string from the component parts, but this adds to the rodata

[PATCH 24/45] test: Update tests to use the skip feature

2022-09-25 Thread Simon Glass
Some tests currently return 0 when they want to be skipped. Update them to return -EAGAIN instead, so they are counted as skipped. A few tests are in two parts, with the latter part being skipped in certain situations. Split these into two and use the correct condition for the second part.

[PATCH 32/45] sandbox: Support obtaining the next phase from an image

2022-09-25 Thread Simon Glass
At present sandbox runs the next phase from discrete executables, so for example u-boot-tpl runs u-boot-vpl to get to the next phase. In some cases the phases are all built into a single firmware image, as is done for real boards. Add support for this to sandbox. Make it higher priority so that

[PATCH 30/45] vbe: Use a warning for a failed requests

2022-09-25 Thread Simon Glass
Optional requests should present a warning rather than an error. Update the log call. Signed-off-by: Simon Glass --- boot/vbe_request.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot/vbe_request.c b/boot/vbe_request.c index 935505dd421..01f7a24d316 100644 ---

[PATCH 25/45] test: Support tests which can only be run manually

2022-09-25 Thread Simon Glass
At present we normally write tests either in Python or in C. But most Python tests end up doing a lot of checks which would be better done in C. Checks done in C are orders of magnitude faster and it is possible to get full access to U-Boot's internal workings, rather than just relying on the

[PATCH 23/45] test: Report skippped tests

2022-09-25 Thread Simon Glass
At present it is possible for a test to skip itself by returning -EAGAIN but this is not recorded. Keep a track of skipped tests and report the total at the end. Signed-off-by: Simon Glass --- include/test/test.h | 2 ++ test/test-main.c| 23 --- 2 files changed, 22

[PATCH 31/45] spl: Allow multiple loaders of the same type

2022-09-25 Thread Simon Glass
At present we only support a single loader of each time. Extra ones are ignored. This means that only one BOOT_DEVICE_BOARD can be used in the SPL image. This is inconvenient since we sometimes want to provide several board-specific drivers, albeit at different priorties. Add support for this.

[PATCH 26/45] image: Add the concept of a phase to FIT

2022-09-25 Thread Simon Glass
We want to be able to mark a configuration as relataed to a phase, so we can easily load all the images for SPL or for U-Boot proper. Add this to the FIT specification, along with some access functions. Signed-off-by: Simon Glass --- boot/image.c | 18 +++ include/image.h|

[PATCH 22/45] image: Move comment for fit_conf_find_compat()

2022-09-25 Thread Simon Glass
Move this comment to the header file, where the APIs should be defined. Signed-off-by: Simon Glass --- boot/image-fit.c | 43 --- include/image.h | 43 +++ 2 files changed, 43 insertions(+), 43 deletions(-) diff

[PATCH 19/45] sandbox: Generalise SPL booting

2022-09-25 Thread Simon Glass
At present sandbox only supports jumping to a file, to get to the next U-Boot phase. We want to support other methods, so update the code to use an enum for the method. Use board_boot_order() to set the order, so we can add more options. Also add the MMC methods into the BOOT_DEVICE enum so that

[PATCH 21/45] bootstd: Add a way to set up a bootflow

2022-09-25 Thread Simon Glass
Add a function to init a bootflow, to reduce code duplication. Signed-off-by: Simon Glass --- boot/bootdev-uclass.c | 5 + boot/bootflow.c| 9 + boot/bootmeth-uclass.c | 5 + include/bootflow.h | 12 4 files changed, 23 insertions(+), 8 deletions(-)

[PATCH 20/45] sandbox: Add a way to specify the sandbox executable

2022-09-25 Thread Simon Glass
At present the sandbox executable is assumed to be arg[0] but this only works for a single jump (e.g. from SPL to U-Boot). Add a new arg to solve this issue, along with a detailed comment. Signed-off-by: Simon Glass --- arch/sandbox/cpu/start.c | 30 ++

[PATCH 18/45] sandbox: Drop message about writing sandbox state

2022-09-25 Thread Simon Glass
This happens every time sandbox moves to the next phase so is not very interesting. Display the message only when debugging. Signed-off-by: Simon Glass --- arch/sandbox/cpu/state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sandbox/cpu/state.c

[PATCH 14/45] dm: blk: Add udevice functions

2022-09-25 Thread Simon Glass
At present we have functions called blk_dread(), etc., which take a struct blk_desc * to refer to the block device. Add some functions which use udevice instead, since this is more in keeping with how driver model is supposed to work. Update one of the tests to use this. Signed-off-by: Simon

[PATCH 17/45] dm: mmc: Allow sandbox emulator to build without writes

2022-09-25 Thread Simon Glass
When MMC_WRITE is disabled this driver produced a build error. Fix this. Also update a comment while we are here. Signed-off-by: Simon Glass --- drivers/mmc/sandbox_mmc.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/sandbox_mmc.c

[PATCH 15/45] dm: usb: Update the test to cover reading and writing

2022-09-25 Thread Simon Glass
Add test coverage for blk_write() as well. The blk_erase() is not tested for now as the USB stor interface does not support erase. Signed-off-by: Simon Glass --- drivers/scsi/scsi_emul.c | 9 drivers/usb/emul/sandbox_flash.c | 35

[PATCH 11/45] binman: Split out looking up a symbol into a function

2022-09-25 Thread Simon Glass
Move this code into its own function so it can be used from tests. Signed-off-by: Simon Glass --- tools/binman/etype/section.py | 60 ++- 1 file changed, 45 insertions(+), 15 deletions(-) diff --git a/tools/binman/etype/section.py

[PATCH 13/45] binman: Support writing symbols into ELF files

2022-09-25 Thread Simon Glass
In some cases we may package the ELF version of SPL builds instead of the binary .bin file. Add support for this. Signed-off-by: Simon Glass --- tools/binman/elf.py | 41 +++ tools/binman/entry.py | 5 ++- tools/binman/etype/section.py

[PATCH 12/45] binman: Handle writing ELF symbols in the Entry class

2022-09-25 Thread Simon Glass
This feature is used by several etypes and we plan to add more that use it. Make symbol writing a feature of the base class to reduce the code duplication. Signed-off-by: Simon Glass --- tools/binman/entry.py | 13 +++-- tools/binman/etype/blob.py | 5

[PATCH 10/45] binman: Allow obtaining a symbol value

2022-09-25 Thread Simon Glass
Provide a function to obtain the integer value of an ELF symbol. This will be used from tests to check that the symbols are correct. Signed-off-by: Simon Glass --- tools/binman/elf.py | 53 ++--- 1 file changed, 45 insertions(+), 8 deletions(-) diff

[PATCH 08/45] spl: Add a separate silence option for SPL

2022-09-25 Thread Simon Glass
Add options to allow silent console to be controlled separately in SPL, so that boot progress can be shown. Disable it by default for sandbox since it is useful to see what is going on there. Signed-off-by: Simon Glass --- common/Kconfig | 22 ++ common/spl/spl.c | 2 +-

[PATCH 09/45] CI: Install pyelftools for builds

2022-09-25 Thread Simon Glass
Binman needs this module to build sandbox_vpl so install it in the before_script and in the world build. The existing pip install is too late for the buildman invocation. Add it to the docker file for the future. Signed-off-by: Simon Glass --- .gitlab-ci.yml | 2 ++

[PATCH 06/45] spl: Split up the board_init_r() function

2022-09-25 Thread Simon Glass
This function is quite long and does two separate things: init and booting. Split it into two. Signed-off-by: Simon Glass --- common/spl/spl.c | 64 1 file changed, 49 insertions(+), 15 deletions(-) diff --git a/common/spl/spl.c

[PATCH 07/45] spl: Refactor controls for console output

2022-09-25 Thread Simon Glass
The expression in boot_from_devices() is fairly long. Move it into a function with a suitable comment. Signed-off-by: Simon Glass --- common/spl/spl.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index

[PATCH 05/45] spl: Use binman suffix allow symbols of any SPL etype

2022-09-25 Thread Simon Glass
At present we use symbols for the u-boot-spl entry, but this is not always what we want. For example, sandbox actually jumps to a u-boot-spl-elf entry, since sandbox executables are ELF files. We already handle this with U-Boot by using the '-any' suffix. Add it for SPL as well. Signed-off-by:

[PATCH 04/45] rsa: Avoid warning in padding_pss_verify()

2022-09-25 Thread Simon Glass
With gcc 12 we ge the following warning: In file included from tools/lib/rsa/rsa-verify.c:1: lib/rsa/rsa-verify.c:275:11: warning: ‘*db’ may be used uninitialized 275 | db[0] &= 0xff >> leftmost_bits; Check the value of db_len to ensure this cannot happen. Signed-off-by: Simon Glass

[PATCH 02/45] disk: Drop debug messages in part_efi

2022-09-25 Thread Simon Glass
This is monstrously verbose when something goes wrong. It should work by recording the problem and reporting it (once) at the command level. At present it sometimes outputs hundreds of lines of CRC mismatches. For now, just silence it all. GUID Partition Table Entry Array CRC is wrong:

[PATCH 03/45] bloblist: Drop debugging

2022-09-25 Thread Simon Glass
Disable debugging by default since this implementation is stable now. Signed-off-by: Simon Glass --- common/bloblist.c | 1 - 1 file changed, 1 deletion(-) diff --git a/common/bloblist.c b/common/bloblist.c index 8488663354b..0d63b6e8817 100644 --- a/common/bloblist.c +++ b/common/bloblist.c

[PATCH] ARM: socfpga: Ensure FPGA in user mode before enabling the bridges

2022-09-25 Thread teik . heng . chong
From: Tien Fong Chee Unexpected behavior and error can occur if FPGA is accessed in unknown state.Always checking with FPGA in user mode is required to ensure system stability. Signed-off-by: Tien Fong Chee Signed-off-by: Teik Heng Chong --- arch/arm/mach-socfpga/misc_arria10.c | 13

[PATCH] configs: socfpga: Add CONFIG_NET_RANDOM_ETHADDR=y to SOCFPGA defconfig

2022-09-25 Thread teik . heng . chong
From: Tien Fong Chee Ethernet initialization is only work with properly set MAC addresses. Hence, this config is required to create the random MAC addresses for Ethernet initialization. Signed-off-by: Tien Fong Chee Signed-off-by: Teik Heng Chong --- configs/socfpga_arria10_defconfig | 1 +

Re: [PATCH 10/10] bootstage/timer: Treewide remove timer_get_boot_us()

2022-09-25 Thread Simon Glass
On Wed, 21 Sept 2022 at 08:06, Stefan Roese wrote: > > With the bootstage migration to timer_get_us() provided via > CONFIG_TIMER_EARLY timer_get_boot_us() is superfluous now. This patch > removes all occurances from the code. > > Signed-off-by: Stefan Roese > Cc: Patrick Delaunay > Cc: Jun Nie

Re: [PATCH v2 1/8] dm: fpga: Introduce new uclass

2022-09-25 Thread Simon Glass
Hi Michal, On Thu, 22 Sept 2022 at 05:45, Michal Simek wrote: > > > > On 9/22/22 13:35, Simon Glass wrote: > > Hi, > > > > On Thu, 22 Sept 2022 at 12:27, Michal Simek wrote: > >> > >> > >> > >> On 9/21/22 15:22, Alexander Dahl wrote: > >>> For future DM based FPGA drivers and for now to have a

Re: [PATCH 04/10] timer: cadence-ttc: Add timer_early functions

2022-09-25 Thread Simon Glass
Hi Stefan, On Wed, 21 Sept 2022 at 08:06, Stefan Roese wrote: > > Currently this timer driver provides timer_get_boot_us() to support the > BOOTSTAGE functionality. This patch adds the timer_early functions so > that the "normal" timer functions can be used, when CONFIG_TIMER_EARLY > is enabled.

Re: [PATCH 07/10] board_f/r: Allow selection of CONFIG_TIMER_EARLY w/o CONFIG_TIMER

2022-09-25 Thread Simon Glass
Hi Stefan, On Wed, 21 Sept 2022 at 08:06, Stefan Roese wrote: > > The early timer functions provided via CONFIG_TIMER_EARLY don't need > CONFIG_TIMER to be enabled, as they don't make use of the DM timer > and uclass interface. This patch now allow the selection of > CONFIG_TIMER_EARLY w/o

Re: [PATCH 03/10] arm: armv8: generic_timer: Add timer_early functions

2022-09-25 Thread Simon Glass
On Wed, 21 Sept 2022 at 08:06, Stefan Roese wrote: > > Currently this timer driver provides timer_get_boot_us() to support the > BOOTSTAGE functionality. This patch adds the timer_early functions so > that the "normal" timer functions can be used, when CONFIG_TIMER_EARLY > is enabled. > >

Re: [PATCH 02/10] arm: imx: syscounter: Add timer_early functions

2022-09-25 Thread Simon Glass
On Wed, 21 Sept 2022 at 08:06, Stefan Roese wrote: > > Currently this timer driver provides timer_get_boot_us() to support the > BOOTSTAGE functionality. This patch adds the timer_early functions so > that the "normal" timer functions can be used, when CONFIG_TIMER_EARLY > is enabled. > >

Re: [PATCH 01/10] arm: arch_timer: Add timer_early functions

2022-09-25 Thread Simon Glass
On Wed, 21 Sept 2022 at 08:06, Stefan Roese wrote: > > Currently this timer driver provides timer_get_boot_us() to support the > BOOTSTAGE functionality. This patch adds the timer_early functions so > that the "normal" timer functions can be used, when CONFIG_TIMER_EARLY > is enabled. > >

Re: [PATCH v3 1/2] dm: fix probing of all devices that have u-boot,dm-pre-reloc in SPL/TPL

2022-09-25 Thread Simon Glass
Hi Quentin, On Thu, 22 Sept 2022 at 09:53, Quentin Schulz wrote: > > From: Quentin Schulz > > Currently, dm_probe_devices checks that the flags of the device contains > DM_FLAG_PRE_RELOC. However DM_FLAG_PRE_RELOC is a driver - and not a > device - flag. This means that the check in

Re: [PATCH 2/2] efi_loader: fill media_id from block device descriptor

2022-09-25 Thread Simon Glass
Hi, On Fri, 23 Sept 2022 at 01:08, Ilias Apalodimas wrote: > > On Thu, 15 Sept 2022 at 23:02, Heinrich Schuchardt > wrote: > > > > Fill the media ID in the block IO protocol from the block device descriptor > > of the driver model. > > > > Signed-off-by: Heinrich Schuchardt > > --- > >

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

2022-09-25 Thread Simon Glass
Hi Michal, On Sat, 24 Sept 2022 at 14:10, Michal Suchánek wrote: > > Hello, > > On Sat, Sep 17, 2022 at 07:04:25PM +0200, Michal Suchánek wrote: > > Hello, > > > > On Sat, Sep 17, 2022 at 09:02:53AM -0600, Simon Glass wrote: > > > Hi Michal, > > > > > > On Wed, 31 Aug 2022 at 11:44, Simon Glass

[PATCH] power: fan53555: Fix missing newline in error message

2022-09-25 Thread Michal Suchanek
Avoid concatenation with following message. Signed-off-by: Michal Suchanek --- drivers/power/pmic/fan53555.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/pmic/fan53555.c b/drivers/power/pmic/fan53555.c index 4d1e686d27..0d91628f57 100644 ---

Re: [PATCH] dm: doc: Fix serial howto u-boot,dm-pre-reloc typo

2022-09-25 Thread Fabio Estevam
Hi Michal, On 25/09/2022 10:28, Michal Suchanek wrote: In a couple of places the document says u-boot,pre-reloc but all examples show u-boot,dm-pre-reloc, use the latter consistently. Signed-off-by: Michal Suchanek Reviewed-by: Fabio Estevam

[PATCH] dm: doc: Fix serial howto u-boot,dm-pre-reloc typo

2022-09-25 Thread Michal Suchanek
In a couple of places the document says u-boot,pre-reloc but all examples show u-boot,dm-pre-reloc, use the latter consistently. Signed-off-by: Michal Suchanek --- doc/develop/driver-model/serial-howto.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 2/2] common: board_f: Print information for all sysresets

2022-09-25 Thread Michal Suchanek
Boards can have multiple sysresets, iterate all when printing sysreset info. Also print the symbolic error when reporting sysreset failure. Fixes: 23471aed5c ("board_f: Add reset status printing") Signed-off-by: Michal Suchanek --- common/board_f.c | 31 +++ 1 file

[PATCH 1/2] sandbox: Initialize sysreset before relocation

2022-09-25 Thread Michal Suchanek
Without this the early sysreset code cannot be tested. Signed-off-by: Michal Suchanek --- arch/sandbox/dts/sandbox.dtsi | 1 + arch/sandbox/dts/test.dts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/sandbox/dts/sandbox.dtsi b/arch/sandbox/dts/sandbox.dtsi index

[PATCH] fixup: dm: core: Switch uclass_*_device_err to use uclass_*_device_check

2022-09-25 Thread Michal Suchanek
Clarify documentation, fix a few more cases that could be broken by the change. Signed-off-by: Michal Suchanek --- drivers/pci/pci-uclass.c | 7 +++ drivers/sysinfo/sysinfo-uclass.c | 10 +- include/dm/uclass.h | 15 +-- 3 files changed, 21

[PATCH v4 21/21] dm: core: Do not stop uclass iteration on error

2022-09-25 Thread Michal Suchanek
When probing a device fails NULL pointer is returned, and following devices in uclass list cannot be iterated. Skip to next device on error instead. With that the only condition under which these simple iteration functions return error is when the dm is not initialized at uclass_get time. This is

[PATCH v4 19/21] dm: treewide: Do not use the return value of simple uclass iterator

2022-09-25 Thread Michal Suchanek
uclass_first_device/uclass_next_device return value will be removed, don't use it. Signed-off-by: Michal Suchanek --- cmd/virtio.c | 9 +++-- drivers/gpio/gpio-uclass.c | 14 ++ 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/cmd/virtio.c

[PATCH v4 20/21] dm: core: Switch uclass_*_device_err to use uclass_*_device_check

2022-09-25 Thread Michal Suchanek
The _err variant iterators use the simple iterators without suffix as basis. However, there is no user that uclass_next_device_err for iteration, many users of uclass_first_device_err use it to get the first and (assumed) only device of an uclass, and a couple that use uclass_next_device_err to

[PATCH v4 16/21] dm: treewide: Use uclass_first_device_err when accessing one device

2022-09-25 Thread Michal Suchanek
There is a number of users that use uclass_first_device to access the first and (assumed) only device in uclass. Some check the return value of uclass_first_device and also that a device was returned which is exactly what uclass_first_device_err does. Some are not checking that a device was

[PATCH v4 17/21] dm: treewide: Use uclass_next_device_err when accessing second device

2022-09-25 Thread Michal Suchanek
There are a couple users of uclass_next_device return value that get the first device by other means and use uclass_next_device assuming the following device in the uclass is related to the first one. Use uclass_next_device_err because the return value from uclass_next_device will be removed in a

[PATCH v4 15/21] cmd: List all uclass devices regardless of probe error

2022-09-25 Thread Michal Suchanek
There are a few commands that iterate uclass with uclass_first_device/uclass_next_device or the _err variant. Use the _check class iterator variant to get devices that fail to probe as well, and print the status. Signed-off-by: Michal Suchanek --- cmd/adc.c | 22 ++

[PATCH v4 18/21] dm: blk: Do not use uclass_next_device_err

2022-09-25 Thread Michal Suchanek
blk_first_device_err/blk_next_device_err uses uclass_first_device_err/uclass_next_device_err for device iteration. Although the function names superficially match the return value from uclass_first_device_err/uclass_next_device_err is never used meaningfully, and

[PATCH v4 13/21] w1: Clean up device iteration in w1_bus_find_dev

2022-09-25 Thread Michal Suchanek
The cycle is guarded by !ret && dev, code in if (ret || ! dev) is never executed. dev implies !ret, and ret is not even checked when getting next device, just drop the ret variable completely. Signed-off-by: Michal Suchanek --- drivers/w1/w1-uclass.c | 9 ++--- 1 file changed, 2

[PATCH v4 14/21] dma: Eliminate unused variable in dma_get_cfg()

2022-09-25 Thread Michal Suchanek
The ret value is never used. It is only set when no device is returned, and that is handled before the value of ret would be used. Signed-off-by: Michal Suchanek --- drivers/dma/dma-uclass.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/dma-uclass.c

[PATCH v4 12/21] w1: Fix bus counting in w1_get_bus

2022-09-25 Thread Michal Suchanek
Use uclass_first_device_check/uclass_next_device_check to correctly count buses that fail to probe. Fixes: d3e19cf919 ("w1: Add 1-Wire uclass") Signed-off-by: Michal Suchanek --- drivers/w1/w1-uclass.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git

[PATCH v4 11/21] video: ipuv3: Fix error handling when getting the display

2022-09-25 Thread Michal Suchanek
The code checks that uclass_first_device returned a device but the returned value that is assigned is never used. Use uclass_first_device_err instead, and move the error return outside of the if block. Fixes: f4ec1ae08e ("mxc_ipuv3_fb.c: call display_enable") Signed-off-by: Michal Suchanek ---

[PATCH v4 09/21] usb: ether: Fix error handling in usb_ether_init

2022-09-25 Thread Michal Suchanek
The code checks the return value from uclass_first_device as well as that the device exists but it passes on the return value which may be zero if there are no gadget devices. Just check that a device was returned and return -ENODEV otherwise. Also remove the dev variable which is not really used

[PATCH v4 08/21] bootstd: Fix listing boot devices

2022-09-25 Thread Michal Suchanek
bootdev_list() uses uclass_*_device_err() to iterate devices. However, the only value _err adds is returning an error when the device pointer is null, and that's checked anyway. Also there is some intent to report errors, and that's what uclass_*_device_check() is for, use it. Also print the

[PATCH v4 10/21] stdio: Fix class iteration in stdio_add_devices()

2022-09-25 Thread Michal Suchanek
There is a complaint in the code that iterates keyboards that we don't have the _check variant of class iterator but we in fact do, use it. In the code that iterates video devices there is an attempt to print errors but the simple iterator does not return a device when there is an error. Use the

[PATCH v4 07/21] dm: pci: Fix device PCI iteration

2022-09-25 Thread Michal Suchanek
When there is no PCI bus uclass_first_device will return no bus and no error which will result in pci_find_first_device calling skip_to_next_device with no bus, and the bus is only checked at the end of the while cycle, not the beginning. Also stop dealing with the return value of

[PATCH v4 05/21] dm: core: Fix uclass_probe_all to really probe all devices

2022-09-25 Thread Michal Suchanek
uclass_probe_all uses uclass_first_device/uclass_next_device assigning the return value. The interface for getting meaningful error is uclass_first_device_check/uclass_next_device_check, use it. Also do not stop iteration when an error is encountered. Probing all devices includes those that

[PATCH v4 06/21] dm: treewide: Do not opencode uclass_probe_all()

2022-09-25 Thread Michal Suchanek
We already have a function for probing all devices of a specific class, use it. Signed-off-by: Michal Suchanek --- drivers/cpu/cpu-uclass.c | 20 drivers/virtio/virtio-uclass.c | 15 +-- test/dm/core.c | 17 +++--

[PATCH v4 04/21] dm: blk: Add probe in blk_first_device/blk_next_device

2022-09-25 Thread Michal Suchanek
The description claims that the device is probed but it isn't. Add the device_probe() call. Also consolidate the iteration into one function. Fixes: 8a5cbc065d ("dm: blk: Use uclass_find_first/next_device() in blk_first/next_device()") Signed-off-by: Michal Suchanek ---

[PATCH v4 02/21] dm: core: Add note about device_probe idempotence

2022-09-25 Thread Michal Suchanek
device_probe returns early when the device is already activated. Add a note to the documentation that it can be used on already activated devices. Signed-off-by: Michal Suchanek --- include/dm/device-internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

  1   2   >