Commit | Line | Data |
---|---|---|
6fa3eb70 S |
1 | /* |
2 | * | |
3 | * | |
4 | * Copyright (C) 2008,2009 MediaTek <www.mediatek.com> | |
5 | * Authors: Infinity Chen <infinity.chen@mediatek.com> | |
6 | * | |
7 | * This program is free software; you can redistribute it and/or modify | |
8 | * it under the terms of the GNU General Public License as published by | |
9 | * the Free Software Foundation; either version 2 of the License, or | |
10 | * (at your option) any later version. | |
11 | * | |
12 | * This program is distributed in the hope that it will be useful, | |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | * GNU General Public License for more details. | |
16 | * | |
17 | * You should have received a copy of the GNU General Public License | |
18 | * along with this program; if not, write to the Free Software | |
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
20 | */ | |
21 | ||
22 | #ifndef __MT_BOOT_COMMON_H__ | |
23 | #define __MT_BOOT_COMMON_H__ | |
24 | ||
25 | /* boot type definitions */ | |
26 | typedef enum { | |
27 | NORMAL_BOOT = 0, | |
28 | META_BOOT = 1, | |
29 | RECOVERY_BOOT = 2, | |
30 | SW_REBOOT = 3, | |
31 | FACTORY_BOOT = 4, | |
32 | ADVMETA_BOOT = 5, | |
33 | ATE_FACTORY_BOOT = 6, | |
34 | ALARM_BOOT = 7, | |
35 | #if defined(CONFIG_MTK_KERNEL_POWER_OFF_CHARGING) | |
36 | KERNEL_POWER_OFF_CHARGING_BOOT = 8, | |
37 | LOW_POWER_OFF_CHARGING_BOOT = 9, | |
38 | #endif | |
39 | UNKNOWN_BOOT | |
40 | } BOOTMODE; | |
41 | ||
42 | #define BOOT_DEV_NAME "BOOT" | |
43 | #define BOOT_SYSFS "boot" | |
44 | #define BOOT_SYSFS_ATTR "boot_mode" | |
45 | ||
46 | extern BOOTMODE g_boot_mode; | |
47 | extern BOOTMODE get_boot_mode(void); | |
48 | extern bool is_meta_mode(void); | |
49 | extern bool is_advanced_meta_mode(void); | |
50 | extern void set_boot_mode(BOOTMODE bm); | |
51 | ||
52 | #endif |