blob: 12c9f58c923210f945e5b1b3bef899340ce832e0 [file] [log] [blame]
Angel Pons32859fc2020-04-02 23:48:27 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Kyösti Mälkki5687fc92013-11-28 18:11:49 +02002
3#ifndef __BOOTMODE_H__
4#define __BOOTMODE_H__
5
Kyösti Mälkkie50bb8f2021-11-02 18:16:32 +02006#include <stdbool.h>
7
Kyösti Mälkkie3ddee02014-05-03 10:45:28 +03008/* functions implemented per mainboard: */
9void init_bootmode_straps(void);
Kyösti Mälkki16455892014-04-28 23:41:06 +030010int get_write_protect_state(void);
Kyösti Mälkki5687fc92013-11-28 18:11:49 +020011int get_recovery_mode_switch(void);
Furquan Shaikh470852b2016-11-05 23:52:08 -070012int get_recovery_mode_retrain_switch(void);
Sheng-Liang Song1d6560f2014-04-30 15:46:45 -070013int clear_recovery_mode_switch(void);
Vadim Bendeburyfe4253c2015-03-12 19:22:51 -070014int get_wipeout_mode_switch(void);
Patrick Georgi08b87852015-05-28 11:59:33 +020015int get_lid_switch(void);
Hsuan-ting Chen642508a2021-10-27 10:59:41 +000016int get_ec_is_trusted(void);
Sheng-Liang Song1d6560f2014-04-30 15:46:45 -070017
Aaron Durbinbc98cc62015-09-02 09:21:36 -050018/* Return 1 if display initialization is required. 0 if not. */
19int display_init_required(void);
Kyösti Mälkkiab56b3b2013-11-28 16:44:51 +020020int gfx_get_init_done(void);
21void gfx_set_init_done(int done);
22
Bill XIE516c0a52020-02-24 23:08:35 +080023/*
24 * Determine if the platform is resuming from suspend. Returns 0 when
25 * not resuming, > 0 if resuming, and < 0 on error.
26 */
27int platform_is_resuming(void);
28
Kyösti Mälkki5687fc92013-11-28 18:11:49 +020029#endif /* __BOOTMODE_H__ */