MLK-17476: imx: optee: change misc partition to optee partition
authorHan Xu <han.xu@nxp.com>
Tue, 30 Jan 2018 22:02:54 +0000 (16:02 -0600)
committerHan Xu <han.xu@nxp.com>
Wed, 31 Jan 2018 02:36:51 +0000 (20:36 -0600)
Previous OPTEE change for NAND add a new tee partition which changed the
following NAND partition index. Changed the unused misc partition and
enlarge the default size to 16MB. This will keep the mtd index fixed and
all partitions should be start from the block boundary for most NAND
chips.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Han Xu <han.xu@nxp.com>
include/configs/mx6qsabreauto.h
include/configs/mx6sxsabreauto.h
include/configs/mx6ul_14x14_evk.h
include/configs/mx6ullevk.h
include/configs/mx7dsabresd.h

index 0a03f93..0ead8ad 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2012-2016 Freescale Semiconductor, Inc.
+ * Copyright 2018 NXP
  *
  * Configuration settings for the Freescale i.MX6Q SabreAuto board.
  *
 
 #undef MFG_NAND_PARTITION
 #ifdef CONFIG_NAND_BOOT
-#ifdef CONFIG_IMX_OPTEE
-#define MFG_NAND_PARTITION "mtdparts=8000000.nor:1m(boot),-(rootfs)\\\\;gpmi-nand:64m(boot),16m(tee),16m(kernel),16m(dtb),1m(misc),-(rootfs) "
-#else
-#define MFG_NAND_PARTITION "mtdparts=8000000.nor:1m(boot),-(rootfs)\\\\;gpmi-nand:64m(boot),16m(kernel),16m(dtb),1m(misc),-(rootfs) "
-#endif
+#define MFG_NAND_PARTITION "mtdparts=8000000.nor:1m(boot),-(rootfs)\\\\;gpmi-nand:64m(boot),16m(kernel),16m(dtb),16m(tee),-(rootfs) "
 #else
 #define MFG_NAND_PARTITION ""
 #endif
index c88668a..a874211 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright 2014 Freescale Semiconductor, Inc.
+ * Copyright 2018 NXP
  *
  * Configuration settings for the Freescale i.MX6SX Sabreauto board.
  *
 #define CONFIG_MXC_UART
 #define CONFIG_MXC_UART_BASE           UART1_BASE
 
-#ifdef CONFIG_IMX_OPTEE
 #ifdef CONFIG_NAND_BOOT
-#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(tee),16m(kernel),16m(dtb),1m(misc),-(rootfs) "
+#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(kernel),16m(dtb),16m(tee),-(rootfs) "
 #else
 #define MFG_NAND_PARTITION ""
 #endif
 
-#else
-#ifdef CONFIG_NAND_BOOT
-#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(kernel),16m(dtb),1m(misc),-(rootfs) "
-#else
-#define MFG_NAND_PARTITION ""
-#endif
-#endif
-
 #ifdef CONFIG_IMX_BOOTAUX
 
 /* Set to QSPI1 B flash at default */
                "root=ubi0:rootfs rootfstype=ubifs "                 \
                MFG_NAND_PARTITION \
                "\0" \
-       "bootcmd=nand read ${loadaddr} 0x5000000 0x800000;"\
-               "nand read ${fdt_addr} 0x6000000 0x100000;"\
+       "bootcmd=nand read ${loadaddr} 0x4000000 0x800000;"\
+               "nand read ${fdt_addr} 0x5000000 0x100000;"\
                "if test ${tee} = yes; then " \
-                       "nand read ${tee_addr} 0x4000000 0x400000;"\
+                       "nand read ${tee_addr} 0x6000000 0x400000;"\
                        "bootm ${teeaddr} - ${fdt_addr};" \
                "else " \
                        "bootz ${loadaddr} - ${fdt_addr};" \
index ff005ab..f663b71 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2015-2016 Freescale Semiconductor, Inc.
- * Copyright 2017 NXP
+ * Copyright 2017-2018 NXP
  *
  * Configuration settings for the Freescale i.MX6UL 14x14 EVK board.
  *
 
 #define CONFIG_SYS_MMC_IMG_LOAD_PART   1
 
-#ifdef CONFIG_IMX_OPTEE
 #ifdef CONFIG_NAND_BOOT
-#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(tee),16m(kernel),16m(dtb),1m(misc),-(rootfs) "
+#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(kernel),16m(dtb),16m(tee),-(rootfs) "
 #else
 #define MFG_NAND_PARTITION ""
 #endif
 
