[PATCH] lmb: Bump CONFIG_LMB_MAX_REGIONS

2023-01-27 Thread Michal Suchanek
p") Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1207562 Signed-off-by: Michal Suchanek --- lib/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Kconfig b/lib/Kconfig index 549bd35778..06c873c2bd 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -1038,7 +1038,7 @@ config

[PATCH] rockchip: Pinebook Pro: Do not initialize i2c before relocation

2022-12-03 Thread Michal Suchanek
own. This is board-specific, other boards that do not add the option to include the i2c bus in pre-reloc DT are not affected. Signed-off-by: Michal Suchanek --- This is not tested, my board does not currentl;y boot at all, YMMV --- arch/arm/dts/rk3399-pinebook-pro-u-boot.dtsi | 8 1 fi

[PATCH] sandbox: Correctly define BITS_PER_LONG

2022-10-22 Thread Michal Suchanek
SANDBOX_BITS_PER_LONG is the number of bits in long on the sandbox platform. Signed-off-by: Michal Suchanek --- arch/sandbox/include/asm/types.h | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/sandbox/include/asm/types.h b/arch/sandbox/include/asm/types.h index

[PATCH] xen: pvblock: Use uclass_probe_all

2022-10-22 Thread Michal Suchanek
Also eliminate useless code and variables. Signed-off-by: Michal Suchanek --- drivers/xen/pvblock.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/xen/pvblock.c b/drivers/xen/pvblock.c index 95e298d7dd..4ad548d599 100644 --- a/drivers/xen/pvblock.c +++ b

[PATCH v2] test: Fix typo in test name

2022-10-15 Thread Michal Suchanek
For other sandbox tests the printed test name corresponds to the configuration except for this one. Signed-off-by: Michal Suchanek Reviewed-by: Simon Glass --- Changes in v2: Also fix nearby comment typo --- test/run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH v2] tests: Build correct sandbox configuration on 32bit

2022-10-14 Thread Michal Suchanek
Currently sandbox configuration defautls to 64bit and there is no automation for building 32bit sandbox on 32bit hosts. Use _LP64 macro as heuristic for detecting 64bit targets. Signed-off-by: Michal Suchanek --- Changes in v2: simplify and move detection to kconfig --- arch/sandbox/Kconfig

[PATCH] test: Fix typo in test name

2022-10-13 Thread Michal Suchanek
For other sandbox tests the printed test name corresponds to the configuration except for this one. Signed-off-by: Michal Suchanek --- test/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/run b/test/run index 810b47e08d..5b17204c73 100755 --- a/test/run +++ b/test

[PATCH] libfdt: Fix build with python 3.10

2022-10-13 Thread Michal Suchanek
Python 3.10 requires defining PY_SSIZE_T_CLEAN. This will be fixed in swig 4.10 but it is not clear when it will be released. There was a warning since python 3.8. Link: https://github.com/swig/swig/pull/2277 Signed-off-by: Michal Suchanek --- scripts/dtc/pylibfdt/libfdt.i_shipped | 4 1

[PATCH] libfdt: Fix invalid version warning

2022-10-13 Thread Michal Suchanek
se see PEP 440 for more details. Signed-off-by: Michal Suchanek --- scripts/dtc/pylibfdt/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dtc/pylibfdt/Makefile b/scripts/dtc/pylibfdt/Makefile index 493995e303..a7579f0c5f 100644 --- a/scripts/dtc/pylibfdt/Make

[PATCH] clk: k210: Fix error calculation on 32bit

2022-10-13 Thread Michal Suchanek
k210 is 64bit but the driver and tests are also built in sandbox, and that can be built 32bit. BIT(32) does not work on 32bit, shift before subtraction to fit into 32bit integer with BIT values. Signed-off-by: Michal Suchanek --- drivers/clk/clk_k210.c | 2 +- test/dm/k210_pll.c | 2 +- 2

[PATCH] tests: Build correct sandbox configuration on 32bit

2022-10-13 Thread Michal Suchanek
aligns the sandbox configuration with the result. Signed-off-by: Michal Suchanek --- Makefile | 6 ++ doc/arch/sandbox.rst | 16 +++- test/py/conftest.py | 1 + tools/Makefile| 2 ++ tools/bits-per-long.c | 14 ++ 5 files changed, 34 insertions

