blob: da2dbf65657beb0743fc7b95f54f1e3e1c78fe7f [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älkkie3ddee02014-05-03 10:45:28 +03006/* functions implemented per mainboard: */
7void init_bootmode_straps(void);
Kyösti Mälkki16455892014-04-28 23:41:06 +03008int get_write_protect_state(void);
Kyösti Mälkki5687fc92013-11-28 18:11:49 +02009int get_recovery_mode_switch(void);
Furquan Shaikh470852b2016-11-05 23:52:08 -070010int get_recovery_mode_retrain_switch(void);
Sheng-Liang Song1d6560f2014-04-30 15:46:45 -070011int clear_recovery_mode_switch(void);
Vadim Bendeburyfe4253c2015-03-12 19:22:51 -070012int get_wipeout_mode_switch(void);
Patrick Georgi08b87852015-05-28 11:59:33 +020013int get_lid_switch(void);
Hsuan-ting Chen642508a2021-10-27 10:59:41 +000014int get_ec_is_trusted(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__ */