mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 12:56:00 +01:00
Revert "ARM: meson: Add support for fastboot_set_reboot_flag()"
With the introduction of a generic reboot flag implemented in commit a362ce214f ("fastboot: Implement generic fastboot_set_reboot_flag"), we no longer need the custom PSCI implementation to handle the reboot reason. This reverts commit 9a34dedfae0ebb031a45324c2fed8c39b2c6fcf2. Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
9dab27a4c9
commit
0e577643f5
@ -22,10 +22,7 @@
|
|||||||
#include <efi_loader.h>
|
#include <efi_loader.h>
|
||||||
#include <u-boot/crc.h>
|
#include <u-boot/crc.h>
|
||||||
|
|
||||||
#if CONFIG_IS_ENABLED(FASTBOOT)
|
|
||||||
#include <asm/psci.h>
|
#include <asm/psci.h>
|
||||||
#include <fastboot.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
@ -152,38 +149,7 @@ int board_late_init(void)
|
|||||||
return meson_board_late_init();
|
return meson_board_late_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_IS_ENABLED(FASTBOOT)
|
|
||||||
static unsigned int reboot_reason = REBOOT_REASON_NORMAL;
|
|
||||||
|
|
||||||
int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason)
|
|
||||||
{
|
|
||||||
if (reason != FASTBOOT_REBOOT_REASON_BOOTLOADER)
|
|
||||||
return -ENOTSUPP;
|
|
||||||
|
|
||||||
reboot_reason = REBOOT_REASON_BOOTLOADER;
|
|
||||||
|
|
||||||
printf("Using reboot reason: 0x%x\n", reboot_reason);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void reset_cpu(void)
|
|
||||||
{
|
|
||||||
struct pt_regs regs;
|
|
||||||
|
|
||||||
regs.regs[0] = ARM_PSCI_0_2_FN_SYSTEM_RESET;
|
|
||||||
regs.regs[1] = reboot_reason;
|
|
||||||
|
|
||||||
printf("Rebooting with reason: 0x%lx\n", regs.regs[1]);
|
|
||||||
|
|
||||||
smc_call(®s);
|
|
||||||
|
|
||||||
while (1)
|
|
||||||
;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
void reset_cpu(void)
|
void reset_cpu(void)
|
||||||
{
|
{
|
||||||
psci_system_reset();
|
psci_system_reset();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user