[PATCH v6 00/20] Do not stop uclass iteration on error

2022-10-13 Thread Michal Suchanek
patch. Thanks Michal Michal Suchanek (20): dm: core: Fix uclass_probe_all to really probe all devices dm: treewide: Do not opencode uclass_probe_all() dm: pci: Fix device PCI iteration bootstd: Fix listing boot devices usb: ether: Fix error handling in usb_ether_init stdio: Fix class

[PATCH v2 1/2] image: Fix string truncation warning

2022-10-13 Thread Michal Suchanek
[-Wstringop-truncation] 786 | strncpy(image_get_name(hdr), name, IH_NMLEN); | ^~~~ Signed-off-by: Michal Suchanek --- Changes in v2: Use __nonstring instead of suppressing the warning --- include/image.h | 3 ++- tools/kwbimage.h | 6

[PATCH v2 2/2] spl: spl_legacy: Fix printing image name

2022-10-13 Thread Michal Suchanek
, not maximum. Signed-off-by: Michal Suchanek Reviewed-by: Simon Glass --- (no changes since v1) --- common/spl/spl_legacy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/spl/spl_legacy.c b/common/spl/spl_legacy.c index b3624dfbb7..11c459254b 100644 --- a/commo

[PATCH v6 17/20] dm: core: Switch uclass_*_device_err to use uclass_*_device_check

2022-10-12 Thread Michal Suchanek
d-off-by: Michal Suchanek Reviewed-by: Simon Glass --- v5: - udate documentation - fix up a few more cases where device returned on error may cause problem v6: - split the additional changes into separate patches --- drivers/core/uclass.c | 28 ++-- include/dm/ucl

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

2022-10-12 Thread Michal Suchanek
uclass_first_device/uclass_next_device return value will be removed, don't use it. With the current implementation dev is equivalent to !ret. It is redundant to check both, ret check can be replaced with dev check, and ret check inside the iteration is dead code. Signed-off-by: Michal Suc

[PATCH v6 20/20] dm: core: Do not stop uclass iteration on error

2022-10-12 Thread Michal Suchanek
not all that interesting, change return type to void. Fixes: 6494d708bf ("dm: Add base driver model support") Signed-off-by: Michal Suchanek Reviewed-by: Simon Glass --- v2: - Fix up tests v3: - Fix up API doc - Correctly forward error from uclass_get - Do not return an error

[PATCH v6 18/20] dm: core: Non-activated device may be returned from uclass iterators that provide error handling

2022-10-12 Thread Michal Suchanek
Note in documentation that a non-activated device can be returned on error. Signed-off-by: Michal Suchanek --- v6: - split off as separate patch --- include/dm/uclass.h | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/dm/uclass.h b/include/dm/uclass.h

[PATCH v6 15/20] mpc83xx: gazerbeam: Update sysinfo_get error handling

2022-10-12 Thread Michal Suchanek
In a later patch sysinfo_get will be changed to return the device in cae of an error. Set sysinfo to NULL on error to preserve previous behavior. Signed-off-by: Michal Suchanek --- board/gdsys/mpc8308/gazerbeam.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a

[PATCH v6 13/20] net: eth-uclass: Do not set device on error

2022-10-12 Thread Michal Suchanek
returned device pointer directly in a global state without checking the return value. Unset the pointer again in the error case. Signed-off-by: Michal Suchanek Reviewed-by: Simon Glass --- v6: split off as separate patch --- net/eth-uclass.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[PATCH v6 14/20] dm: pci: Update error handling in pci_sriov_init

2022-10-12 Thread Michal Suchanek
Check the returned value from pci_get_bus. After a later patch uclass_first_device_err may return a device on error and then checking that a device is returned will not suffice. Signed-off-by: Michal Suchanek --- v6: - split off as separate patch --- drivers/pci/pci-uclass.c | 7 +++ 1 file

[PATCH v6 16/20] dm: core: Switch uclass_foreach_dev_probe to use simple iterator

