diff options
author | Ye Li <ye.li@nxp.com> | 2019-05-14 22:49:31 -0700 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2020-04-26 23:26:25 -0700 |
commit | a2018ab0d13fca27e792f05b5f98e9621e95bdd4 (patch) | |
tree | 5b98fbb1bf2942169af3c7bd0e38d94cac894be0 /arch/arm/mach-imx/imx8m/soc.c | |
parent | 6932a10a1a4b22a682736bc364c1e37720566af5 (diff) |
MLK-18591-3 android: Add FSL android fastboot support
Porting the FSL android fastboot features from imx u-boot v2018.03 to
support all SoCs: imx6/imx7/imx7ulp/imx8/imx8m.
The UUU commands like UCmd and ACmd are also added. Users need set
CONFIG_FASTBOOT_UUU_SUPPORT=y to enable the feature.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 65120b06a7f750b9b1a6e0db3d2082cc7088d5a8)
(cherry picked from commit 9b149c2a28829fe7017f83981d634157bc31cc94)
Diffstat (limited to 'arch/arm/mach-imx/imx8m/soc.c')
-rw-r--r-- | arch/arm/mach-imx/imx8m/soc.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index e1b8c044fa..468ee7c3d2 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -22,13 +22,14 @@ #include <fsl_wdog.h> #include <imx_sip.h> #include <generated/version_autogenerated.h> +#include <asm/setup.h> #ifdef CONFIG_IMX_SEC_INIT #include <fsl_caam.h> #endif DECLARE_GLOBAL_DATA_PTR; -#if defined(CONFIG_IMX_HAB) +#if defined(CONFIG_IMX_HAB) || defined(CONFIG_AVB_ATX) struct imx_sec_config_fuse_t const imx_sec_config_fuse = { .bank = 1, .word = 3, @@ -315,6 +316,10 @@ int arch_cpu_init(void) /* Secure init function such RNG */ imx_sec_init(); #endif +#if defined(CONFIG_ANDROID_SUPPORT) + /* Enable RTC */ + writel(0x21, 0x30370038); +#endif if (is_imx8mq()) { clock_enable(CCGR_OCOTP, 1); @@ -377,6 +382,18 @@ bool is_usb_boot(void) { return get_boot_device() == USB_BOOT; } +#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[0]; + struct fuse_bank0_regs *fuse = + (struct fuse_bank0_regs *)bank->fuse_regs; + + serialnr->low = fuse->uid_low; + serialnr->high = fuse->uid_high; +} +#endif #ifdef CONFIG_OF_SYSTEM_SETUP static int ft_add_optee_node(void *fdt, bd_t *bd) |