summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorZhang Jiejing <jiejing.zhang@freescale.com>2012-05-25 18:42:52 +0800
committerZhang Jiejing <jiejing.zhang@freescale.com>2012-05-29 17:57:10 +0800
commit1627b8fd466be9cb0248be08f39b52a6e80337f1 (patch)
treeeab016f09bbf3488b33fc2175bb8b903dbf65409 /cpu
parentf5d0383f915bd4d4d211d9958d7819b284276483 (diff)
downloadu-boot-imx-1627b8fd466be9cb0248be08f39b52a6e80337f1.zip
u-boot-imx-1627b8fd466be9cb0248be08f39b52a6e80337f1.tar.gz
u-boot-imx-1627b8fd466be9cb0248be08f39b52a6e80337f1.tar.bz2
ENGR00210918-2 cleanup android support, build pass all boards
- move recovery.h to common inlcude place. - move supported_reco_envs to soc related, not board related, - user can change this via configure header, don't needs this in every board file. - pass build for all mx5/mx6 android configs. Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
Diffstat (limited to 'cpu')
-rw-r--r--cpu/arm_cortexa8/mx50/generic.c58
-rw-r--r--cpu/arm_cortexa8/mx51/generic.c31
-rw-r--r--cpu/arm_cortexa8/mx53/generic.c58
-rw-r--r--cpu/arm_cortexa8/mx6/generic.c46
4 files changed, 190 insertions, 3 deletions
diff --git a/cpu/arm_cortexa8/mx50/generic.c b/cpu/arm_cortexa8/mx50/generic.c
index e1f55d1..0faa3b8 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 b116922..f3b9751 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 e53a720..7a6d95e 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 43893ee..a762498 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