mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
sun4i: remove key check in sun4i, read misc instead
boot1 will check the key, and write information to misc
This commit is contained in:
@ -109,7 +109,6 @@ void s_init(void)
|
||||
watchdog_init();
|
||||
clock_init();
|
||||
gpio_init();
|
||||
sunxi_key_init();
|
||||
}
|
||||
|
||||
void reset_cpu(ulong addr)
|
||||
|
@ -80,8 +80,13 @@ int check_android_misc() {
|
||||
#endif
|
||||
|
||||
if(!strcmp(misc_message.command, "boot-recovery")) {
|
||||
/* there is a recovery command, return true */
|
||||
return 1;
|
||||
/* there is a recovery command */
|
||||
setenv("bootcmd", "run setargs boot_recovery");
|
||||
}
|
||||
|
||||
if(!strcmp(misc_message.command, "boot-fastboot")) {
|
||||
/* there is a fastboot command */
|
||||
setenv("bootcmd", "run setargs boot_fastboot");
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -100,29 +105,9 @@ int board_init(void)
|
||||
*/
|
||||
int board_late_init(void)
|
||||
{
|
||||
int key = 0;
|
||||
|
||||
fastboot_partition_init();
|
||||
|
||||
key = sunxi_read_key();
|
||||
|
||||
if(sunxi_check_fastboot(key)) {
|
||||
puts("Fastboot key pressed, will enter fastboot\n");
|
||||
/* set boot cmd to boot fastboot */
|
||||
setenv("bootcmd", "run setargs boot_fastboot");
|
||||
}
|
||||
|
||||
if(sunxi_check_recovery(key)) {
|
||||
puts("Recovery key pressed, will boot recovery\n");
|
||||
/* set boot cmd to boot recovery */
|
||||
setenv("bootcmd", "run setargs boot_recovery");
|
||||
}
|
||||
|
||||
if(check_android_misc()) {
|
||||
puts("Misc has recovery, will boot recovery\n");
|
||||
/* set boot cmd to boot recovery */
|
||||
setenv("bootcmd", "run setargs boot_recovery");
|
||||
}
|
||||
check_android_misc();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user