提交 7bb91dd1 编写于 作者: S Simon Glass

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.
Signed-off-by: NSimon Glass <sjg@chromium.org>
Reported-by: NStephen Warren <swarren@nvidia.com>
Tested-by: NStephen Warren <swarren@wwwdotorg.org>
上级 cbfc2ff9
......@@ -153,6 +153,10 @@
};
};
reset@1 {
compatible = "sandbox,reset";
};
spi@0 {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册