diff options
22 files changed, 220 insertions, 367 deletions
diff --git a/board/freescale/common/recovery.c b/board/freescale/common/recovery.c index 73f091bfbef..6a402caadf9 100644 --- a/board/freescale/common/recovery.c +++ b/board/freescale/common/recovery.c @@ -20,7 +20,7 @@ */ #include <common.h> #include <malloc.h> -#include "recovery.h" +#include <recovery.h> #ifdef CONFIG_MXC_KPD #include <mxc_keyb.h> #endif diff --git a/board/freescale/mx50_rdp/mx50_rdp.c b/board/freescale/mx50_rdp/mx50_rdp.c index a56284f1f93..6f3deb7bab4 100644 --- a/board/freescale/mx50_rdp/mx50_rdp.c +++ b/board/freescale/mx50_rdp/mx50_rdp.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de> * - * (C) Copyright 2009-2011 Freescale Semiconductor, Inc. + * (C) Copyright 2009-2012 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -57,7 +57,7 @@ #endif #ifdef CONFIG_ANDROID_RECOVERY -#include "../common/recovery.h" +#include <recovery.h> #include <part.h> #include <ext2fs.h> #include <linux/mtd/mtd.h> @@ -1241,46 +1241,6 @@ int board_init(void) } #ifdef CONFIG_ANDROID_RECOVERY -struct reco_envs supported_reco_envs[BOOT_DEV_NUM] = { - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, -#ifdef CONFIG_CMD_UBI - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_NAND, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_NAND, - }, -#endif -}; #ifdef CONFIG_CMD_UBI extern int ubifs_init(void); diff --git a/board/freescale/mx51_3stack/mx51_3stack.c b/board/freescale/mx51_3stack/mx51_3stack.c index 4c773ad4c90..4822d289169 100644 --- a/board/freescale/mx51_3stack/mx51_3stack.c +++ b/board/freescale/mx51_3stack/mx51_3stack.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de> * - * (C) Copyright 2009-2010 Freescale Semiconductor, Inc. + * (C) Copyright 2009-2012 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -43,7 +43,7 @@ #endif #ifdef CONFIG_ANDROID_RECOVERY -#include "../common/recovery.h" +#include <recovery.h> #include <mxc_keyb.h> #include <part.h> #include <ext2fs.h> @@ -612,21 +612,6 @@ int board_init(void) } #ifdef CONFIG_ANDROID_RECOVERY -struct reco_envs supported_reco_envs[BOOT_DEV_NUM] = { - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_NAND, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_NAND, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, -}; - static int check_mmc_recovery_cmd_file(int dev_num, int part_num, char *path) { block_dev_desc_t *dev_desc = NULL; diff --git a/board/freescale/mx51_bbg/mx51_bbg.c b/board/freescale/mx51_bbg/mx51_bbg.c index ea0c447d9e0..325be2a4f36 100644 --- a/board/freescale/mx51_bbg/mx51_bbg.c +++ b/board/freescale/mx51_bbg/mx51_bbg.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de> * - * (C) Copyright 2009-2011 Freescale Semiconductor, Inc. + * (C) Copyright 2009-2012 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -59,7 +59,7 @@ #endif #ifdef CONFIG_ANDROID_RECOVERY -#include "../common/recovery.h" +#include <recovery.h> #include <part.h> #include <ext2fs.h> #include <linux/mtd/mtd.h> @@ -1022,21 +1022,6 @@ int board_init(void) } #ifdef CONFIG_ANDROID_RECOVERY -struct reco_envs supported_reco_envs[BOOT_DEV_NUM] = { - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, -}; - int check_recovery_cmd_file(void) { disk_partition_t info; diff --git a/board/freescale/mx53_ard/mx53_ard.c b/board/freescale/mx53_ard/mx53_ard.c index 2360d7c096a..658079cfed0 100755 --- a/board/freescale/mx53_ard/mx53_ard.c +++ b/board/freescale/mx53_ard/mx53_ard.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de> * - * (C) Copyright 2009-2011 Freescale Semiconductor, Inc. + * (C) Copyright 2009-2012 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -62,7 +62,7 @@ #endif #ifdef CONFIG_ANDROID_RECOVERY -#include "../common/recovery.h" +#include <recovery.h> #include <part.h> #include <ext2fs.h> #include <linux/mtd/mtd.h> @@ -1076,44 +1076,6 @@ int board_init(void) #ifdef CONFIG_ANDROID_RECOVERY -struct reco_envs supported_reco_envs[BOOT_DEV_NUM] = { - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = NULL, - .args = NULL, - }, -}; int check_recovery_cmd_file(void) { diff --git a/board/freescale/mx53_evk/mx53_evk.c b/board/freescale/mx53_evk/mx53_evk.c index 4129a0b6bc8..82bee9f3d90 100644 --- a/board/freescale/mx53_evk/mx53_evk.c +++ b/board/freescale/mx53_evk/mx53_evk.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de> * - * (C) Copyright 2009-2011 Freescale Semiconductor, Inc. + * (C) Copyright 2009-2012 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -54,7 +54,7 @@ #endif #ifdef CONFIG_ANDROID_RECOVERY -#include "../common/recovery.h" +#include <recovery.h> #include <part.h> #include <ext2fs.h> #include <linux/mtd/mtd.h> @@ -1007,45 +1007,6 @@ int board_init(void) #ifdef CONFIG_ANDROID_RECOVERY -struct reco_envs supported_reco_envs[BOOT_DEV_NUM] = { - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = NULL, - .args = NULL, - }, -}; - int check_recovery_cmd_file(void) { disk_partition_t info; diff --git a/board/freescale/mx53_loco/mx53_loco.c b/board/freescale/mx53_loco/mx53_loco.c index 5f973282cf4..70ec8a5bca5 100644 --- a/board/freescale/mx53_loco/mx53_loco.c +++ b/board/freescale/mx53_loco/mx53_loco.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. + * Copyright (C) 2010-2012 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -51,7 +51,7 @@ #endif #ifdef CONFIG_ANDROID_RECOVERY -#include "../common/recovery.h" +#include <recovery.h> #include <part.h> #include <ext2fs.h> #include <linux/mtd/mtd.h> @@ -739,45 +739,6 @@ int board_init(void) #ifdef CONFIG_ANDROID_RECOVERY -struct reco_envs supported_reco_envs[BOOT_DEV_NUM] = { - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = NULL, - .args = NULL, - }, -}; - int check_recovery_cmd_file(void) { disk_partition_t info; diff --git a/board/freescale/mx53_pcba/mx53_pcba.c b/board/freescale/mx53_pcba/mx53_pcba.c index 5168e5d0a79..9ee205c9043 100644 --- a/board/freescale/mx53_pcba/mx53_pcba.c +++ b/board/freescale/mx53_pcba/mx53_pcba.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Freescale Semiconductor, Inc. + * Copyright (C) 2011-2012 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -46,7 +46,7 @@ #endif #ifdef CONFIG_ANDROID_RECOVERY -#include "../common/recovery.h" +#include <recovery.h> #include <part.h> #include <ext2fs.h> #include <linux/mtd/mtd.h> @@ -666,44 +666,6 @@ int board_init(void) #ifdef CONFIG_ANDROID_RECOVERY -struct reco_envs supported_reco_envs[BOOT_DEV_NUM] = { - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = NULL, - .args = NULL, - }, -}; int check_recovery_cmd_file(void) { diff --git a/board/freescale/mx53_smd/mx53_smd.c b/board/freescale/mx53_smd/mx53_smd.c index 240b5968563..cda2756aafb 100644 --- a/board/freescale/mx53_smd/mx53_smd.c +++ b/board/freescale/mx53_smd/mx53_smd.c @@ -63,7 +63,7 @@ #endif #ifdef CONFIG_ANDROID_RECOVERY -#include "../common/recovery.h" +#include <recovery.h> #include <part.h> #include <ext2fs.h> #include <linux/mtd/mtd.h> @@ -1284,44 +1284,6 @@ int board_init(void) #ifdef CONFIG_ANDROID_RECOVERY -struct reco_envs supported_reco_envs[BOOT_DEV_NUM] = { - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = NULL, - .args = NULL, - }, -}; int check_recovery_cmd_file(void) { diff --git a/board/freescale/mx6q_sabrelite/mx6q_sabrelite.c b/board/freescale/mx6q_sabrelite/mx6q_sabrelite.c index 09f34dd5245..ccec01a2f28 100644 --- a/board/freescale/mx6q_sabrelite/mx6q_sabrelite.c +++ b/board/freescale/mx6q_sabrelite/mx6q_sabrelite.c @@ -54,7 +54,7 @@ #endif #ifdef CONFIG_ANDROID_RECOVERY -#include "../common/recovery.h" +#include <recovery.h> #include <part.h> #include <ext2fs.h> #include <linux/mtd/mtd.h> @@ -451,44 +451,6 @@ int board_init(void) } #ifdef CONFIG_ANDROID_RECOVERY -struct reco_envs supported_reco_envs[BOOT_DEV_NUM] = { - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = NULL, - .args = NULL, - }, -}; int check_recovery_cmd_file(void) { diff --git a/board/freescale/mx6q_sabresd/mx6q_sabresd.c b/board/freescale/mx6q_sabresd/mx6q_sabresd.c index ff2a1b28bba..b91219a760b 100644 --- a/board/freescale/mx6q_sabresd/mx6q_sabresd.c +++ b/board/freescale/mx6q_sabresd/mx6q_sabresd.c @@ -71,13 +71,7 @@ #endif #ifdef CONFIG_ANDROID_RECOVERY -#include "../common/recovery.h" -#include <part.h> -#include <ext2fs.h> -#include <linux/mtd/mtd.h> -#include <linux/mtd/partitions.h> -#include <ubi_uboot.h> -#include <jffs2/load_kernel.h> +#include <recovery.h> #endif DECLARE_GLOBAL_DATA_PTR; @@ -1196,44 +1190,6 @@ int board_init(void) #ifdef CONFIG_ANDROID_RECOVERY -struct reco_envs supported_reco_envs[BOOT_DEV_NUM] = { - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = NULL, - .args = NULL, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, - .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, - }, - { - .cmd = NULL, - .args = NULL, - }, -}; int check_recovery_cmd_file(void) { diff --git a/cpu/arm_cortexa8/mx50/generic.c b/cpu/arm_cortexa8/mx50/generic.c index e1f55d1003b..0faa3b8097e 100644 --- a/cpu/arm_cortexa8/mx50/generic.c +++ b/cpu/arm_cortexa8/mx50/generic.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright (C) 2010-2012 Freescale Semiconductor, Inc. All Rights Reserved. * * See file CREDITS for list of people who contributed to this * project. @@ -33,6 +33,10 @@ #include <asm/cache-cp15.h> #endif +#ifdef CONFIG_ANDROID_RECOVERY +#include <recovery.h> +#endif + enum pll_clocks { PLL1_CLK = MXC_DPLL1_BASE, PLL2_CLK = MXC_DPLL2_BASE, @@ -1140,3 +1144,55 @@ int arch_cpu_init(void) } #endif +#ifdef CONFIG_ANDROID_RECOVERY +struct reco_envs supported_reco_envs[BOOT_DEV_NUM] = { + { + .cmd = NULL, + .args = NULL, + }, + { + .cmd = NULL, + .args = NULL, + }, + { + .cmd = NULL, + .args = NULL, + }, + { + .cmd = NULL, + .args = NULL, + }, + { + .cmd = NULL, + .args = NULL, + }, + { + .cmd = NULL, + .args = NULL, + }, + { + .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, + .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, + }, + { + .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, + .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, + }, +#ifdef CONFIG_CMD_UBI + { + .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_NAND, + .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_NAND, + }, +#endif +}; +#endif + +#ifdef CONFIG_FASTBOOT +/* check if the recovery bit is set by kernel, it can be set by kernel + * issue a command '# reboot fastboot' */ +int fastboot_check_and_clean_flag(void) +{ + return 0; +} +#endif + diff --git a/cpu/arm_cortexa8/mx51/generic.c b/cpu/arm_cortexa8/mx51/generic.c index b116922cf5e..f3b97515288 100644 --- a/cpu/arm_cortexa8/mx51/generic.c +++ b/cpu/arm_cortexa8/mx51/generic.c @@ -2,7 +2,7 @@ * (C) Copyright 2007 * Sascha Hauer, Pengutronix * - * (C) Copyright 2009-2011 Freescale Semiconductor, Inc. + * (C) Copyright 2009-2012 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -37,6 +37,9 @@ #include <imx_spi.h> #include <asm/arch/imx_spi_pmic.h> #endif +#ifdef CONFIG_ANDROID_RECOVERY +#include <recovery.h> +#endif #include <div64.h> #include "crm_regs.h" @@ -1105,3 +1108,29 @@ void ipu_clk_disable(void) reg |= (0x1 << 18); writel(reg, CCM_BASE_ADDR + CLKCTL_CLPCR); } + +#ifdef CONFIG_ANDROID_RECOVERY +struct reco_envs supported_reco_envs[BOOT_DEV_NUM] = { + { + .cmd = NULL, + .args = NULL, + }, + { + .cmd = NULL, + .args = NULL, + }, + { + .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, + .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, + }, +}; +#endif + +#ifdef CONFIG_FASTBOOT +/* check if the recovery bit is set by kernel, it can be set by kernel + * issue a command '# reboot fastboot' */ +int fastboot_check_and_clean_flag(void) +{ + return 0; +} +#endif diff --git a/cpu/arm_cortexa8/mx53/generic.c b/cpu/arm_cortexa8/mx53/generic.c index e53a7203529..7a6d95e6dd4 100644 --- a/cpu/arm_cortexa8/mx53/generic.c +++ b/cpu/arm_cortexa8/mx53/generic.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. + * Copyright (C) 2010-2012 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -33,6 +33,10 @@ #include <asm/cache-cp15.h> #endif +#ifdef CONFIG_ANDROID_RECOVERY +#include <recovery.h> +#endif + enum pll_clocks { PLL1_CLK = MXC_DPLL1_BASE, PLL2_CLK = MXC_DPLL2_BASE, @@ -1166,3 +1170,55 @@ U_BOOT_CMD( "download_mode - enter i.MX serial/usb download mode\n", ""); #endif + + +#ifdef CONFIG_ANDROID_RECOVERY +struct reco_envs supported_reco_envs[BOOT_DEV_NUM] = { + { + .cmd = NULL, + .args = NULL, + }, + { + .cmd = NULL, + .args = NULL, + }, + { + .cmd = NULL, + .args = NULL, + }, + { + .cmd = NULL, + .args = NULL, + }, + { + .cmd = NULL, + .args = NULL, + }, + { + .cmd = NULL, + .args = NULL, + }, + { + .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, + .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, + }, + { + .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, + .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, + }, + { + .cmd = NULL, + .args = NULL, + }, +}; +#endif + +#ifdef CONFIG_FASTBOOT +/* check if the recovery bit is set by kernel, it can be set by kernel + * issue a command '# reboot fastboot' */ +int fastboot_check_and_clean_flag(void) +{ + return 0; +} +#endif + diff --git a/cpu/arm_cortexa8/mx6/generic.c b/cpu/arm_cortexa8/mx6/generic.c index 43893ee9304..a762498d4c4 100644 --- a/cpu/arm_cortexa8/mx6/generic.c +++ b/cpu/arm_cortexa8/mx6/generic.c @@ -41,6 +41,10 @@ #include <usb/imx_udc.h> #endif +#ifdef CONFIG_ANDROID_RECOVERY +#include <recovery.h> +#endif + #include <usb/regs-usbphy-mx6.h> enum pll_clocks { @@ -1203,3 +1207,45 @@ U_BOOT_CMD( "download_mode - enter i.MX serial/usb download mode", ""); #endif + + +#ifdef CONFIG_ANDROID_RECOVERY +struct reco_envs supported_reco_envs[BOOT_DEV_NUM] = { + { + .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, + .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, + }, + { + .cmd = NULL, + .args = NULL, + }, + { + .cmd = NULL, + .args = NULL, + }, + { + .cmd = NULL, + .args = NULL, + }, + { + .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, + .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, + }, + { + .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, + .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, + }, + { + .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, + .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, + }, + { + .cmd = CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC, + .args = CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC, + }, + { + .cmd = NULL, + .args = NULL, + }, +}; +#endif diff --git a/include/configs/mx50_rd3_android.h b/include/configs/mx50_rd3_android.h index b0fedc19b86..7e40e41f988 100644 --- a/include/configs/mx50_rd3_android.h +++ b/include/configs/mx50_rd3_android.h @@ -331,6 +331,8 @@ #define CONFIG_MTD_DEVICE #define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_BOOTI +#define CONFIG_ANDROID_BOOT_PARTITION_MMC -1 #define CONFIG_ANDROID_SYSTEM_PARTITION_MMC 2 #define CONFIG_ANDROID_RECOVERY_PARTITION_MMC 4 #define CONFIG_ANDROID_CACHE_PARTITION_MMC 6 diff --git a/include/configs/mx50_rdp_android.h b/include/configs/mx50_rdp_android.h index 79f5dc76334..ab6e578fcf4 100644 --- a/include/configs/mx50_rdp_android.h +++ b/include/configs/mx50_rdp_android.h @@ -333,6 +333,8 @@ #define CONFIG_MTD_DEVICE #define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_BOOTI +#define CONFIG_ANDROID_BOOT_PARTITION_MMC -1 #define CONFIG_ANDROID_SYSTEM_PARTITION_MMC 2 #define CONFIG_ANDROID_RECOVERY_PARTITION_MMC 4 #define CONFIG_ANDROID_CACHE_PARTITION_MMC 6 diff --git a/include/configs/mx50_rdp_mfg.h b/include/configs/mx50_rdp_mfg.h index 447cb359edb..fab45ef11d0 100644 --- a/include/configs/mx50_rdp_mfg.h +++ b/include/configs/mx50_rdp_mfg.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. + * Copyright (C) 2010-2012 Freescale Semiconductor, Inc. * * Configuration settings for the MX50-RDP Freescale board. * @@ -127,7 +127,6 @@ "bootcmd_mmc=run bootargs_base bootargs_mmc; " \ "mmc dev 0; " \ "mmc read ${loadaddr} 0x800 0x1800; bootm\0" \ - "bootcmd=run bootcmd_net\0" \ diff --git a/include/configs/mx51_bbg_android.h b/include/configs/mx51_bbg_android.h index 6b46d9d35a4..9a6268cae90 100644 --- a/include/configs/mx51_bbg_android.h +++ b/include/configs/mx51_bbg_android.h @@ -130,6 +130,8 @@ "mmc read ${loadaddr} 0x800 0x2000;bootm" #define CONFIG_ANDROID_RECOVERY_CMD_FILE "/recovery/command" +#define CONFIG_CMD_BOOTI +#define CONFIG_ANDROID_BOOT_PARTITION_MMC -1 #define CONFIG_ANDROID_SYSTEM_PARTITION_MMC 2 #define CONFIG_ANDROID_RECOVERY_PARTITION_MMC 4 #define CONFIG_ANDROID_CACHE_PARTITION_MMC 6 diff --git a/include/configs/mx53_evk_android.h b/include/configs/mx53_evk_android.h index cfff3bec945..41c8bdc65f0 100644 --- a/include/configs/mx53_evk_android.h +++ b/include/configs/mx53_evk_android.h @@ -90,10 +90,13 @@ #define CONFIG_FASTBOOT_CONFIGURATION_STR "Android fastboot" #define CONFIG_FASTBOOT_INTERFACE_STR "Android fastboot" #define CONFIG_FASTBOOT_SERIAL_NUM "12345" +#define CONFIG_FASTBOOT_SATA_NO 0 #define CONFIG_FASTBOOT_TRANSFER_BUF 0x80000000 #define CONFIG_FASTBOOT_TRANSFER_BUF_SIZE 0x9400000 /* 148M byte */ +#define CONFIG_CMD_BOOTI #define CONFIG_ANDROID_RECOVERY +#define CONFIG_ANDROID_BOOT_PARTITION_MMC -1 #define CONFIG_MTD_DEVICE #define CONFIG_MTD_PARTITIONS diff --git a/include/configs/mx53_smd_android.h b/include/configs/mx53_smd_android.h index 247917fbc72..a14fa3ab545 100644 --- a/include/configs/mx53_smd_android.h +++ b/include/configs/mx53_smd_android.h @@ -112,6 +112,8 @@ "mmc read ${loadaddr} 0x800 0x2000;bootm" #define CONFIG_ANDROID_RECOVERY_CMD_FILE "/recovery/command" +#define CONFIG_ANDROID_BOOT_PARTITION_MMC -1 +#define CONFIG_ANDROID_MAIN_MMC_BUS 2 #define CONFIG_ANDROID_SYSTEM_PARTITION_MMC 2 #define CONFIG_ANDROID_RECOVERY_PARTITION_MMC 4 #define CONFIG_ANDROID_CACHE_PARTITION_MMC 6 diff --git a/board/freescale/common/recovery.h b/include/recovery.h index 5dde01df390..5dde01df390 100644 --- a/board/freescale/common/recovery.h +++ b/include/recovery.h |