diff mbox series

lx2160a : Add emmc in boot_targets environment variable

Message ID 1582135245-20318-1-git-send-email-meenakshi.aggarwal@nxp.com
State Accepted
Commit b7e7a46e1007a362be05c76efb3a2ee69e50880d
Delegated to: Priyanka Jain
Headers show
Series lx2160a : Add emmc in boot_targets environment variable | expand

Commit Message

Meenakshi Aggarwal Feb. 19, 2020, 6 p.m. UTC
Add emmc in supported boot_targets and
Add bootcmd environment variable for emmc boot.

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
---
 include/configs/lx2160a_common.h | 11 +++++++++++
 include/configs/lx2160aqds.h     |  7 +++++++
 include/configs/lx2160ardb.h     |  7 +++++++
 3 files changed, 25 insertions(+)

Comments

Priyanka Jain (OSS) March 30, 2020, 10:26 a.m. UTC | #1
>-----Original Message-----
>From: U-Boot <u-boot-bounces@lists.denx.de> On Behalf Of Meenakshi
>Aggarwal
>Sent: Wednesday, February 19, 2020 11:31 PM
>To: u-boot@lists.denx.de; Priyanka Jain <priyanka.jain@nxp.com>
>Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
>Subject: [PATCH] lx2160a : Add emmc in boot_targets environment variable
>
>Add emmc in supported boot_targets and
>Add bootcmd environment variable for emmc boot.
>
>Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
>---
Applied to u-boot-fsl-qoriq. Waiting upstream

Thanks
Priyanka
diff mbox series

Patch

diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h
index 0b0075a..bf1ba82 100644
--- a/include/configs/lx2160a_common.h
+++ b/include/configs/lx2160a_common.h
@@ -284,9 +284,20 @@  int select_i2c_ch_pca9547_sec(unsigned char ch);
 		"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>
 
diff --git a/include/configs/lx2160aqds.h b/include/configs/lx2160aqds.h
index 56a50d3..12783a8 100644
--- a/include/configs/lx2160aqds.h
+++ b/include/configs/lx2160aqds.h
@@ -143,6 +143,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>
diff --git a/include/configs/lx2160ardb.h b/include/configs/lx2160ardb.h
index 5b530f0..ff92c0a 100644
--- a/include/configs/lx2160ardb.h
+++ b/include/configs/lx2160ardb.h
@@ -113,6 +113,13 @@ 
 		"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>