public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] sandbox: Correct operaion of 'reset' command
@ 2015-10-03 17:21 Simon Glass
  2015-10-03 19:23 ` Stephen Warren
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Glass @ 2015-10-03 17:21 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Stephen Warren <swarren@nvidia.com>
---

 arch/sandbox/dts/sandbox.dts | 4 ++++
 drivers/misc/reset_sandbox.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts
index 65b9125..08f72ac 100644
--- a/arch/sandbox/dts/sandbox.dts
+++ b/arch/sandbox/dts/sandbox.dts
@@ -153,6 +153,10 @@
 		};
 	};
 
+	reset at 1 {
+		compatible = "sandbox,reset";
+	};
+
 	spi at 0 {
 		#address-cells = <1>;
 		#size-cells = <0>;
diff --git a/drivers/misc/reset_sandbox.c b/drivers/misc/reset_sandbox.c
index 917121b..2691bb0 100644
--- a/drivers/misc/reset_sandbox.c
+++ b/drivers/misc/reset_sandbox.c
@@ -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) {
-- 
2.6.0.rc2.230.g3dd15c0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-03 19:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-03 17:21 [U-Boot] [PATCH] sandbox: Correct operaion of 'reset' command Simon Glass
2015-10-03 19:23 ` Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox