blob: fc581df98ef74bbbe5e7d6db6304cca4a16113d0 [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
Ionela Voinescu2e8d4ed2015-12-17 13:11:50 +000016#include <arch/io.h>
Stefan Reinauer3bdd45e2015-12-14 17:31:44 -080017#include <console/console.h>
18#include <reset.h>
19
Ionela Voinescu2e8d4ed2015-12-17 13:11:50 +000020#define PISTACHIO_WD_ADDR 0xB8102100
21#define PISTACHIO_WD_SW_RST_OFFSET 0x0000
22
Stefan Reinauer3bdd45e2015-12-14 17:31:44 -080023void hard_reset(void)
24{
Ionela Voinescu2e8d4ed2015-12-17 13:11:50 +000025 /* Generate system reset */
26 write32(PISTACHIO_WD_ADDR + PISTACHIO_WD_SW_RST_OFFSET, 0x1);
Stefan Reinauer3bdd45e2015-12-14 17:31:44 -080027}