blob: aadecba334047eac4190bce1625371e5c4189b93 [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);
Sheng-Liang Song1d6560f2014-04-30 15:46:45 -070014
Aaron Durbinbc98cc62015-09-02 09:21:36 -050015/* Return 1 if display initialization is required. 0 if not. */
16int display_init_required(void);
Kyösti Mälkkiab56b3b2013-11-28 16:44:51 +020017int gfx_get_init_done(void);
18void gfx_set_init_done(int done);
19
Bill XIE516c0a52020-02-24 23:08:35 +080020/*
21 * Determine if the platform is resuming from suspend. Returns 0 when
22 * not resuming, > 0 if resuming, and < 0 on error.
23 */
24int platform_is_resuming(void);
25
Kyösti Mälkki5687fc92013-11-28 18:11:49 +020026#endif /* __BOOTMODE_H__ */