summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Zhu <hongxing.zhu@nxp.com>2018-09-05 15:56:01 +0800
committerRichard Zhu <hongxing.zhu@nxp.com>2018-09-10 17:46:35 +0800
commit6fcd8a9e9f8f1a4934201c9902ca2d9bdb1ec91d (patch)
treec41d034adb1267e24ee6ffe475567458d8b9779a
parent9a36704925a68cd74c825895a00e751cf5cd3081 (diff)
MLK-19479-1 imx6: enable fast boot for imx6q/qp sata
enable the sata fastboot on imx6q/qp boards. update the sata boot env. Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
-rw-r--r--configs/mx6qpsabreauto_sata_defconfig12
-rw-r--r--configs/mx6qpsabresd_sata_defconfig13
-rw-r--r--configs/mx6qsabreauto_sata_defconfig12
-rw-r--r--configs/mx6qsabresd_sata_defconfig13
-rw-r--r--include/configs/mx6sabre_common.h49
5 files changed, 95 insertions, 4 deletions
diff --git a/configs/mx6qpsabreauto_sata_defconfig b/configs/mx6qpsabreauto_sata_defconfig
index 6b87116d1a..46bb198068 100644
--- a/configs/mx6qpsabreauto_sata_defconfig
+++ b/configs/mx6qpsabreauto_sata_defconfig
@@ -60,3 +60,15 @@ CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_DM_ETH=y
CONFIG_DM_USB=y
+
+CONFIG_CMD_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_FSL_FASTBOOT=y
+CONFIG_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x12C00000
+CONFIG_FASTBOOT_BUF_SIZE=0x19000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_EFI_PARTITION=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
+CONFIG_FASTBOOT_STORAGE_SATA=y
+CONFIG_FASTBOOT_SATA_NO=0
diff --git a/configs/mx6qpsabresd_sata_defconfig b/configs/mx6qpsabresd_sata_defconfig
index c736b597a2..e3f7fa257f 100644
--- a/configs/mx6qpsabresd_sata_defconfig
+++ b/configs/mx6qpsabresd_sata_defconfig
@@ -61,3 +61,16 @@ CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_DM_ETH=y
CONFIG_DM_USB=y
+
+CONFIG_CMD_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_FSL_FASTBOOT=y
+CONFIG_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x12C00000
+CONFIG_FASTBOOT_BUF_SIZE=0x19000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_EFI_PARTITION=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
+CONFIG_FASTBOOT_STORAGE_SATA=y
+CONFIG_FASTBOOT_SATA_NO=0
+
diff --git a/configs/mx6qsabreauto_sata_defconfig b/configs/mx6qsabreauto_sata_defconfig
index cf394a8fff..1348adb71b 100644
--- a/configs/mx6qsabreauto_sata_defconfig
+++ b/configs/mx6qsabreauto_sata_defconfig
@@ -60,3 +60,15 @@ CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_DM_ETH=y
CONFIG_DM_USB=y
+
+CONFIG_CMD_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_FSL_FASTBOOT=y
+CONFIG_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x12C00000
+CONFIG_FASTBOOT_BUF_SIZE=0x19000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_EFI_PARTITION=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
+CONFIG_FASTBOOT_STORAGE_SATA=y
+CONFIG_FASTBOOT_SATA_NO=0
diff --git a/configs/mx6qsabresd_sata_defconfig b/configs/mx6qsabresd_sata_defconfig
index 0b1ceb0f1c..a5f0bdbc76 100644
--- a/configs/mx6qsabresd_sata_defconfig
+++ b/configs/mx6qsabresd_sata_defconfig
@@ -63,3 +63,16 @@ CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_DM_ETH=y
CONFIG_DM_USB=y
+
+CONFIG_CMD_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_FSL_FASTBOOT=y
+CONFIG_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x12C00000
+CONFIG_FASTBOOT_BUF_SIZE=0x19000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_EFI_PARTITION=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
+CONFIG_FASTBOOT_STORAGE_SATA=y
+CONFIG_FASTBOOT_SATA_NO=0
+
diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h
index ebddff6637..40014ed6a5 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -121,16 +121,57 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
CONFIG_MFG_ENV_SETTINGS \
TEE_ENV \
+ "image=zImage\0" \
+ "fdt_file=undefined\0" \
"fdt_addr=0x18000000\0" \
"fdt_high=0xffffffff\0" \
+ "tee_addr=0x20000000\0" \
+ "tee_file=undefined\0" \
+ "findfdt="\
+ "if test $fdt_file = undefined; then " \
+ "if test $board_name = SABREAUTO && test $board_rev = MX6QP; then " \
+ "setenv fdt_file imx6qp-sabreauto.dtb; fi; " \
+ "if test $board_name = SABREAUTO && test $board_rev = MX6Q; then " \
+ "setenv fdt_file imx6q-sabreauto.dtb; fi; " \
+ "if test $board_name = SABREAUTO && test $board_rev = MX6DL; then " \
+ "setenv fdt_file imx6dl-sabreauto.dtb; fi; " \
+ "if test $board_name = SABRESD && test $board_rev = MX6QP; then " \
+ "setenv fdt_file imx6qp-sabresd.dtb; fi; " \
+ "if test $board_name = SABRESD && test $board_rev = MX6Q; then " \
+ "setenv fdt_file imx6q-sabresd.dtb; fi; " \
+ "if test $board_name = SABRESD && test $board_rev = MX6DL; then " \
+ "setenv fdt_file imx6dl-sabresd.dtb; fi; " \
+ "if test $fdt_file = undefined; then " \
+ "echo WARNING: Could not determine dtb to use; " \
+ "fi; " \
+ "fi;\0" \
+ "findtee="\
+ "if test $tee_file = undefined; then " \
+ "if test $board_name = SABREAUTO && test $board_rev = MX6QP; then " \
+ "setenv tee_file uTee-6qpauto; fi; " \
+ "if test $board_name = SABREAUTO && test $board_rev = MX6Q; then " \
+ "setenv tee_file uTee-6qauto; fi; " \
+ "if test $board_name = SABREAUTO && test $board_rev = MX6DL; then " \
+ "setenv tee_file uTee-6dlauto; fi; " \
+ "if test $board_name = SABRESD && test $board_rev = MX6QP; then " \
+ "setenv tee_file uTee-6qpsdb; fi; " \
+ "if test $board_name = SABRESD && test $board_rev = MX6Q; then " \
+ "setenv tee_file uTee-6qsdb; fi; " \
+ "if test $board_name = SABRESD && test $board_rev = MX6DL; then " \
+ "setenv tee_file uTee-6dlsdb; fi; " \
+ "if test $tee_file = undefined; then " \
+ "echo WARNING: Could not determine tee to use; fi; " \
+ "fi;\0" \
"bootargs=console=" CONSOLE_DEV ",115200 \0"\
"bootargs_sata=setenv bootargs ${bootargs} " \
- "root=/dev/sda1 rootwait rw \0" \
+ "root=/dev/sda2 rootwait rw \0" \
"bootcmd_sata=run bootargs_sata; sata init; " \
- "sata read ${loadaddr} 0x800 0x4000; " \
- "sata read ${fdt_addr} 0x8000 0x800; " \
+ "run findfdt; run findtee;" \
+ "fatload sata 0:1 ${loadaddr} ${image}; " \
+ "fatload sata 0:1 ${fdt_addr} ${fdt_file}; " \
"if test ${tee} = yes; then " \
- "sata read ${tee_addr} 0x9000 0x2000; " \
+ "fatload sata 0:1 ${tee_addr} ${tee_file}; " \
+ "bootm ${tee_addr} - ${fdt_addr}; " \
"else " \
"bootz ${loadaddr} - ${fdt_addr}; " \
"fi \0"\