mirror of
https://xff.cz/git/u-boot/
synced 2025-10-26 16:13:55 +01:00
dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in lists_bind_fdt()
Currently the comments of several APIs (eg: dm_init_and_scan()) say: @pre_reloc_only: If true, bind only drivers with the DM_FLAG_PRE_RELOC flag. If false bind all drivers. The 'Pre-Relocation Support' chapter in doc/driver-model/README.txt documents the same that both device tree properties and driver flag are supported. However the implementation only checks these special device tree properties without checking the driver flag at all. This updates lists_bind_fdt() to consider both scenarios. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Squashed in http://patchwork.ozlabs.org/patch/996473/ : Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -53,10 +53,13 @@ int lists_bind_drivers(struct udevice *parent, bool pre_reloc_only);
|
||||
* @parent: parent device (root)
|
||||
* @node: device tree node to bind
|
||||
* @devp: if non-NULL, returns a pointer to the bound device
|
||||
* @pre_reloc_only: If true, bind only nodes with special devicetree properties,
|
||||
* or drivers with the DM_FLAG_PRE_RELOC flag. If false bind all drivers.
|
||||
* @return 0 if device was bound, -EINVAL if the device tree is invalid,
|
||||
* other -ve value on error
|
||||
*/
|
||||
int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp);
|
||||
int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp,
|
||||
bool pre_reloc_only);
|
||||
|
||||
/**
|
||||
* device_bind_driver() - bind a device to a driver
|
||||
|
||||
Reference in New Issue
Block a user