Aaron Durbin | 6ecdb68 | 2013-10-10 20:54:57 -0500 | [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. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | */ |
| 19 | |
| 20 | #include <arch/io.h> |
| 21 | #include <baytrail/pmc.h> |
| 22 | #include <baytrail/reset.h> |
| 23 | |
| 24 | void cold_reset(void) |
| 25 | { |
| 26 | /* S0->S5->S0 trip. */ |
| 27 | outb(RST_CPU | SYS_RST | FULL_RST, RST_CNT); |
| 28 | } |
| 29 | |
| 30 | void warm_reset(void) |
| 31 | { |
| 32 | /* PMC_PLTRST# asserted. */ |
| 33 | outb(RST_CPU | SYS_RST, RST_CNT); |
| 34 | } |
| 35 | |
| 36 | void soft_reset(void) |
| 37 | { |
| 38 | /* Sends INIT# to CPU */ |
| 39 | outb(RST_CPU, RST_CNT); |
| 40 | } |
| 41 | |
| 42 | void hard_reset(void) |
| 43 | { |
| 44 | /* Don't power cycle on hard_reset(). It's not really clear what the |
| 45 | * semantics should be for the meaning of hard_reset(). */ |
| 46 | warm_reset(); |
| 47 | } |