diff options
author | Ye Li <ye.li@nxp.com> | 2016-03-10 17:18:57 +0800 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2016-03-25 16:01:45 +0800 |
commit | f66842f79d4e33ace45762466eed23a86d367642 (patch) | |
tree | ef2886bedf4e87462e3fa841d4e57912ee5007e2 | |
parent | 43fe988af28c5e51fb23aa846e04bc9698256926 (diff) | |
download | u-boot-imx-f66842f79d4e33ace45762466eed23a86d367642.zip u-boot-imx-f66842f79d4e33ace45762466eed23a86d367642.tar.gz u-boot-imx-f66842f79d4e33ace45762466eed23a86d367642.tar.bz2 |
MLK-12531 mx6sxsabresd: Add CM4 fast boot up demo
This is a demo that CM4 will boot up by u-boot without typing any
command. It boots up at u-boot early init, try to minimize the time
from power up to the CM4 running.
Since CM4 runs on QSPI NOR XIP, we have to disable the QSPI driver in
u-boot to avoid conflict.
RDC for shared GPIO1 is added, but not enabled, because the kernel is
not ready for shared GPIO1. Users can uncomment the CONFIG_IMX_RDC to
enable it.
Some legacy codes in mx6sxsabreauto are removed. We only need this work
on mx6sxsabresd as a demo.
Signed-off-by: Ye Li <ye.li@nxp.com>
-rw-r--r-- | arch/arm/include/asm/imx-common/sys_proto.h | 3 | ||||
-rw-r--r-- | board/freescale/mx6sxsabresd/mx6sxsabresd.c | 19 | ||||
-rw-r--r-- | configs/mx6sxsabresd_m4fastup_defconfig | 5 | ||||
-rw-r--r-- | include/configs/mx6sxsabreauto.h | 9 | ||||
-rw-r--r-- | include/configs/mx6sxsabresd.h | 10 |
5 files changed, 33 insertions, 13 deletions
diff --git a/arch/arm/include/asm/imx-common/sys_proto.h b/arch/arm/include/asm/imx-common/sys_proto.h index 189765b..93d0b20 100644 --- a/arch/arm/include/asm/imx-common/sys_proto.h +++ b/arch/arm/include/asm/imx-common/sys_proto.h @@ -60,4 +60,7 @@ void board_late_mmc_env_init(void); void vadc_power_up(void); void vadc_power_down(void); + +int arch_auxiliary_core_up(u32 core_id, u32 boot_private_data); +int arch_auxiliary_core_check_up(u32 core_id); #endif diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c index 20637ce..46256b4 100644 --- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c +++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c @@ -32,6 +32,11 @@ #include <usb/ehci-fsl.h> #include <asm/imx-common/video.h> +#ifdef CONFIG_IMX_RDC +#include <asm/imx-common/rdc-sema.h> +#include <asm/arch/imx-rdc.h> +#endif + #ifdef CONFIG_FSL_FASTBOOT #include <fsl_fastboot.h> #ifdef CONFIG_ANDROID_RECOVERY @@ -436,8 +441,22 @@ int board_phy_config(struct phy_device *phydev) return 0; } +#ifdef CONFIG_IMX_RDC +static rdc_peri_cfg_t const shared_resources[] = { + (RDC_PER_GPIO1 | RDC_DOMAIN(0) | RDC_DOMAIN(1)), +}; +#endif + int board_early_init_f(void) { +#ifdef CONFIG_IMX_RDC + imx_rdc_setup_peripherals(shared_resources, ARRAY_SIZE(shared_resources)); +#endif + +#ifdef CONFIG_SYS_AUXCORE_FASTUP + arch_auxiliary_core_up(0, CONFIG_SYS_AUXCORE_BOOTDATA); +#endif + setup_iomux_uart(); return 0; diff --git a/configs/mx6sxsabresd_m4fastup_defconfig b/configs/mx6sxsabresd_m4fastup_defconfig new file mode 100644 index 0000000..1216f7a --- /dev/null +++ b/configs/mx6sxsabresd_m4fastup_defconfig @@ -0,0 +1,5 @@ +CONFIG_ARM=y +CONFIG_ARCH_MX6=y +CONFIG_TARGET_MX6SXSABRESD=y +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sxsabresd/imximage.cfg,SYS_BOOT_QSPI,SYS_AUXCORE_FASTUP" +CONFIG_CMD_GPIO=y diff --git a/include/configs/mx6sxsabreauto.h b/include/configs/mx6sxsabreauto.h index 049b821..d0f1751 100644 --- a/include/configs/mx6sxsabreauto.h +++ b/include/configs/mx6sxsabreauto.h @@ -40,9 +40,7 @@ #endif #define CONFIG_SYS_AUXCORE_BOOTDATA 0x68000000 /* Set to QSPI1 B flash at default */ -#ifndef CONFIG_SYS_AUXCORE_FASTUP -#define CONFIG_IMX_BOOTAUX /* Boot M4 by command, disable this when M4 fast up */ -#endif +#define CONFIG_IMX_BOOTAUX #ifdef CONFIG_IMX_BOOTAUX #define UPDATE_M4_ENV \ @@ -190,10 +188,7 @@ #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) -#ifdef CONFIG_SYS_AUXCORE_FASTUP -/*#define CONFIG_IMX_RDC*/ /* Disable the RDC temporarily, will enable it in future */ -#define CONFIG_ENV_IS_IN_MMC /* Must disable QSPI driver, because M4 run on QSPI */ -#elif defined CONFIG_SYS_BOOT_QSPI +#if defined CONFIG_SYS_BOOT_QSPI #define CONFIG_ENV_IS_IN_SPI_FLASH #elif defined CONFIG_SYS_BOOT_NAND #define CONFIG_ENV_IS_IN_NAND diff --git a/include/configs/mx6sxsabresd.h b/include/configs/mx6sxsabresd.h index 862c553..21d74d7 100644 --- a/include/configs/mx6sxsabresd.h +++ b/include/configs/mx6sxsabresd.h @@ -41,13 +41,11 @@ #define CONFIG_MXC_UART #define CONFIG_MXC_UART_BASE UART1_BASE -#define CONFIG_SYS_AUXCORE_BOOTDATA 0x78000000 -#ifndef CONFIG_SYS_AUXCORE_FASTUP +#define CONFIG_SYS_AUXCORE_BOOTDATA 0x78000000 /* Set to QSPI2 B flash at default */ #define CONFIG_IMX_BOOTAUX -/* Set to QSPI2 B flash at default */ -#endif -#ifdef CONFIG_IMX_BOOTAUX +/* When using M4 fastup demo, no need these M4 env, since QSPI is used by M4 */ +#ifndef CONFIG_SYS_AUXCORE_FASTUP #define UPDATE_M4_ENV \ "m4image=m4_qspi.bin\0" \ "loadm4image=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4image}\0" \ @@ -177,7 +175,7 @@ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) #ifdef CONFIG_SYS_AUXCORE_FASTUP -/*#define CONFIG_IMX_RDC*/ /* Disable the RDC temporarily, will enable it in future */ +/* #define CONFIG_IMX_RDC */ /* Disable the RDC temporarily, will enable it in future */ #define CONFIG_ENV_IS_IN_MMC /* Must disable QSPI driver, because M4 run on QSPI */ #elif defined CONFIG_SYS_BOOT_QSPI #define CONFIG_FSL_QSPI |