Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zynq7000: Fix system reboot on pctl_get on pctl_reboot #605

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion hal/armv7a/zynq7000/zynq.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,10 @@ int hal_platformctl(void *ptr)
break;

case pctl_reboot:
zynq_softRst();
if ((data->action == pctl_set) && (data->reboot.magic == PCTL_REBOOT_MAGIC)) {
zynq_softRst();
}
/* TODO add boot reason for pctl_get */
break;

case pctl_sdwpcd:
Expand Down
2 changes: 2 additions & 0 deletions include/arch/armv7a/zynq7000/zynq7000.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#ifndef _PHOENIX_ARCH_ZYNQ7000_H_
#define _PHOENIX_ARCH_ZYNQ7000_H_

#define PCTL_REBOOT_MAGIC 0xaa55aa55UL

/* clang-format off */

/* AMBA peripherals */
Expand Down
Loading