| 1f383ee4 | 12-Oct-2022 |
Michal Suchanek <msuchanek@suse.de> |
UPSTREAM: dm: core: Do not stop uclass iteration on error
When probing a device fails NULL pointer is returned, and following devices in uclass list cannot be iterated. Skip to next device on error
UPSTREAM: dm: core: Do not stop uclass iteration on error
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 not all that interesting, change return type to void.
Fixes: 6494d708bf ("dm: Add base driver model support") Change-Id: Ie327dc21db7ee80f9fc32e7913be2af71bb074a7 Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org> (cherry picked from commit f21954750aa8ed445ab83998bb099e366136c428) Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
show more ...
|
| d1cab63e | 12-Oct-2022 |
Michal Suchanek <msuchanek@suse.de> |
UPSTREAM: dm: core: Switch uclass_*_device_err to use uclass_*_device_check
The _err variant iterators use the simple iterators without suffix as basis.
However, there is no user that uclass_next_d
UPSTREAM: dm: core: Switch uclass_*_device_err to use uclass_*_device_check
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 get the device following a known device in the uclass list.
While there are some truly singleton device classes in which more than one device cannot exist these are quite rare, and most classes can have multiple devices even if it is not the case on the SoC's EVB.
In a later patch the simple iterators will be updated to not stop on error and return next device instead. With this in many cases the code that expects the first device or an error if it fails to probe may get the next device instead. Use the _check iterators as the basis of _err iterators to preserve the old behavior.
Change-Id: Ia4a249c906a12db0cda69d44097a4fd3682d2ed9 Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org> (cherry picked from commit e44d7e73fe0d649693d8d0a110cd7632bc919273) Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
show more ...
|
| 771aadba | 06-Feb-2020 |
Simon Glass <sjg@chromium.org> |
UPSTREAM: dm: core: Add a function to find a device by drvdata
It is sometimes useful to find a device in a uclass using only its driver data. The driver data often indicates the 'subtype' of the de
UPSTREAM: dm: core: Add a function to find a device by drvdata
It is sometimes useful to find a device in a uclass using only its driver data. The driver data often indicates the 'subtype' of the device, e,g, via its compatible string.
Add a function to handle this.
Change-Id: I6668a2a29c29346f57d3d975838459c0ac90fdea Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> (cherry picked from commit 50162348f0d3b915004733131acd81805e202c76) Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
show more ...
|
| dfe24df3 | 12-Nov-2021 |
Joseph Chen <chenjh@rock-chips.com> |
dm: firmware: bind "firmware" into DM with OF_LIVE disabled
Do the same as commit: (5120375c5f dm: firmware: bind "firmware" into DM)
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: I
dm: firmware: bind "firmware" into DM with OF_LIVE disabled
Do the same as commit: (5120375c5f dm: firmware: bind "firmware" into DM)
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: Ic574a44bf3abcb49b2559f6a5897167f638d1bab
show more ...
|
| 5120375c | 12-Apr-2021 |
Joseph Chen <chenjh@rock-chips.com> |
dm: firmware: bind "firmware" into DM
There is no compatible property in "/firmware", let's bind it by default.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: Ib00c097e51da3f77206e35
dm: firmware: bind "firmware" into DM
There is no compatible property in "/firmware", let's bind it by default.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: Ib00c097e51da3f77206e351ea9e2519433d1c1ec
show more ...
|
| 659e640a | 08-Jul-2020 |
Joseph Chen <chenjh@rock-chips.com> |
core: dump: add symbol for remained dm device
Symbol: "**" : pre-reloc node and the device is remained in dm tree. "* " : pre-reloc node but the device is already being removed from dm tree.
=> d
core: dump: add symbol for remained dm device
Symbol: "**" : pre-reloc node and the device is remained in dm tree. "* " : pre-reloc node but the device is already being removed from dm tree.
=> dm tree Class Probed Driver Name
Change-Id: Ie242117d4d323ba24894dd99ab061d187230621d ---------------------------------------------------------- root [ + ] root_driver root_driver rsa_mod_ex [ ] mod_exp_sw |-- mod_exp_sw clk [ ] fixed_rate_clock |-- external-gmac-clockm0 * clk [ ] fixed_rate_clock |-- external-gmac-clockm1 * syscon [ + ] rv1126_syscon |-- syscon@fe000000 * syscon [ + ] rv1126_syscon |-- syscon@fe020000 * ...... mtd [ ] rk_nandc_v6 |-- nandc@ffc80000 ** blk [ ] mtd_blk | `-- nandc@ffc80000.blk spi [ ] rockchip_sfc |-- sfc@ffc90000 * mtd [ ] spi_nand | |-- flash@0 ** blk [ ] mtd_blk | | `-- flash@0.blk spi_flash [ ] spi_flash_std | `-- flash@1 ** blk [ ] mtd_blk | `-- flash@1.blk ......
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: I5bf643b9a2b29a86ac7315462ad9f65f30e18442
show more ...
|