arm/xilinx-zynqmp-rpu: Implement bsp_reset()

This commit is contained in:
Sebastian Huber
2024-09-19 07:43:32 +02:00
parent 95649a0aca
commit 9624b31408

View File

@@ -39,12 +39,26 @@
void bsp_reset( rtems_fatal_source source, rtems_fatal_code code ) void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
{ {
/* CRL_APB_RESET_CTRL */
volatile uint32_t *reset_ctrl = (volatile uint32_t *) 0xff5e0218;
(void) source; (void) source;
(void) code; (void) code;
zynqmp_debug_console_flush(); zynqmp_debug_console_flush();
/*
* This is a workaround for:
*
* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108658
*/
__asm__ volatile ("");
while (true) { while (true) {
/* Wait */ /*
* Request a soft system reset. This is a system-level reset which is the
* equivalent to asserting the external PS_SRST_B reset signal pin.
*/
*reset_ctrl |= UINT32_C(0x10);
} }
} }