[U-Boot] [PATCH v3 02/15] sysreset-uclass: ensure udevice is probed before requesting reset

Álvaro Fernández Rojas noltari at gmail.com
Tue Apr 18 20:38:31 UTC 2017


This causes exceptions for drivers that aren't probed when reboot is
requested.

Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
---
 v3: add new patch to ensure that the device is probed

 drivers/sysreset/sysreset-uclass.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c
index 3566d17..329dc2e 100644
--- a/drivers/sysreset/sysreset-uclass.c
+++ b/drivers/sysreset/sysreset-uclass.c
@@ -34,6 +34,9 @@ int sysreset_walk(enum sysreset_t type)
 		for (uclass_first_device(UCLASS_SYSRESET, &dev);
 		     dev;
 		     uclass_next_device(&dev)) {
+			if (!device_active(dev) && device_probe(dev))
+				continue;
+
 			ret = sysreset_request(dev, type);
 			if (ret == -EINPROGRESS)
 				break;
-- 
2.1.4



More information about the U-Boot mailing list