Martin Roth | 433659a | 2014-05-12 21:55:00 -0600 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2013 Google Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
Martin Roth | 433659a | 2014-05-12 21:55:00 -0600 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | #include <arch/io.h> |
Ben Gardner | fa6014a | 2015-12-08 21:20:25 -0600 | [diff] [blame] | 17 | #include <soc/pmc.h> |
| 18 | #include <soc/reset.h> |
Martin Roth | 433659a | 2014-05-12 21:55:00 -0600 | [diff] [blame] | 19 | |
| 20 | void cold_reset(void) |
| 21 | { |
| 22 | /* S0->S5->S0 trip. */ |
| 23 | outb(RST_CPU | SYS_RST | FULL_RST, RST_CNT); |
| 24 | } |
| 25 | |
| 26 | void warm_reset(void) |
| 27 | { |
| 28 | /* PMC_PLTRST# asserted. */ |
| 29 | outb(RST_CPU | SYS_RST, RST_CNT); |
| 30 | } |
| 31 | |
| 32 | void soft_reset(void) |
| 33 | { |
| 34 | /* Sends INIT# to CPU */ |
| 35 | outb(RST_CPU, RST_CNT); |
| 36 | } |
| 37 | |
| 38 | void hard_reset(void) |
| 39 | { |
| 40 | /* Don't power cycle on hard_reset(). It's not really clear what the |
| 41 | * semantics should be for the meaning of hard_reset(). */ |
| 42 | warm_reset(); |
| 43 | } |