Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
50 lines
1.3 KiB
C
50 lines
1.3 KiB
C
/*
|
|
* Copyright (C) 2015 MediaTek Inc.
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#ifndef __MTK_BOOT_COMMON_H__
|
|
#define __MTK_BOOT_COMMON_H__
|
|
|
|
/* boot type definitions */
|
|
enum boot_mode_t {
|
|
NORMAL_BOOT = 0,
|
|
META_BOOT = 1,
|
|
RECOVERY_BOOT = 2,
|
|
SW_REBOOT = 3,
|
|
FACTORY_BOOT = 4,
|
|
ADVMETA_BOOT = 5,
|
|
ATE_FACTORY_BOOT = 6,
|
|
ALARM_BOOT = 7,
|
|
KERNEL_POWER_OFF_CHARGING_BOOT = 8,
|
|
LOW_POWER_OFF_CHARGING_BOOT = 9,
|
|
DONGLE_BOOT = 10,
|
|
UNKNOWN_BOOT
|
|
};
|
|
|
|
/* for boot type usage */
|
|
#define BOOTDEV_NAND (0)
|
|
#define BOOTDEV_SDMMC (1)
|
|
#define BOOTDEV_UFS (2)
|
|
|
|
#define BOOT_DEV_NAME "BOOT"
|
|
#define BOOT_SYSFS "boot"
|
|
#define BOOT_MODE_SYSFS_ATTR "boot_mode"
|
|
#define BOOT_TYPE_SYSFS_ATTR "boot_type"
|
|
|
|
extern enum boot_mode_t get_boot_mode(void);
|
|
extern unsigned int get_boot_type(void);
|
|
extern bool is_meta_mode(void);
|
|
extern bool is_advanced_meta_mode(void);
|
|
extern void set_boot_mode(unsigned int bm);
|
|
|
|
#endif
|