From 718b0792dfedcf68b6c2e93d3eefe499ec463433 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) --- 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 d6ab92f..27c45e8 100644 --- a/include/configs/imx8mm_evk.h +++ b/include/configs/imx8mm_evk.h @@ -101,6 +101,15 @@ #define CONFIG_PHY_ATHEROS #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 " + #define CONFIG_MFG_ENV_SETTINGS \ CONFIG_MFG_ENV_SETTINGS_DEFAULT \ "initrd_addr=0x43800000\0" \ @@ -111,6 +120,7 @@ /* Initial environment variables */ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_MFG_ENV_SETTINGS \ + JAILHOUSE_ENV \ "script=boot.scr\0" \ "image=Image\0" \ "console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200\0" \ @@ -124,7 +134,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} ${script};\0" \ "bootscript=echo Running bootscript from mmc ...; " \ "source\0" \ @@ -141,7 +151,7 @@ "else " \ "echo wait for boot; " \ "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 ...; " \ -- 1.9.1