Jacob Chen | c95f378 | 2016-09-19 18:46:28 +0800 | [diff] [blame] | 1 | #ifndef __REBOOT_MODE_H |
| 2 | #define __REBOOT_MODE_H |
| 3 | |
| 4 | /* high 24 bits is tag, low 8 bits is type */ |
| 5 | #define REBOOT_FLAG 0x5242C300 |
| 6 | /* normal boot */ |
| 7 | #define BOOT_NORMAL (REBOOT_FLAG + 0) |
| 8 | /* enter loader rockusb mode */ |
| 9 | #define BOOT_LOADER (REBOOT_FLAG + 1) |
| 10 | /* enter recovery */ |
| 11 | #define BOOT_RECOVERY (REBOOT_FLAG + 3) |
| 12 | /* enter fastboot mode */ |
| 13 | #define BOOT_FASTBOOT (REBOOT_FLAG + 9) |
| 14 | /* enter charging mode */ |
| 15 | #define BOOT_CHARGING (REBOOT_FLAG + 11) |
| 16 | /* enter usb mass storage mode */ |
| 17 | #define BOOT_UMS (REBOOT_FLAG + 12) |
Andy Yan | d2349d9 | 2017-10-11 15:00:49 +0800 | [diff] [blame] | 18 | /* enter bootrom download mode */ |
| 19 | #define BOOT_BROM_DOWNLOAD 0xEF08A53C |
Jacob Chen | c95f378 | 2016-09-19 18:46:28 +0800 | [diff] [blame] | 20 | |
Andy Yan | d2349d9 | 2017-10-11 15:00:49 +0800 | [diff] [blame] | 21 | #ifndef __ASSEMBLY__ |
Andy Yan | 70378cb | 2017-10-11 15:00:16 +0800 | [diff] [blame] | 22 | int setup_boot_mode(void); |
Andy Yan | d2349d9 | 2017-10-11 15:00:49 +0800 | [diff] [blame] | 23 | #endif |
Andy Yan | 70378cb | 2017-10-11 15:00:16 +0800 | [diff] [blame] | 24 | |
Jacob Chen | c95f378 | 2016-09-19 18:46:28 +0800 | [diff] [blame] | 25 | #endif |