aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Protsenko2018-04-19 23:57:30 +0300
committerTom Rini2018-05-08 18:50:22 -0400
commitc90a760ffd432803b3c9f60ad3d0ad098f14c8e7 (patch)
treec454ee4c746fbbb20a1eff540ca659dee3acb197
parent14249635b6aa7615f356099cfb349d0a820f9bed (diff)
arm: ti: boot: Extract PARTS_DEFAULT to boot.h
Eliminate code duplication: the same PARTS_DEFAULT was defined in am57xx_evm.h and in dra7xx_evm.h. Extract it to environment/boot.h and use in all OMAP5-based boards. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
-rw-r--r--include/configs/am57xx_evm.h25
-rw-r--r--include/configs/cl-som-am57x.h2
-rw-r--r--include/configs/cm_t54.h2
-rw-r--r--include/configs/dra7xx_evm.h25
-rw-r--r--include/environment/ti/boot.h27
5 files changed, 29 insertions, 52 deletions
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h
index d91d08e8eb2..42f271dd5ff 100644
--- a/include/configs/am57xx_evm.h
+++ b/include/configs/am57xx_evm.h
@@ -37,31 +37,6 @@
#define CONFIG_SYS_OMAP_ABE_SYSCK
-/* Define the default GPT table for eMMC */
-#define PARTS_DEFAULT \
- /* Linux partitions */ \
- "uuid_disk=${uuid_gpt_disk};" \
- "name=bootloader,start=384K,size=1792K,uuid=${uuid_gpt_bootloader};" \
- "name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}\0" \
- /* Android partitions */ \
- "partitions_android=" \
- "uuid_disk=${uuid_gpt_disk};" \
- "name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};" \
- "name=bootloader,size=1792K,uuid=${uuid_gpt_bootloader};" \
- "name=environment,size=128K,uuid=${uuid_gpt_environment};" \
- "name=misc,size=128K,uuid=${uuid_gpt_misc};" \
- "name=reserved,size=256K,uuid=${uuid_gpt_reserved};" \
- "name=efs,size=16M,uuid=${uuid_gpt_efs};" \
- "name=crypto,size=16K,uuid=${uuid_gpt_crypto};" \
- "name=recovery,size=40M,uuid=${uuid_gpt_recovery};" \
- "name=boot,size=10M,uuid=${uuid_gpt_boot};" \
- "name=system,size=768M,uuid=${uuid_gpt_system};" \
- "name=vendor,size=256M,uuid=${uuid_gpt_vendor};" \
- "name=cache,size=256M,uuid=${uuid_gpt_cache};" \
- "name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};" \
- "name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};" \
- "name=userdata,size=-,uuid=${uuid_gpt_userdata}"
-
#define DFUARGS \
"dfu_bufsiz=0x10000\0" \
DFU_ALT_INFO_MMC \
diff --git a/include/configs/cl-som-am57x.h b/include/configs/cl-som-am57x.h
index 58bf0a6aa47..f0e1e8280c1 100644
--- a/include/configs/cl-som-am57x.h
+++ b/include/configs/cl-som-am57x.h
@@ -17,6 +17,8 @@
#define CONFIG_SYS_OMAP_ABE_SYSCK
+#define PARTS_DEFAULT
+
#include <configs/ti_omap5_common.h>
/* misc */
diff --git a/include/configs/cm_t54.h b/include/configs/cm_t54.h
index 3787cdc9d4d..cda1b5528ff 100644
--- a/include/configs/cm_t54.h
+++ b/include/configs/cm_t54.h
@@ -13,6 +13,8 @@
#define CONFIG_CM_T54
#define CONFIG_DRAM_2G
+#define PARTS_DEFAULT
+
#include <configs/ti_omap5_common.h>
/* EEPROM related defines */
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 339f4f5939a..fa3f2b92fef 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -44,31 +44,6 @@
#define CONFIG_SYS_OMAP_ABE_SYSCK
#ifndef CONFIG_SPL_BUILD
-/* Define the default GPT table for eMMC */
-#define PARTS_DEFAULT \
- /* Linux partitions */ \
- "uuid_disk=${uuid_gpt_disk};" \
- "name=bootloader,start=384K,size=1792K,uuid=${uuid_gpt_bootloader};" \
- "name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}\0" \
- /* Android partitions */ \
- "partitions_android=" \
- "uuid_disk=${uuid_gpt_disk};" \
- "name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};" \
- "name=bootloader,size=1792K,uuid=${uuid_gpt_bootloader};" \
- "name=environment,size=128K,uuid=${uuid_gpt_environment};" \
- "name=misc,size=128K,uuid=${uuid_gpt_misc};" \
- "name=reserved,size=256K,uuid=${uuid_gpt_reserved};" \
- "name=efs,size=16M,uuid=${uuid_gpt_efs};" \
- "name=crypto,size=16K,uuid=${uuid_gpt_crypto};" \
- "name=recovery,size=40M,uuid=${uuid_gpt_recovery};" \
- "name=boot,size=10M,uuid=${uuid_gpt_boot};" \
- "name=system,size=768M,uuid=${uuid_gpt_system};" \
- "name=vendor,size=256M,uuid=${uuid_gpt_vendor};" \
- "name=cache,size=256M,uuid=${uuid_gpt_cache};" \
- "name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};" \
- "name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};" \
- "name=userdata,size=-,uuid=${uuid_gpt_userdata}"
-
#define DFUARGS \
"dfu_bufsiz=0x10000\0" \
DFU_ALT_INFO_MMC \
diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h
index a0e1cd1656a..a43b211df5e 100644
--- a/include/environment/ti/boot.h
+++ b/include/environment/ti/boot.h
@@ -14,8 +14,31 @@
#endif
#ifndef PARTS_DEFAULT
-#define PARTS_DEFAULT
-#endif
+/* Define the default GPT table for eMMC */
+#define PARTS_DEFAULT \
+ /* Linux partitions */ \
+ "uuid_disk=${uuid_gpt_disk};" \
+ "name=bootloader,start=384K,size=1792K,uuid=${uuid_gpt_bootloader};" \
+ "name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}\0" \
+ /* Android partitions */ \
+ "partitions_android=" \
+ "uuid_disk=${uuid_gpt_disk};" \
+ "name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};" \
+ "name=bootloader,size=1792K,uuid=${uuid_gpt_bootloader};" \
+ "name=environment,size=128K,uuid=${uuid_gpt_environment};" \
+ "name=misc,size=128K,uuid=${uuid_gpt_misc};" \
+ "name=reserved,size=256K,uuid=${uuid_gpt_reserved};" \
+ "name=efs,size=16M,uuid=${uuid_gpt_efs};" \
+ "name=crypto,size=16K,uuid=${uuid_gpt_crypto};" \
+ "name=recovery,size=40M,uuid=${uuid_gpt_recovery};" \
+ "name=boot,size=10M,uuid=${uuid_gpt_boot};" \
+ "name=system,size=768M,uuid=${uuid_gpt_system};" \
+ "name=vendor,size=256M,uuid=${uuid_gpt_vendor};" \
+ "name=cache,size=256M,uuid=${uuid_gpt_cache};" \
+ "name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};" \
+ "name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};" \
+ "name=userdata,size=-,uuid=${uuid_gpt_userdata}"
+#endif /* PARTS_DEFAULT */
#define DEFAULT_COMMON_BOOT_TI_ARGS \
"console=" CONSOLEDEV ",115200n8\0" \