diff options
Diffstat (limited to 'drivers/sysreset')
-rw-r--r-- | drivers/sysreset/sysreset-uclass.c | 12 | ||||
-rw-r--r-- | drivers/sysreset/sysreset_sandbox.c | 6 | ||||
-rw-r--r-- | drivers/sysreset/sysreset_x86.c | 5 |
3 files changed, 12 insertions, 11 deletions
diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c index 3f5414ed1f..e69fb2255b 100644 --- a/drivers/sysreset/sysreset-uclass.c +++ b/drivers/sysreset/sysreset-uclass.c @@ -9,12 +9,13 @@ #include <common.h> #include <command.h> #include <cpu_func.h> -#include <hang.h> -#include <log.h> -#include <sysreset.h> #include <dm.h> #include <errno.h> +#include <hang.h> +#include <log.h> #include <regmap.h> +#include <spl.h> +#include <sysreset.h> #include <dm/device-internal.h> #include <dm/lists.h> #include <dm/root.h> @@ -101,7 +102,10 @@ void sysreset_walk_halt(enum sysreset_t type) mdelay(100); /* Still no reset? Give up */ - log_err("System reset not supported on this platform\n"); + if (spl_phase() <= PHASE_SPL) + log_err("no sysreset\n"); + else + log_err("System reset not supported on this platform\n"); hang(); } diff --git a/drivers/sysreset/sysreset_sandbox.c b/drivers/sysreset/sysreset_sandbox.c index 7026a48c4b..08685823e9 100644 --- a/drivers/sysreset/sysreset_sandbox.c +++ b/drivers/sysreset/sysreset_sandbox.c @@ -47,10 +47,10 @@ static int sandbox_sysreset_request(struct udevice *dev, enum sysreset_t type) /* * If we have a device tree, the device we created from platform data - * (see the U_BOOT_DEVICE() declaration below) should not do anything. + * (see the U_BOOT_DRVINFO() declaration below) should not do anything. * If we are that device, return an error. */ - if (state->fdt_fname && !dev_of_valid(dev)) + if (state->fdt_fname && !dev_has_ofnode(dev)) return -ENODEV; switch (type) { @@ -135,7 +135,7 @@ U_BOOT_DRIVER(warm_sysreset_sandbox) = { #if !CONFIG_IS_ENABLED(OF_PLATDATA) /* This is here in case we don't have a device tree */ -U_BOOT_DEVICE(sysreset_sandbox_non_fdt) = { +U_BOOT_DRVINFO(sysreset_sandbox_non_fdt) = { .name = "sysreset_sandbox", }; #endif diff --git a/drivers/sysreset/sysreset_x86.c b/drivers/sysreset/sysreset_x86.c index 8f9970301e..8042f3994f 100644 --- a/drivers/sysreset/sysreset_x86.c +++ b/drivers/sysreset/sysreset_x86.c @@ -13,10 +13,7 @@ #include <acpi/acpi_s3.h> #include <asm/io.h> #include <asm/processor.h> - -struct x86_sysreset_plat { - struct udevice *pch; -}; +#include <asm/sysreset.h> /* * Power down the machine by using the power management sleep control |