2022-10-12 Thread Michal Suchanek
The return value is not used for anythig, and in a later patch the behavior of the _err iterator will change in an incompatible way. Signed-off-by: Michal Suchanek --- v6: - split off as separate patch --- include/dm/uclass.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v6 12/20] dm: blk: Do not use uclass_next_device_err

2022-10-12 Thread Michal Suchanek
: Michal Suchanek Reviewed-by: Simon Glass --- drivers/block/blk-uclass.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c index 7d12d5413f..bcc14a684b 100644 --- a/drivers/block/blk-uclass.c +++ b/drivers

[PATCH v6 11/20] dm: treewide: Use uclass_next_device_err when accessing second device

2022-10-12 Thread Michal Suchanek
later patch. Signed-off-by: Michal Suchanek Reviewed-by: Simon Glass --- arch/arm/mach-k3/j721s2_init.c | 2 +- board/atmel/common/mac_eeprom.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-k3/j721s2_init.c b/arch/arm/mach-k3/j721s2_init.c index

[PATCH v6 10/20] dm: treewide: Use uclass_first_device_err when accessing one device

2022-10-12 Thread Michal Suchanek
returned and can potentially crash if no device exists in the uclass. Finally there is one that returns NULL on error either way. Convert all of these to use uclass_first_device_err instead, the return value will be removed from uclass_first_device in a later patch. Signed-off-by: Michal Suchanek

[PATCH v6 09/20] cmd: List all uclass devices regardless of probe error

2022-10-12 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 Reviewed-by: Simon Glass --- v6: Drop errno_str

[PATCH v6 07/20] video: ipuv3: Fix error handling when getting the display

2022-10-12 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: Micha

[PATCH v6 06/20] stdio: Fix class iteration in stdio_add_devices()

2022-10-12 Thread Michal Suchanek
e the _check variant of the iterator as well. Also format error messages consistently. Signed-off-by: Michal Suchanek Reviewed-by: Simon Glass --- v6: - drop errno_str - fix dev vs vdev in video error print --- common/stdio.c | 32 +--- 1 file changed, 13 inser

[PATCH v6 08/20] w1: Fix bus counting in w1_get_bus

2022-10-12 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 Reviewed-by: Simon Glass --- drivers/w1/w1-uclass.c | 20 +++- 1 file changed, 11 insert

[PATCH v6 05/20] usb: ether: Fix error handling in usb_ether_init

2022-10-12 Thread Michal Suchanek
for anything. Signed-off-by: Michal Suchanek Reviewed-by: Simon Glass --- drivers/usb/gadget/ether.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 6ce389de9f..43aec7ffa7 100644 --- a/drivers/usb

[PATCH v6 04/20] bootstd: Fix listing boot devices

2022-10-12 Thread Michal Suchanek
ned-off-by: Michal Suchanek Reviewed-by: Simon Glass --- v6: Drop errno_str --- boot/bootdev-uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index 13ac69eb39..9d98bee454 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootde

[PATCH v6 02/20] dm: treewide: Do not opencode uclass_probe_all()

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

[PATCH v6 01/20] dm: core: Fix uclass_probe_all to really probe all devices

2022-10-12 Thread Michal Suchanek
happen to be after a failing device in the uclass order. Fixes: a59153dfeb ("dm: core: add function uclass_probe_all() to probe all devices") Signed-off-by: Michal Suchanek --- v6: add test --- drivers/core/uclass.c | 12 +--- test/dm/test-fdt.c| 19 +++ 2 fil

[PATCH v6 03/20] dm: pci: Fix device PCI iteration

2022-10-12 Thread Michal Suchanek
rough all PCI devices") Signed-off-by: Michal Suchanek Reviewed-by: Simon Glass --- v6: Move dropping the use of uclass iterator return value to later patch --- drivers/pci/pci-uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pci-uclass.c b/drive

[PATCH 2/2] spl: spl_legacy: Fix printing image name

2022-10-12 Thread Michal Suchanek
, not maximum. Signed-off-by: Michal Suchanek --- common/spl/spl_legacy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/spl/spl_legacy.c b/common/spl/spl_legacy.c index b3624dfbb7..11c459254b 100644 --- a/common/spl/spl_legacy.c +++ b/common/spl/spl_legacy.c @@ -55,7

