3 #include <asm/arch/sci_types.h>
4 #define CHECK_BOOTMODE_FUN_NUM 20
18 CMD_UNKNOW_REBOOT_MODE,
22 CMD_AUTODLOADER_REBOOT,
23 CMD_EXT_RSTN_REBOOT_MODE,
28 typedef boot_mode_enum_type (*CBOOT_FUNC) (void);
29 typedef void (*CBOOT_MODE_ENTRY) (void);
31 #define MODE_REGIST(index, fun) \
36 boot_mode_enum_type get_mode_from_pctool(void);
37 #ifndef CONFIG_MACH_CORI
38 #if !defined(CONFIG_KANAS_W) && !defined(CONFIG_KANAS_TD)
39 boot_mode_enum_type get_mode_from_bat_low (void);
42 #ifdef CONFIG_SPRD_SYSDUMP
43 boot_mode_enum_type write_sysdump_before_boot_extend (void);
45 boot_mode_enum_type get_mode_from_file_extend (void);
46 boot_mode_enum_type get_mode_from_watchdog (void);
47 boot_mode_enum_type get_mode_from_alarm_register(void);
48 boot_mode_enum_type get_mode_from_charger(void);
49 boot_mode_enum_type get_mode_from_keypad(void);
50 boot_mode_enum_type get_mode_from_gpio_extend(void);
52 int get_mode_from_file(void);
53 void normal_mode(void);
54 void calibration_mode(void);
55 void autotest_mode(void);
56 void recovery_mode(void);
57 void charge_mode(void);
58 void fastboot_mode(void);
60 void factorytest_mode(void);
61 void alarm_mode(void);
62 BOOLEAN calibration_detect(int key);
63 void engtest_mode(void);
64 void watchdog_mode(void);
65 void unknow_reboot_mode(void);
66 void special_mode(void);
67 void panic_reboot_mode(void);
68 #ifdef CONFIG_AUTODLOADER
69 void autodloader_mode(void);
71 #define autodloader_mode() do {} while (0)
75 int alarm_flag_check(void);
76 int cali_file_check(void);
77 int read_adc_calibration_data(char *buffer,int size);
78 #define RECOVERY_MODE 0x77665502
79 #define FASTBOOT_MODE 0x77665500
80 #define NORMAL_MODE 0x77665503
81 #define ALARM_MODE 0x77665504
82 #define SLEEP_MODE 0x77665505
83 #define WATCHDOG_REBOOT 0x77665506
84 #define SPECIAL_MODE 0x77665507
85 #define UNKNOW_REBOOT_MODE 0x77665508
86 #define PANIC_REBOOT 0x77665509
87 #define CALIBRATION_MODE 0x7766550a
88 #define AUTODLOADER_REBOOT 0x77665510
89 #define EXT_RSTN_REBOOT_MODE 0x77665511
90 #define IQ_REBOOT_MODE 0x77665512
91 #define FACTORYTEST_MODE 0x77665513
92 #define THOR_MODE 0x77665514
94 #define BOOT_FASTBOOT FASTBOOT_MODE
95 #define BOOT_RECOVERY RECOVERY_MODE
96 #define BOOT_CALIBRATE CALIBRATION_MODE
97 #define BOOT_FACTORYTEST FACTORYTEST_MODE
98 #define BOOT_THOR_DOWNLOAD THOR_MODE
99 #define BOOT_DLOADER 0xf5
101 #define BACKLIGHT_ON 1
102 #define BACKLIGHT_OFF 0
104 extern unsigned int check_key_boot(unsigned char key);
105 extern void vlx_nand_boot(char * kernel_pname, char * cmdline, int backlight_set);