1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2013 Altera Corporation <www.altera.com>
9 #include <asm/arch/reset_manager.h>
11 #if defined(CONFIG_TARGET_SOCFPGA_STRATIX10)
12 #include <asm/arch/mailbox_s10.h>
15 DECLARE_GLOBAL_DATA_PTR;
17 #if !defined(CONFIG_TARGET_SOCFPGA_STRATIX10)
18 static const struct socfpga_reset_manager *reset_manager_base =
19 (void *)SOCFPGA_RSTMGR_ADDRESS;
23 * Write the reset manager register to cause reset
25 void reset_cpu(ulong addr)
27 /* request a warm reset */
28 #if defined(CONFIG_TARGET_SOCFPGA_STRATIX10)
29 puts("Mailbox: Issuing mailbox cmd REBOOT_HPS\n");
32 writel(1 << RSTMGR_CTRL_SWWARMRSTREQ_LSB,
33 &reset_manager_base->ctrl);
36 * infinite loop here as watchdog will trigger and reset