summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-12-18 22:39:21 +0300
committerTom Rini <trini@konsulko.com>2021-12-18 22:39:21 +0300
commitd3213c26b56e564207515f1e28e663718e015dc3 (patch)
treef480ec7ab357d7cb94b35eae97174a56305fb866 /include
parentc03942ddc9e88d86d919504299905e4e8b0003cd (diff)
parent3cfc042d43f5c5cec4bcf0133202bdd8516df66c (diff)
downloadu-boot-d3213c26b56e564207515f1e28e663718e015dc3.tar.xz
Merge tag 'efi-2022-01-rc4-3' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2022-01-rc4-3 Documentation: * add Calxeda Highbank/Midway board documentation Bug fixes: * call part_init() in blk_get_device_by_str() only for MMC * fix an 'undefined' error in some driver model macros
Diffstat (limited to 'include')
-rw-r--r--include/blk.h12
-rw-r--r--include/dm/device.h8
2 files changed, 16 insertions, 4 deletions
diff --git a/include/blk.h b/include/blk.h
index dde2173257..133204a82e 100644
--- a/include/blk.h
+++ b/include/blk.h
@@ -371,6 +371,18 @@ int blk_create_devicef(struct udevice *parent, const char *drv_name,
lbaint_t lba, struct udevice **devp);
/**
+ * blk_probe_or_unbind() - Try to probe
+ *
+ * Try to probe the device, primarily for enumerating partitions.
+ * If it fails, the device itself is unbound since it means that it won't
+ * work any more.
+ *
+ * @dev: The device to probe
+ * Return: 0 if OK, -ve on error
+ */
+int blk_probe_or_unbind(struct udevice *dev);
+
+/**
* blk_unbind_all() - Unbind all device of the given interface type
*
* The devices are removed and then unbound.
diff --git a/include/dm/device.h b/include/dm/device.h
index 3028d002ab..f790041706 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -959,8 +959,8 @@ static inline bool device_is_on_pci_bus(const struct udevice *dev)
* @parent: parent device to scan
*/
#define device_foreach_child_of_to_plat(pos, parent) \
- for (int _ret = device_first_child_ofdata_err(parent, &dev); !_ret; \
- _ret = device_next_child_ofdata_err(&dev))
+ for (int _ret = device_first_child_ofdata_err(parent, &pos); !_ret; \
+ _ret = device_next_child_ofdata_err(&pos))
/**
* device_foreach_child_probe() - iterate through children, probing them
@@ -976,8 +976,8 @@ static inline bool device_is_on_pci_bus(const struct udevice *dev)
* @parent: parent device to scan
*/
#define device_foreach_child_probe(pos, parent) \
- for (int _ret = device_first_child_err(parent, &dev); !_ret; \
- _ret = device_next_child_err(&dev))
+ for (int _ret = device_first_child_err(parent, &pos); !_ret; \
+ _ret = device_next_child_err(&pos))
/**
* dm_scan_fdt_dev() - Bind child device in the device tree