| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <arch/io.h> |
| 4 | #include <cf9_reset.h> |
| 5 | #include <reset.h> |
| 6 | #include <soc/southbridge.h> |
| 7 | #include <amdblocks/acpimmio.h> |
| 8 | #include <amdblocks/reset.h> |
| 9 | |
| 10 | void do_cold_reset(void) |
| 11 | { |
| 12 | set_resets_to_cold(); |
| 13 | outb(RST_CPU | SYS_RST, RST_CNT); |
| 14 | } |
| 15 | |
| 16 | void do_warm_reset(void) |
| 17 | { |
| 18 | /* If warm resets are not supported, executed a cold reset */ |
| 19 | if (!CONFIG(SOC_AMD_SUPPORTS_WARM_RESET)) |
| 20 | do_cold_reset(); /* Does not return */ |
| 21 | |
| 22 | outb(RST_CPU | SYS_RST, RST_CNT); |
| 23 | } |
| 24 | |
| 25 | void do_board_reset(void) |
| 26 | { |
| 27 | do_cold_reset(); |
| 28 | } |