Ovidiu Panait | 2c82391 | 2020-11-28 10:43:18 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * (C) Copyright 2003 |
| 4 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 5 | */ |
| 6 | |
Simon Glass | a3702ba | 2023-12-15 20:14:07 -0700 | [diff] [blame] | 7 | #include <command.h> |
| 8 | #include <cpu_func.h> |
Ovidiu Panait | 2c82391 | 2020-11-28 10:43:18 +0200 | [diff] [blame] | 9 | #include <init.h> |
Simon Glass | 3ba929a | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 10 | #include <asm/global_data.h> |
Ovidiu Panait | 2c82391 | 2020-11-28 10:43:18 +0200 | [diff] [blame] | 11 | |
| 12 | DECLARE_GLOBAL_DATA_PTR; |
| 13 | |
| 14 | void trap_init(unsigned long reloc_addr); |
| 15 | |
| 16 | int arch_initr_trap(void) |
| 17 | { |
| 18 | trap_init(gd->relocaddr); |
| 19 | |
| 20 | return 0; |
| 21 | } |
Simon Glass | a3702ba | 2023-12-15 20:14:07 -0700 | [diff] [blame] | 22 | |
| 23 | #ifndef CONFIG_SYSRESET |
| 24 | void reset_cpu(void) |
| 25 | { |
| 26 | /* TODO: Refactor all the do_reset calls to be reset_cpu() instead */ |
| 27 | do_reset(NULL, 0, 0, NULL); |
| 28 | } |
| 29 | #endif |