blob: 9eadf1f876ee7209743207ffb639d6471937f806 [file] [log] [blame]
Gabe Blackd3163ab2013-05-16 05:53:40 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright 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.
Gabe Blackd3163ab2013-05-16 05:53:40 -070014 */
15
Julius Werner80af4422014-10-20 13:18:56 -070016#include <soc/gpio.h>
17#include <soc/wakeup.h>
Gabe Blackd3163ab2013-05-16 05:53:40 -070018
19int wakeup_need_reset(void)
20{
21 /* The "wake up" event is not reliable (known as "bad wakeup") and needs
Gabe Blackaa6061a2013-07-31 23:40:55 -070022 * reset if the TPM reset mask GPIO value is high. */
23 return gpio_get_value(GPIO_X06);
Gabe Blackd3163ab2013-05-16 05:53:40 -070024}