diff options
Diffstat (limited to 'board/freescale/mx6sabresd/mx6sabresd.c')
-rw-r--r-- | board/freescale/mx6sabresd/mx6sabresd.c | 89 |
1 files changed, 2 insertions, 87 deletions
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index b655347..2a09e2f 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -1353,47 +1353,6 @@ int checkboard(void) } #ifdef CONFIG_FSL_FASTBOOT - -void board_fastboot_setup(void) -{ - switch (get_boot_device()) { -#if defined(CONFIG_FASTBOOT_STORAGE_SATA) - case SATA_BOOT: - if (!getenv("fastboot_dev")) - setenv("fastboot_dev", "sata"); - if (!getenv("bootcmd")) - setenv("bootcmd", "boota sata"); - break; -#endif /*CONFIG_FASTBOOT_STORAGE_SATA*/ -#if defined(CONFIG_FASTBOOT_STORAGE_MMC) - case SD2_BOOT: - case MMC2_BOOT: - if (!getenv("fastboot_dev")) - setenv("fastboot_dev", "mmc0"); - if (!getenv("bootcmd")) - setenv("bootcmd", "boota mmc0"); - break; - case SD3_BOOT: - case MMC3_BOOT: - if (!getenv("fastboot_dev")) - setenv("fastboot_dev", "mmc1"); - if (!getenv("bootcmd")) - setenv("bootcmd", "boota mmc1"); - break; - case MMC4_BOOT: - if (!getenv("fastboot_dev")) - setenv("fastboot_dev", "mmc2"); - if (!getenv("bootcmd")) - setenv("bootcmd", "boota mmc2"); - break; -#endif /*CONFIG_FASTBOOT_STORAGE_MMC*/ - default: - printf("unsupported boot devices\n"); - break; - } - -} - #ifdef CONFIG_ANDROID_RECOVERY #define GPIO_VOL_DN_KEY IMX_GPIO_NR(1, 5) @@ -1401,12 +1360,9 @@ iomux_v3_cfg_t const recovery_key_pads[] = { (MX6_PAD_GPIO_5__GPIO1_IO05 | MUX_PAD_CTRL(NO_PAD_CTRL)), }; -int check_recovery_cmd_file(void) +int is_recovery_key_pressing(void) { int button_pressed = 0; - int recovery_mode = 0; - - recovery_mode = recovery_check_and_clean_flag(); /* Check Recovery Combo Button press or not. */ imx_iomux_v3_setup_multiple_pads(recovery_key_pads, @@ -1420,48 +1376,7 @@ int check_recovery_cmd_file(void) printf("Recovery key pressed\n"); } - return recovery_mode || button_pressed; -} - -void board_recovery_setup(void) -{ - int bootdev = get_boot_device(); - - switch (bootdev) { -#if defined(CONFIG_FASTBOOT_STORAGE_SATA) - case SATA_BOOT: - if (!getenv("bootcmd_android_recovery")) - setenv("bootcmd_android_recovery", - "boota sata recovery"); - break; -#endif /*CONFIG_FASTBOOT_STORAGE_SATA*/ -#if defined(CONFIG_FASTBOOT_STORAGE_MMC) - case SD2_BOOT: - case MMC2_BOOT: - if (!getenv("bootcmd_android_recovery")) - setenv("bootcmd_android_recovery", - "boota mmc0 recovery"); - break; - case SD3_BOOT: - case MMC3_BOOT: - if (!getenv("bootcmd_android_recovery")) - setenv("bootcmd_android_recovery", - "boota mmc1 recovery"); - break; - case MMC4_BOOT: - if (!getenv("bootcmd_android_recovery")) - setenv("bootcmd_android_recovery", - "boota mmc2 recovery"); - break; -#endif /*CONFIG_FASTBOOT_STORAGE_MMC*/ - default: - printf("Unsupported bootup device for recovery: dev: %d\n", - bootdev); - return; - } - - printf("setup env for recovery..\n"); - setenv("bootcmd", "run bootcmd_android_recovery"); + return button_pressed; } #endif /*CONFIG_ANDROID_RECOVERY*/ |