diff options
author | Maxim Uvarov <maxim.uvarov@linaro.org> | 2021-07-08 11:59:18 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2021-10-11 17:33:29 +0300 |
commit | bd2ad12ef10f558a5b15f5768b66e7b2606c6498 (patch) | |
tree | f8fa93712a57828bf078e577a61008b85105100e /plat/qemu | |
parent | a43179a694db10faac859c3377a3e698a0097f22 (diff) |
fix(plat/qemu): reboot/shutdown with low to high gpio
Use low to high gpio sequence to reboot/shutdown qemu machine.
Use low to high gpio pins level change which will cause an interrupt
in qemu virt platform. This change will supported with next qemu 6.1
release once patchset:
hw/arm: Make virt board secure powerdown/reset work
will be merged.
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
CC: Peter Maydell <peter.maydell@linaro.org>
Change-Id: I70979517358c3b587722b2dcb33f63d29bf79d9b
Diffstat (limited to 'plat/qemu')
-rw-r--r-- | plat/qemu/common/qemu_pm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plat/qemu/common/qemu_pm.c b/plat/qemu/common/qemu_pm.c index c4ffcf9229..c2b5091d48 100644 --- a/plat/qemu/common/qemu_pm.c +++ b/plat/qemu/common/qemu_pm.c @@ -208,8 +208,8 @@ static void __dead2 qemu_system_off(void) #ifdef SECURE_GPIO_BASE ERROR("QEMU System Power off: with GPIO.\n"); gpio_set_direction(SECURE_GPIO_POWEROFF, GPIO_DIR_OUT); - gpio_set_value(SECURE_GPIO_POWEROFF, GPIO_LEVEL_HIGH); gpio_set_value(SECURE_GPIO_POWEROFF, GPIO_LEVEL_LOW); + gpio_set_value(SECURE_GPIO_POWEROFF, GPIO_LEVEL_HIGH); #else semihosting_exit(ADP_STOPPED_APPLICATION_EXIT, 0); ERROR("QEMU System Off: semihosting call unexpectedly returned.\n"); @@ -222,8 +222,8 @@ static void __dead2 qemu_system_reset(void) ERROR("QEMU System Reset: with GPIO.\n"); #ifdef SECURE_GPIO_BASE gpio_set_direction(SECURE_GPIO_RESET, GPIO_DIR_OUT); - gpio_set_value(SECURE_GPIO_RESET, GPIO_LEVEL_HIGH); gpio_set_value(SECURE_GPIO_RESET, GPIO_LEVEL_LOW); + gpio_set_value(SECURE_GPIO_RESET, GPIO_LEVEL_HIGH); #else ERROR("QEMU System Reset: operation not handled.\n"); #endif |