MLK-18793 imx8mq: config: add jailhouse env
authorPeng Fan <peng.fan@nxp.com>
Fri, 6 Jul 2018 06:07:02 +0000 (14:07 +0800)
committerYe Li <ye.li@nxp.com>
Fri, 24 May 2019 09:36:37 +0000 (02:36 -0700)
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-imx8mq.c

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 0d33db00e96e7addb6910a7097a62222ff75480f)
(cherry picked from commit 56ea0d9280b22ce3e260851e88782cb877fad6ec)

include/configs/imx8mq_evk.h

index 89b9c71..30cc2c6 100644 (file)
 #define CONFIG_PHY_ATHEROS
 #endif
 
+/*
+ * Another approach is add the clocks for inmates into clks_init_on
+ * in clk-imx8mq.c, then clk_ingore_unused could be removed.
+ */
+#define JAILHOUSE_ENV \
+       "jh_clk= \0 " \
+       "jh_mmcboot=setenv fdt_file fsl-imx8mq-evk-root.dtb; setenv jh_clk clk_ignore_unused; run mmcboot\0 " \
+       "jh_netboot=setenv fdt_file fsl-imx8mq-evk-root.dtb; setenv jh_clk clk_ignore_unused; run netboot\0 "
+
 #define CONFIG_MFG_ENV_SETTINGS \
        "mfgtool_args=setenv bootargs console=${console},${baudrate} " \
                "rdinit=/linuxrc " \
 /* Initial environment variables */
 #define CONFIG_EXTRA_ENV_SETTINGS              \
        CONFIG_MFG_ENV_SETTINGS \
+       JAILHOUSE_ENV \
        "script=boot.scr\0" \
        "image=Image\0" \
        "console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200\0" \
        "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" \
                "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 ...; " \