[PATCH 1/2] image: Suppress string truncation warning

2022-10-12 Thread Michal Suchanek
[-Wstringop-truncation] 786 | strncpy(image_get_name(hdr), name, IH_NMLEN); | ^~~~ There is no standard function that can be used to make the copy without a warning. Signed-off-by: Michal Suchanek --- include/image.h | 7 +++ 1 file

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

2022-10-10 Thread Michal Suchanek
Boards can have multiple sysresets, iterate all when printing sysreset info. Fixes: 23471aed5c ("board_f: Add reset status printing") Signed-off-by: Michal Suchanek --- v2: - do not use errno_str - rename flag variable --- common/board_f.c | 29 ++--- 1 fi

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

2022-10-10 Thread Michal Suchanek
Without this the early sysreset code cannot be tested. Signed-off-by: Michal Suchanek --- v2: use u-boot,dm-pre-proper rather than u-boot,dm-pre-reloc - sandbox SPL cannot build otherwise --- arch/sandbox/dts/sandbox.dtsi | 1 + arch/sandbox/dts/test.dts | 2 ++ 2 files changed, 3

[PATCH v5 00/15] Do not stop uclass iteration on error

2022-09-28 Thread Michal Suchanek
, pci_sriov_init, and sysinfo_get to work after the uclass_first_device_err change. Document that uclass_first_device_err and uclass_first_device_check can return non-activated device on error. Consolidate multiple similar cleanups into one patch. Thanks Michal Michal Suchanek (15): dm: core: Fix

[PATCH] rockchip: clk: pll: Fix constant typo

2022-09-28 Thread Michal Suchanek
Fixes: bbda2ed584 ("rockchip: clk: pll: add common pll setting funcs") Signed-off-by: Michal Suchanek --- drivers/clk/rockchip/clk_pll.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/rockchip/clk_pll.c b/drivers/clk/rockchip/clk_pll.c index

[PATCH] clk: change return type of clk_get_parent_rate from long long to ulong

2022-09-28 Thread Michal Suchanek
may need the extra bits for the result in their use case. Fixes: 4aa78300a0 ("dm: clk: Define clk_get_parent_rate() for clk operations") Signed-off-by: Michal Suchanek --- drivers/clk/clk-uclass.c | 2 +- include/clk.h| 4 ++-- 2 files changed, 3 insertions(+), 3 deletion

[PATCH v5 15/15] dm: core: Do not stop uclass iteration on error

2022-09-27 Thread Michal Suchanek
not all that interesting, change return type to void. Fixes: 6494d708bf ("dm: Add base driver model support") Signed-off-by: Michal Suchanek --- v2: - Fix up tests v3: - Fix up API doc - Correctly forward error from uclass_get - Do not return an error when last device fail

[PATCH v5 13/15] dm: core: Switch uclass_*_device_err to use uclass_*_device_check

2022-09-27 Thread Michal Suchanek
witch uclass_foreach_dev_probe to the simple iterator - it does not use the returned value, and did not give out the failing devices previously. Note in documentation that a non-activated device can be returned on error. Signed-off-by: Michal Suchanek --- v5: - udate documentation - fix up a few

[PATCH v5 08/15] w1: Fix bus counting in w1_get_bus

2022-09-27 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(-) di

[PATCH v5 14/15] dm: treewide: Do not use the return value of simple uclass iterator

2022-09-27 Thread Michal Suchanek
uclass_first_device/uclass_next_device return value will be removed, don't use it. With the current implementation bus is equivalent to !ret. It i redundant to check both, ret check can be replaced with bus check, and ret check inside the iteration is dead code. Signed-off-by: Michal Suc

[PATCH v5 12/15] dm: blk: Do not use uclass_next_device_err

2022-09-27 Thread Michal Suchanek
: Michal Suchanek --- drivers/block/blk-uclass.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c index 21c5209bb6..676f2444bf 100644 --- a/drivers/block/blk-uclass.c +++ b/drivers/block/blk-uclass.c

