]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
lx2160a : Add emmc in boot_targets environment variable
authorMeenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Wed, 19 Feb 2020 18:00:45 +0000 (23:30 +0530)
committerPriyanka Jain <priyanka.jain@nxp.com>
Mon, 30 Mar 2020 02:36:52 +0000 (08:06 +0530)
Add emmc in supported boot_targets and
Add bootcmd environment variable for emmc boot.

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
include/configs/lx2160a_common.h
include/configs/lx2160aqds.h
include/configs/lx2160ardb.h

index 373daebfbc467a6327d7fd7fc5afd68241e858df..fe0db770e86030ed0bd79ed3d0c08ad4e265fa1c 100644 (file)
@@ -266,9 +266,20 @@ unsigned long get_board_ddr_clk(void);
                "run distro_bootcmd;run sd_bootcmd;"            \
                "env exists secureboot && esbc_halt;"
 
+#define SD2_BOOTCOMMAND                                                \
+               "env exists mcinitcmd && mmcinfo; "             \
+               "mmc read 0x80d00000 0x6800 0x800; "            \
+               "env exists mcinitcmd && env exists secureboot "        \
+               " && mmc read 0x80780000 0x3C00 0x20 "          \
+               "&& esbc_validate 0x80780000;env exists mcinitcmd "     \
+               "&& fsl_mc lazyapply dpl 0x80d00000;"           \
+               "run distro_bootcmd;run sd2_bootcmd;"           \
+               "env exists secureboot && esbc_halt;"
+
 #define BOOT_TARGET_DEVICES(func) \
        func(USB, usb, 0) \
        func(MMC, mmc, 0) \
+       func(MMC, mmc, 1) \
        func(SCSI, scsi, 0)
 #include <config_distro_bootcmd.h>
 
index 1eb63d826f9752fab7f1a9f0c0f1934e1e31af7d..e9e1770c9490add0ef3f22f6f3a9db4f73bde805 100644 (file)
@@ -137,6 +137,13 @@ u8 qixis_esdhc_detect_quirk(void);
                "env exists secureboot && mmc read $kernelheader_addr_r "\
                "$kernelhdr_addr_sd $kernelhdr_size_sd "        \
                " && esbc_validate ${kernelheader_addr_r};"     \
+               "bootm $load_addr#$BOARD\0"                     \
+       "sd2_bootcmd=echo Trying load from emmc card..;"        \
+               "mmc dev 1; mmcinfo; mmc read $load_addr "      \
+               "$kernel_addr_sd $kernel_size_sd ;"             \
+               "env exists secureboot && mmc read $kernelheader_addr_r "\
+               "$kernelhdr_addr_sd $kernelhdr_size_sd "        \
+               " && esbc_validate ${kernelheader_addr_r};"     \
                "bootm $load_addr#$BOARD\0"
 
 #include <asm/fsl_secure_boot.h>
index 82d49e53abdd399e73360d52814c71daa59e89d7..63d77c5fc4a39a95b6e05ef60b99e850e010f452 100644 (file)
                "env exists secureboot && mmc read $kernelheader_addr_r "\
                "$kernelhdr_addr_sd $kernelhdr_size_sd "        \
                " && esbc_validate ${kernelheader_addr_r};"     \
+               "bootm $load_addr#$BOARD\0"                     \
+       "sd2_bootcmd=echo Trying load from emmc card..;"        \
+               "mmc dev 1; mmcinfo; mmc read $load_addr "      \
+               "$kernel_addr_sd $kernel_size_sd ;"             \
+               "env exists secureboot && mmc read $kernelheader_addr_r "\
+               "$kernelhdr_addr_sd $kernelhdr_size_sd "        \
+               " && esbc_validate ${kernelheader_addr_r};"     \
                "bootm $load_addr#$BOARD\0"
 
 #include <asm/fsl_secure_boot.h>