blob: 42cc0920ff67b4731a843b9e0334fa5bcc5feae2 [file] [log] [blame]
Angel Pons32859fc2020-04-02 23:48:27 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2/* This file is part of the coreboot project. */
Kyösti Mälkki5687fc92013-11-28 18:11:49 +02003
4#ifndef __BOOTMODE_H__
5#define __BOOTMODE_H__
6
Kyösti Mälkkie3ddee02014-05-03 10:45:28 +03007/* functions implemented per mainboard: */
8void init_bootmode_straps(void);
Kyösti Mälkki16455892014-04-28 23:41:06 +03009int get_write_protect_state(void);
Kyösti Mälkki5687fc92013-11-28 18:11:49 +020010int get_recovery_mode_switch(void);
Furquan Shaikh470852b2016-11-05 23:52:08 -070011int get_recovery_mode_retrain_switch(void);
Sheng-Liang Song1d6560f2014-04-30 15:46:45 -070012int clear_recovery_mode_switch(void);
Vadim Bendeburyfe4253c2015-03-12 19:22:51 -070013int get_wipeout_mode_switch(void);
Patrick Georgi08b87852015-05-28 11:59:33 +020014int get_lid_switch(void);
Sheng-Liang Song1d6560f2014-04-30 15:46:45 -070015
Aaron Durbinbc98cc62015-09-02 09:21:36 -050016/* Return 1 if display initialization is required. 0 if not. */
17int display_init_required(void);
Kyösti Mälkkiab56b3b2013-11-28 16:44:51 +020018int gfx_get_init_done(void);
19void gfx_set_init_done(int done);
20
Bill XIE516c0a52020-02-24 23:08:35 +080021/*
22 * Determine if the platform is resuming from suspend. Returns 0 when
23 * not resuming, > 0 if resuming, and < 0 on error.
24 */
25int platform_is_resuming(void);
26
Kyösti Mälkki5687fc92013-11-28 18:11:49 +020027#endif /* __BOOTMODE_H__ */