Skip to content

Commit

Permalink
zynq7000: Fix system reboot on pctl_get on pctl_reboot
Browse files Browse the repository at this point in the history
DONE: RTOS-940
  • Loading branch information
agkaminski committed Oct 9, 2024
1 parent 90cefb5 commit 7934e7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit 7934e7e

Please sign in to comment.