[PATCH v5 10/15] dm: treewide: Use uclass_first_device_err when accessing one device

2022-09-27 Thread Michal Suchanek
the return value is printed. Signed-off-by: Michal Suchanek --- arch/arm/mach-omap2/am33xx/board.c| 4 ++-- arch/x86/cpu/broadwell/cpu.c | 4 +--- arch/x86/cpu/intel_common/cpu.c | 4 +--- arch/x86/lib/pinctrl_ich6.c | 4 +--- board/intel

[PATCH v5 11/15] dm: treewide: Use uclass_next_device_err when accessing second device

2022-09-27 Thread Michal Suchanek
later patch. Signed-off-by: Michal Suchanek --- arch/arm/mach-k3/j721s2_init.c | 2 +- board/atmel/common/mac_eeprom.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-k3/j721s2_init.c b/arch/arm/mach-k3/j721s2_init.c index 12da8136f9..dd0c7ba18f 100644 --- a

[PATCH v5 07/15] video: ipuv3: Fix error handling when getting the display

2022-09-27 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: Micha

[PATCH v5 09/15] cmd: List all uclass devices regardless of probe error

2022-09-27 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 v5 05/15] usb: ether: Fix error handling in usb_ether_init

2022-09-27 Thread Michal Suchanek
for anything. Signed-off-by: Michal Suchanek --- drivers/usb/gadget/ether.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index abb5332f13..ad394c80fc 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers

[PATCH v5 06/15] stdio: Fix class iteration in stdio_add_devices()

2022-09-27 Thread Michal Suchanek
e the _check variant of the iterator as well. Also print the symbolic error. Fixes: b206cd7372 ("dm: stdio: Plumb in the new keyboard uclass") Fixes: e3b81c1c0d ("dm: stdio: video: Plumb the video uclass into stdio") Signed-off-by: Michal Suchanek

[PATCH v5 04/15] bootstd: Fix listing boot devices

2022-09-27 Thread Michal Suchanek
print the symbolic error. Signed-off-by: Michal Suchanek --- boot/bootdev-uclass.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index 13ac69eb39..e7115c5750 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -

[PATCH v5 03/15] dm: pci: Fix device PCI iteration

2022-09-27 Thread Michal Suchanek
uclass_first_device/uclass_next_device - once the iteration is fixed to continue after an error there is nothing meaningful to get anymore. Fixes: 76c3fbcd3d ("dm: pci: Add a way to iterate through all PCI devices") Signed-off-by: Michal Suchanek --- drivers/pci/pci-uclass.c | 19 +

[PATCH v5 02/15] dm: treewide: Do not opencode uclass_probe_all()

2022-09-27 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 +++-- test/test

[PATCH v5 01/15] dm: core: Fix uclass_probe_all to really probe all devices

2022-09-27 Thread Michal Suchanek
happen to be after a failing device in the uclass order. Fixes: a59153dfeb ("dm: core: add function uclass_probe_all() to probe all devices") Signed-off-by: Michal Suchanek --- drivers/core/uclass.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/dr

[PATCH] dm: pci: Fix doc typo first -> next

2022-09-27 Thread Michal Suchanek
pci_find_first_device description says it can be used for iteration with itself but it should really be with pci_find_next_device Signed-off-by: Michal Suchanek --- Resent separately include/pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pci.h b/include/pci.h

[PATCH] dm: core: Add note about device_probe idempotence

2022-09-27 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 --- Resent separately include/dm/device-internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH] dm: core: Document return value of device bind functions

2022-09-27 Thread Michal Suchanek
These functions use device_bind_with_driver_data internally, copy the return value description. Signed-off-by: Michal Suchanek --- Resent separately include/dm/lists.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/dm/lists.h b/include/dm/lists.h index fc3b4ae585..97236f8fa0

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

2022-09-27 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 --- Re

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

2022-09-25 Thread Michal Suchanek
failing device in the uclass list. This is rarely expected, nor clearly documented, and for the most part not useful in any way. The first four patches are independent fixes, the remaining until the last remove problematic iterator use. All but the last are new in v4. Thanks Michal Michal

