Stefan Reinauer | 3bdd45e | 2015-12-14 17:31:44 -0800 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright 2014 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 | |
Kyösti Mälkki | 13f6650 | 2019-03-03 08:01:05 +0200 | [diff] [blame] | 16 | #include <device/mmio.h> |
Stefan Reinauer | 3bdd45e | 2015-12-14 17:31:44 -0800 | [diff] [blame] | 17 | #include <reset.h> |
| 18 | |
Ionela Voinescu | 2e8d4ed | 2015-12-17 13:11:50 +0000 | [diff] [blame] | 19 | #define PISTACHIO_WD_ADDR 0xB8102100 |
| 20 | #define PISTACHIO_WD_SW_RST_OFFSET 0x0000 |
| 21 | |
Nico Huber | c6fe265 | 2018-10-06 18:41:44 +0200 | [diff] [blame] | 22 | void do_board_reset(void) |
Stefan Reinauer | 3bdd45e | 2015-12-14 17:31:44 -0800 | [diff] [blame] | 23 | { |
Ionela Voinescu | 2e8d4ed | 2015-12-17 13:11:50 +0000 | [diff] [blame] | 24 | /* Generate system reset */ |
Kyösti Mälkki | a9506db | 2019-03-20 20:30:02 +0200 | [diff] [blame] | 25 | write32_x(PISTACHIO_WD_ADDR + PISTACHIO_WD_SW_RST_OFFSET, 0x1); |
Stefan Reinauer | 3bdd45e | 2015-12-14 17:31:44 -0800 | [diff] [blame] | 26 | } |