soc: xlnx: zynqmp: Add sys_arch_reboot implementation
This platform was previously using a default sys_arch_reboot implementation which did nothing. Add an implementation which uses the CRL_APB_RESET_CTRL register to initiate a soft reset (SRST) of the device. Signed-off-by: Robert Hancock <robert.hancock@calian.com>
This commit is contained in:
parent
6e27d38a4d
commit
3385861753
2 changed files with 11 additions and 0 deletions
|
@ -10,6 +10,14 @@
|
||||||
#include <zephyr/cache.h>
|
#include <zephyr/cache.h>
|
||||||
|
|
||||||
#include <cmsis_core.h>
|
#include <cmsis_core.h>
|
||||||
|
#include "soc.h"
|
||||||
|
|
||||||
|
void sys_arch_reboot(int type)
|
||||||
|
{
|
||||||
|
ARG_UNUSED(type);
|
||||||
|
|
||||||
|
sys_write32(CRL_APB_RESET_CTRL_SRST_MASK, CRL_APB_RESET_CTRL);
|
||||||
|
}
|
||||||
|
|
||||||
void soc_reset_hook(void)
|
void soc_reset_hook(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,4 +11,7 @@
|
||||||
/* Define CMSIS configurations */
|
/* Define CMSIS configurations */
|
||||||
#define __CR_REV 1U
|
#define __CR_REV 1U
|
||||||
|
|
||||||
|
#define CRL_APB_RESET_CTRL 0xFF5E0218
|
||||||
|
#define CRL_APB_RESET_CTRL_SRST_MASK BIT(4)
|
||||||
|
|
||||||
#endif /* _BOARD__H_ */
|
#endif /* _BOARD__H_ */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue