summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorZhang Jiejing <jiejing.zhang@freescale.com>2012-05-25 18:41:50 +0800
committerJustin Waters <justin.waters@timesys.com>2012-09-12 11:05:51 -0400
commit87fc1c3a0e6bac6e8a03703fe12437b1257b4bba (patch)
treed6a8a9f9bd60d92a654070f9f134c7a39ce1ff21 /board
parente3bee6ab1294cd56b333a65d57bed7c20ee6aae7 (diff)
ENGR00210918-1 android: add mx6sl android support
- add android build config for mx6sl_arm2 board. - add gpio support for mx6sl - add boot image support - add android recovery support - add fastboot support, but fastboot cannot transfer file. Signed-off-by Zhang Jiejing <jiejing.zhang@freescale.com>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/common/recovery.c2
-rw-r--r--board/freescale/mx6sl_arm2/mx6sl_arm2.c33
2 files changed, 34 insertions, 1 deletions
diff --git a/board/freescale/common/recovery.c b/board/freescale/common/recovery.c
index e63a1d40d5..73f091bfbe 100644
--- a/board/freescale/common/recovery.c
+++ b/board/freescale/common/recovery.c
@@ -85,7 +85,7 @@ void setup_recovery_env(void)
boot_cmd = supported_reco_envs[bootdev].cmd;
if (boot_cmd == NULL) {
- printf("Unsupported bootup device for recovery\n");
+ printf("Unsupported bootup device for recovery: dev: %d\n", bootdev);
return;
}
diff --git a/board/freescale/mx6sl_arm2/mx6sl_arm2.c b/board/freescale/mx6sl_arm2/mx6sl_arm2.c
index cff96c05fd..60a263fc72 100644
--- a/board/freescale/mx6sl_arm2/mx6sl_arm2.c
+++ b/board/freescale/mx6sl_arm2/mx6sl_arm2.c
@@ -44,11 +44,23 @@
#include <fsl_esdhc.h>
#endif
+#ifdef CONFIG_MXC_GPIO
+#include <asm/gpio.h>
+#include <asm/arch/gpio.h>
+#endif
+
+#ifdef CONFIG_ANDROID_RECOVERY
+#include <recovery.h>
+#endif
+
DECLARE_GLOBAL_DATA_PTR;
static u32 system_rev;
static enum boot_device boot_dev;
+#define USB_OTG_PWR IMX_GPIO_NR(4, 0)
+#define USB_H1_PWR IMX_GPIO_NR(4, 2)
+
static inline void setup_boot_device(void)
{
uint soc_sbmr = readl(SRC_BASE_ADDR + 0x4);
@@ -757,3 +769,24 @@ int checkboard(void)
}
return 0;
}
+
+#ifdef CONFIG_ANDROID_RECOVERY
+int check_recovery_cmd_file(void)
+{
+ return check_and_clean_recovery_flag();
+}
+#endif
+
+
+#ifdef CONFIG_IMX_UDC
+void udc_pins_setting(void)
+{
+ /* USB_OTG_PWR */
+ mxc_iomux_v3_setup_pad(MX6SL_PAD_KEY_COL4__GPIO_4_0);
+ mxc_iomux_v3_setup_pad(MX6SL_PAD_KEY_COL5__GPIO_4_2);
+ /* USB_OTG_PWR = 0 */
+ gpio_direction_output(USB_OTG_PWR, 0);
+ /* USB_H1_POWER = 1 */
+ gpio_direction_output(USB_H1_PWR, 1);
+}
+#endif