Skip to contentSkip to conversation

sandbox: Correct operaion of 'reset' command

PATCH New Simon Glass 2 participants 2 messages Oct 3, 2015 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sandbox: Correct operaion of 'reset' command

Currently 'reset' only works with the test device tree. When run without a device tree, or with the normal device tree, the following error is displayed:

Reset not supported on this platform

Fix the driver and the standard device tree to avoid this.

---

 arch/sandbox/dts/sandbox.dts | 4 ++++
 drivers/misc/reset_sandbox.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
arch/sandbox/dts/sandbox.dts +4 -0
index 65b9125..08f72ac 100644
@@ -153,6 +153,10 @@
 		};
 	};
 
+	reset at 1 {
+		compatible = "sandbox,reset";
+	};
+
 	spi at 0 {
 		#address-cells = <1>;
 		#size-cells = <0>;
drivers/misc/reset_sandbox.c +1 -1
index 917121b..2691bb0 100644
@@ -40,7 +40,7 @@ static int sandbox_reset_request(struct udevice *dev, enum reset_t type)
 	 * (see the U_BOOT_DEVICE() declaration below) should not do anything.
 	 * If we are that device, return an error.
 	 */
-	if (gd->fdt_blob && dev->of_offset == -1)
+	if (state->fdt_fname && dev->of_offset == -1)
 		return -ENODEV;
 
 	switch (type) {
Signature · 1 line
2.6.0.rc2.230.g3dd15c0
#1 lore raw

PATCH 1/1 sandbox: Correct operaion of 'reset' command

Quoted 7 lines · Simon Glass

Currently 'reset' only works with the test device tree. When run without a device tree, or with the normal device tree, the following error is displayed:

Reset not supported on this platform

Fix the driver and the standard device tree to avoid this.

Thanks!