[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 --- a/drivers/power

[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 a/doc/develop

[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 +++--

[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 56e6b38bfa

[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
not all that interesting, change return type to void. Fixes: 6494d708bf ("dm: Add base driver model support") Signed-off-by: Michal Suchanek --- v2: - Fix up tests v3: - Fix up API doc - Correctly forward error from uclass_get - Do not return an error when last device fail

[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
ectly in a global state without checking the return value. Unset the pointer again in the error case. Signed-off-by: Michal Suchanek --- drivers/core/uclass.c | 28 ++-- include/dm/uclass.h | 22 +++--- net/eth-uclass.c | 2 ++ 3 files change

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

2022-09-25 Thread Michal Suchanek
the return value is printed. Signed-off-by: Michal Suchanek --- arch/arm/mach-omap2/am33xx/board.c| 4 ++-- arch/x86/cpu/broadwell/cpu.c | 4 +--- arch/x86/cpu/intel_common/cpu.c | 4 +--- arch/x86/lib/pinctrl_ich6.c | 4 +--- board/intel

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

2022-09-25 Thread Michal Suchanek
later patch. Signed-off-by: Michal Suchanek --- arch/arm/mach-k3/j721s2_init.c | 2 +- board/atmel/common/mac_eeprom.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-k3/j721s2_init.c b/arch/arm/mach-k3/j721s2_init.c index 12da8136f9..dd0c7ba18f 100644 --- 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
: Michal Suchanek --- drivers/block/blk-uclass.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c index 992f8ad3da..35beedfdf7 100644 --- a/drivers/block/blk-uclass.c +++ b/drivers/block/blk-uclass.c

[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 in

[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 b

[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(-) di

[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: Micha

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

2022-09-25 Thread Michal Suchanek
for anything. Signed-off-by: Michal Suchanek --- drivers/usb/gadget/ether.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index abb5332f13..ad394c80fc 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers

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

2022-09-25 Thread Michal Suchanek
print the symbolic error. Signed-off-by: Michal Suchanek --- boot/bootdev-uclass.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index 13ac69eb39..e7115c5750 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -

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

2022-09-25 Thread Michal Suchanek
e the _check variant of the iterator as well. Also print the symbolic error. Fixes: b206cd7372 ("dm: stdio: Plumb in the new keyboard uclass") Fixes: e3b81c1c0d ("dm: stdio: video: Plumb the video uclass into stdio") Signed-off-by: Michal Suchanek

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

2022-09-25 Thread Michal Suchanek
uclass_first_device/uclass_next_device - once the iteration is fixed to continue after an error there is nothing meaningful to get anymore. Fixes: 76c3fbcd3d ("dm: pci: Add a way to iterate through all PCI devices") Signed-off-by: Michal Suchanek --- drivers/pci/pci-uclass.c | 19 +

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

2022-09-25 Thread Michal Suchanek
happen to be after a failing device in the uclass order. Fixes: a59153dfeb ("dm: core: add function uclass_probe_all() to probe all devices") Signed-off-by: Michal Suchanek --- drivers/core/uclass.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/dr

[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 +++-- test/test

[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 --- dr

[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 a/include/dm

[PATCH v4 01/21] dm: pci: Fix doc typo first -> next

2022-09-25 Thread Michal Suchanek
pci_find_first_device description says it can be used for iteration with itself but it should really be with pci_find_next_device Signed-off-by: Michal Suchanek --- include/pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pci.h b/include/pci.h index d7ed35dd52

[PATCH v4 03/21] dm: core: Document return value of device bind functions

2022-09-25 Thread Michal Suchanek
These functions use device_bind_with_driver_data internally, copy the return value description. Signed-off-by: Michal Suchanek --- include/dm/lists.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/dm/lists.h b/include/dm/lists.h index fc3b4ae585..97236f8fa0 100644 --- a/include

[PATCH 2/2] tests: Do not hardcode sudo tool

2022-08-24 Thread Michal Suchanek
In some situations it may be needed to pass parameters to sudo or to use a different tool to gain root access. Add SUDO variable to specify the sudo tool. Signed-off-by: Michal Suchanek --- doc/develop/testing.rst | 5 +++-- test/fs/fat-noncontig-test.sh | 9 + test/fs

[PATCH 1/2] patman: do not hardcode coverage tool

2022-08-24 Thread Michal Suchanek
The coverage tool name varies across distributions. Add COVERAGE variable to specify the tool name. Also there is one place where prefix is prepended to the tool path, remove the prefix. Signed-off-by: Michal Suchanek --- doc/develop/testing.rst | 3 +++ tools/patman/test_util.py | 18

[PATCH] tests: Do not hardcode sudo tool

2022-08-24 Thread Michal Suchanek
In some situations it may be needed to pass parameters to sudo or to use a different tool to gain root access. Add SUDO variable to specify the sudo tool. Signed-off-by: Michal Suchanek --- test/fs/fat-noncontig-test.sh | 9 + test/fs/fs-test.sh| 26

[PATCH] patman: do not hardcode coverage tool

2022-08-24 Thread Michal Suchanek
The coverage tool name varies across distributions. Add COVERAGE variable to specify the tool name. Also there is one place where prefix is prepended to the tool path, remove the prefix. Signed-off-by: Michal Suchanek --- tools/patman/test_util.py | 18 ++ 1 file changed, 10

[PATCH] clk: rockchip: rk3399: Fix Unknown clock 77 on mmc@fe310000

2022-08-21 Thread Michal Suchanek
identical to SDMMC clock except for the con 16->15 change. Add support for the clock to avoid the error. Signed-off-by: Michal Suchanek --- drivers/clk/rockchip/clk_rk3399.c | 66 --- 1 file changed, 43 insertions(+), 23 deletions(-) diff --git a/drivers/clk/rockc

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

2022-08-19 Thread Michal Suchanek
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") Signed-off-by: Michal Suchanek --- v2: - Fix up tests v3: - Fix up API doc - Correctly forward

[PATCH v2] dm: core: Do not stop uclass iteration on error.

2022-08-17 Thread Michal Suchanek
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") Signed-off-by: Michal Suchanek --- v2: Fix up tests Note: there is seemingly bogus repeated dev

[PATCH] power: pmic: rk8xx: Workaround pmic failure when probed before relocation

2022-08-05 Thread Michal Suchanek
When the sysreset is added as child of the pmic the pmic is probed before relocation. That probe fails, and subsequent attempts to probe after reloaction fail as well. As a workaround do not bind the sysreset before relocation. Signed-off-by: Michal Suchanek --- drivers/power/pmic/rk8xx.c | 2

[PATCH] power: pmic: rk8xx: Remove some ifdefs

2022-08-04 Thread Michal Suchanek
After adding the poweroff support there are some incorrectly nested ifdefs. Move the poweroff code outside of ifdef and convert it to if. Fixes: ad607512f5 ("power: pmic: rk8xx: Support sysreset shutdown method") Signed-off-by: Michal Suchanek --- drivers/power/pmic/rk

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

2022-08-04 Thread Michal Suchanek
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") Signed-off-by: Michal Suchanek --- drivers/core/uclass.c | 30 +- 1 fi

[PATCH] doc: dm: clarify activation.

2022-08-04 Thread Michal Suchanek
Explain when devices should get activated. Signed-off-by: Michal Suchanek --- doc/develop/driver-model/design.rst | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/doc/develop/driver-model/design.rst b/doc/develop/driver-model/design.rst index

[PATCH v2] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero

2022-07-09 Thread Michal Suchanek
The device tree should include generic "jedec,spi-nor" compatible, and a manufacturer-specific one. The macronix part is what is shipped on the boards that come with a flash chip. Fixes: 280294c5df ("sunxi: boards: Enable SPI flash support in U-Boot proper") Signed-off-by: Mic

[PATCH] sunxi: dts: OrangePi Zero: Fixup SPI flash device node

2022-07-07 Thread Michal Suchanek
For some reason the flash cannot be probed as is - the u-boot DT lookup code fails to find the definition, and sf complains about invalid cs. Fixes: 280294c5df ("sunxi: boards: Enable SPI flash support in U-Boot proper") Signed-off-by: Michal Suchanek --- arch/arm/dts/sun8i-h2-plu

  1   2   3   >