blob: cc563372b45b8108b7e478746c2e97efae48724f [file] [log] [blame]
Stefan Reinauer3bdd45e2015-12-14 17:31:44 -08001/*
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älkki13f66502019-03-03 08:01:05 +020016#include <device/mmio.h>
Stefan Reinauer3bdd45e2015-12-14 17:31:44 -080017#include <reset.h>
18
Ionela Voinescu2e8d4ed2015-12-17 13:11:50 +000019#define PISTACHIO_WD_ADDR 0xB8102100
20#define PISTACHIO_WD_SW_RST_OFFSET 0x0000
21
Nico Huberc6fe2652018-10-06 18:41:44 +020022void do_board_reset(void)
Stefan Reinauer3bdd45e2015-12-14 17:31:44 -080023{
Ionela Voinescu2e8d4ed2015-12-17 13:11:50 +000024 /* Generate system reset */
Kyösti Mälkkia9506db2019-03-20 20:30:02 +020025 write32_x(PISTACHIO_WD_ADDR + PISTACHIO_WD_SW_RST_OFFSET, 0x1);
Stefan Reinauer3bdd45e2015-12-14 17:31:44 -080026}