From 45a5d2266c617b56cc7402c9457553d202d63d7a Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Mon, 6 Aug 2018 17:47:22 +0800 Subject: [PATCH] MLK-19131 configs: imx8mm_evk: add jailhouse boot command Add jailhouse env. Currently need to pass clk_ignore_unused to bootargs to avoid linux root cell shutdown clocks used by inmates. If only want a minimal clk being on in inmates, the clks could be added in clk_inits_on in linux kernel drivers/clk/imx/clk-imx8mm.c or use init-on-array under clk node. Signed-off-by: Peng Fan (cherry picked from commit 7732b3b87423069c1c31d25ec07201098062b717) (cherry picked from commit 718b0792dfedcf68b6c2e93d3eefe499ec463433) (cherry picked from commit d18597669c701aebbf0a29c22f68a2347ea4eaf2) (cherry picked from commit db588bf76ba47ebf872c36efa46dc64443eb657a) --- include/configs/imx8mm_evk.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h index 586c86a38e..a1b3ea911d 100644 --- a/include/configs/imx8mm_evk.h +++ b/include/configs/imx8mm_evk.h @@ -78,6 +78,15 @@ #define BOOTENV #endif +/* + * Another approach is add the clocks for inmates into clks_init_on + * in clk-imx8mm.c, then clk_ingore_unused could be removed. + */ +#define JAILHOUSE_ENV \ + "jh_clk= \0 " \ + "jh_mmcboot=setenv fdt_file fsl-imx8mm-evk-root.dtb; setenv jh_clk clk_ignore_unused; run mmcboot\0 " \ + "jh_netboot=setenv fdt_file fsl-imx8mm-evk-root.dtb; setenv jh_clk clk_ignore_unused; run netboot\0 " + /* Initial environment variables */ #if defined(CONFIG_NAND_BOOT) #define CONFIG_EXTRA_ENV_SETTINGS \ @@ -96,6 +105,7 @@ #else #define CONFIG_EXTRA_ENV_SETTINGS \ BOOTENV \ + JAILHOUSE_ENV \ "scriptaddr=0x43500000\0" \ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ "bsp_script=boot.scr\0" \ @@ -111,7 +121,7 @@ "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ "mmcautodetect=yes\0" \ - "mmcargs=setenv bootargs console=${console} root=${mmcroot}\0 " \ + "mmcargs=setenv bootargs ${jh_clk} console=${console} root=${mmcroot}\0 " \ "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bsp_script};\0" \ "bootscript=echo Running bootscript from mmc ...; " \ "source\0" \ @@ -128,7 +138,7 @@ "echo WARN: Cannot load the DT; " \ "fi; " \ "fi;\0" \ - "netargs=setenv bootargs console=${console} " \ + "netargs=setenv bootargs ${jh_clk} console=${console} " \ "root=/dev/nfs " \ "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ "netboot=echo Booting from net ...; " \ -- 2.17.1