2 * Copyright (C) 2012 Altera Corporation <www.altera.com>
4 * SPDX-License-Identifier: GPL-2.0+
9 #include <asm/arch/reset_manager.h>
11 DECLARE_GLOBAL_DATA_PTR;
13 static const struct socfpga_reset_manager *reset_manager_base =
14 (void *)SOCFPGA_RSTMGR_ADDRESS;
17 * Write the reset manager register to cause reset
19 void reset_cpu(ulong addr)
21 /* request a warm reset */
22 writel(RSTMGR_CTRL_SWWARMRSTREQ_LSB, &reset_manager_base->ctrl);
24 * infinite loop here as watchdog will trigger and reset
32 * Release peripherals from reset based on handoff
34 void reset_deassert_peripherals_handoff(void)
36 writel(0, &reset_manager_base->per_mod_reset);
41 gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);