blob: 90fedda9047e7dcfddec7f59a993d4abc944402c [file] [log] [blame]
Felix Held3c44c622022-01-10 20:57:29 +01001/* SPDX-License-Identifier: GPL-2.0-only */
2
3/* TODO: Check if this is still correct */
4
5#include <arch/io.h>
6#include <cf9_reset.h>
7#include <reset.h>
8#include <soc/southbridge.h>
9#include <amdblocks/acpimmio.h>
10#include <amdblocks/reset.h>
11
12void do_cold_reset(void)
13{
14 /* De-assert and then assert all PwrGood signals on CF9 reset. */
15 pm_write16(PWR_RESET_CFG, pm_read16(PWR_RESET_CFG) |
16 TOGGLE_ALL_PWR_GOOD);
17 outb(RST_CPU | SYS_RST, RST_CNT);
18}
19
20void do_warm_reset(void)
21{
22 /* Warm resets are not supported and must be executed as cold */
23 pm_write16(PWR_RESET_CFG, pm_read16(PWR_RESET_CFG) |
24 TOGGLE_ALL_PWR_GOOD);
25 outb(RST_CPU | SYS_RST, RST_CNT);
26}
27
28void do_board_reset(void)
29{
30 do_cold_reset();
31}