summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSanshan Zhang <sanshan.zhang@nxp.com>2017-01-25 09:13:35 +0800
committerYe Li <ye.li@nxp.com>2017-04-05 19:48:23 +0800
commit9fe1f23c2bcb263a91a2044cb0105963844dcc06 (patch)
tree09ed4f3f94b7b4c4b83087593da14adcef6bf37a /arch
parentdcba1e63bb9aff5a26d42a6c5b5418f5b8215ccf (diff)
downloadu-boot-imx-9fe1f23c2bcb263a91a2044cb0105963844dcc06.zip
u-boot-imx-9fe1f23c2bcb263a91a2044cb0105963844dcc06.tar.gz
u-boot-imx-9fe1f23c2bcb263a91a2044cb0105963844dcc06.tar.bz2
MA-9213 imx: mx7ulp-evk: Add android support
Add android features on i.MX7ULP EVK board. Implement the code to get boot device and the serial number on mx7ulp. TODO: will add the code which check misc partition after porting BCB. Change-Id: I9d06fecba303fa4dfdcaf73da1b6246444697bba Signed-off-by: Sanshan Zhang <sanshan.zhang@nxp.com> (cherry picked from commit 4c60cba3a017b921aebb84dd1268c898e549c99a) Signed-off-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/armv7/mx7ulp/soc.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx7ulp/soc.c b/arch/arm/cpu/armv7/mx7ulp/soc.c
index 8ff8329..f03bd3b 100644
--- a/arch/arm/cpu/armv7/mx7ulp/soc.c
+++ b/arch/arm/cpu/armv7/mx7ulp/soc.c
@@ -362,3 +362,48 @@ enum boot_device get_boot_device(void)
return boot_dev;
}
+
+#ifdef CONFIG_FSL_FASTBOOT
+#ifdef CONFIG_SERIAL_TAG
+void get_board_serial(struct tag_serialnr *serialnr)
+{
+
+ struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
+ struct fuse_bank *bank = &ocotp->bank[1];
+ struct fuse_bank1_regs *fuse =
+ (struct fuse_bank1_regs *)bank->fuse_regs;
+ serialnr->low = (fuse->cfg0 & 0xFFFF) + ((fuse->cfg1 & 0xFFFF) << 16);
+ serialnr->high = (fuse->cfg2 & 0xFFFF) + ((fuse->cfg3 & 0xFFFF) << 16);
+}
+#endif
+#ifdef CONFIG_ANDROID_RECOVERY
+/*
+ * check if the recovery filed is set by kernel, it can be set by kernel
+ * issue a command '# reboot recovery'
+ */
+int recovery_check_and_clean_flag(void)
+{
+/*
+ * TODO: will implement this part after porting BCB
+ */
+ return 0;
+}
+#endif /*CONFIG_ANDROID_RECOVERY*/
+/*
+ * check if the recovery field is set by kernel, it can be set by kernel
+ * issue a command '# reboot fastboot'
+ */
+int fastboot_check_and_clean_flag(void)
+{
+/*
+ * TODO: will implement this part after porting BCB
+ */
+ return 0;
+}
+void fastboot_enable_flag(void)
+{
+/*
+ * TODO: will implement this part after porting BCB
+ */
+}
+#endif /*CONFIG_FSL_FASTBOOT*/