2 * This file is part of the coreboot project.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
17 #include <soc/northbridge.h>
18 #include <soc/pci_devs.h>
19 #include <device/pci_ops.h>
20 #include <soc/southbridge.h>
21 #include <amdblocks/acpimmio.h>
22 #include <amdblocks/reset.h>
24 void set_warm_reset_flag(void)
26 uint8_t ncp
= inw(NCP_ERR
);
28 outb(NCP_ERR
, ncp
| NCP_WARM_BOOT
);
31 int is_warm_reset(void)
33 return !!(inb(NCP_ERR
) & NCP_WARM_BOOT
);
36 void do_cold_reset(void)
38 /* De-assert and then assert all PwrGood signals on CF9 reset. */
39 pm_write16(PWR_RESET_CFG
, pm_read16(PWR_RESET_CFG
) |
41 outb(RST_CMD
| SYS_RST
, SYS_RESET
);
44 void do_warm_reset(void)
46 set_warm_reset_flag();
48 /* Assert reset signals only. */
49 outb(RST_CMD
| SYS_RST
, SYS_RESET
);
52 void do_board_reset(void)
54 /* TODO: Would a warm_reset() suffice? */