-#else
-#ifdef CONFIG_NAND_BOOT
-#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(kernel),16m(dtb),1m(misc),-(rootfs) "
-#else
-#define MFG_NAND_PARTITION ""
-#endif
-#endif
-
 #define CONFIG_MFG_ENV_SETTINGS \
        "mfgtool_args=setenv bootargs console=${console},${baudrate} " \
                BOOTARGS_CMA_SIZE \
                BOOTARGS_CMA_SIZE \
                MFG_NAND_PARTITION \
                "\0" \
-       "bootcmd=nand read ${loadaddr} 0x5000000 0x800000;"\
-               "nand read ${fdt_addr} 0x6000000 0x100000;"\
+       "bootcmd=nand read ${loadaddr} 0x4000000 0x800000;"\
+               "nand read ${fdt_addr} 0x5000000 0x100000;"\
                "if test ${tee} = yes; then " \
-                       "nand read ${tee_addr} 0x4000000 0x400000;"\
+                       "nand read ${tee_addr} 0x6000000 0x400000;"\
                        "bootm ${teeaddr} - ${fdt_addr};" \
                "else " \
                        "bootz ${loadaddr} - ${fdt_addr};" \
index d576838..daaf188 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 Freescale Semiconductor, Inc.
- * Copyright 2017 NXP
+ * Copyright 2017-2018 NXP
  *
  * Configuration settings for the Freescale i.MX6UL 14x14 EVK board.
  *
 
 #define CONFIG_SYS_MMC_IMG_LOAD_PART   1
 
-#ifdef CONFIG_IMX_OPTEE
 #ifdef CONFIG_NAND_BOOT
-#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(tee),16m(kernel),16m(dtb),1m(misc),-(rootfs) "
+#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(kernel),16m(dtb),16m(tee),-(rootfs) "
 #else
 #define MFG_NAND_PARTITION ""
 #endif
 
-#else
-#ifdef CONFIG_NAND_BOOT
-#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(kernel),16m(dtb),1m(misc),-(rootfs) "
-#else
-#define MFG_NAND_PARTITION ""
-#endif
-#endif
-
 #define CONFIG_MFG_ENV_SETTINGS \
        "mfgtool_args=setenv bootargs console=${console},${baudrate} " \
            BOOTARGS_CMA_SIZE \
                BOOTARGS_CMA_SIZE \
                MFG_NAND_PARTITION \
                "\0" \
-       "bootcmd=nand read ${loadaddr} 0x5000000 0x800000;"\
-               "nand read ${fdt_addr} 0x6000000 0x100000;"\
+       "bootcmd=nand read ${loadaddr} 0x4000000 0x800000;"\
+               "nand read ${fdt_addr} 0x5000000 0x100000;"\
                "if test ${tee} = yes; then " \
-                       "nand read ${tee_addr} 0x4000000 0x400000;"\
+                       "nand read ${tee_addr} 0x6000000 0x400000;"\
                        "bootm ${teeaddr} - ${fdt_addr};" \
                "else " \
                        "bootz ${loadaddr} - ${fdt_addr};" \
index 87c7878..35150af 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2015 Freescale Semiconductor, Inc.
- * Copyright 2017 NXP
+ * Copyright 2017-2018 NXP
  *
  * Configuration settings for the Freescale i.MX7D SABRESD board.
  *
 #define UPDATE_M4_ENV ""
 #endif
 
-#ifdef CONFIG_IMX_OPTEE
 #ifdef CONFIG_NAND_BOOT
-#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(tee),16m(kernel),16m(dtb),1m(misc),-(rootfs) "
+#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(kernel),16m(dtb),16m(tee),-(rootfs) "
 #else
 #define MFG_NAND_PARTITION ""
 #endif
-#else
-#ifdef CONFIG_NAND_BOOT
-#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(kernel),16m(dtb),1m(misc),-(rootfs) "
-#else
-#define MFG_NAND_PARTITION ""
-#endif
-#endif
 
 #define CONFIG_MFG_ENV_SETTINGS \
        "mfgtool_args=setenv bootargs console=${console},${baudrate} " \
                "root=ubi0:rootfs rootfstype=ubifs "                 \
                MFG_NAND_PARTITION \
                "\0" \
-       "bootcmd=nand read ${loadaddr} 0x5000000 0x800000;"\
-               "nand read ${fdt_addr} 0x6000000 0x100000;"\
+       "bootcmd=nand read ${loadaddr} 0x4000000 0x800000;"\
+               "nand read ${fdt_addr} 0x5000000 0x100000;"\
                "if test ${tee} = yes; then " \
-                       "nand read ${tee_addr} 0x4000000 0x100000;"\
+                       "nand read ${tee_addr} 0x6000000 0x400000;"\
                        "bootm ${teeaddr} - ${fdt_addr};" \
                "else " \
                        "bootz ${loadaddr} - ${fdt_addr};" \