3 * This file is part of the coreboot project.
5 * Copyright (c) 2014, The Linux Foundation. All rights reserved.
6 * Copyright 2014 Google Inc.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 2 of the License.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
18 #include <console/console.h>
19 #include <soc/iomap.h>
22 /* Watchdog bite time set to default reset value */
23 #define RESET_WDT_BITE_TIME 0x31F3
25 /* Watchdog bark time value is kept larger than the watchdog timeout
26 * of 0x31F3, effectively disabling the watchdog bark interrupt
28 #define RESET_WDT_BARK_TIME (5 * RESET_WDT_BITE_TIME)
30 static void wdog_reset(void)
32 printk(BIOS_DEBUG
, "\nResetting with watchdog!\n");
34 write32(APCS_WDT0_EN
, 0);
35 write32(APCS_WDT0_RST
, 1);
36 write32(APCS_WDT0_BARK_TIME
, RESET_WDT_BARK_TIME
);
37 write32(APCS_WDT0_BITE_TIME
, RESET_WDT_BITE_TIME
);
38 write32(APCS_WDT0_EN
, 1);
39 write32(APCS_WDT0_CPU0_WDOG_EXPIRED_ENABLE
, 1);
42 void do_board_reset(void)