[PATCH 13/20] scripts: imx-image: Add i.MX8MP support

Sascha Hauer s.hauer at pengutronix.de
Tue Jun 23 09:15:59 EDT 2020


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 scripts/imx/imx.c | 1 +
 scripts/imx/imx.h | 9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/scripts/imx/imx.c b/scripts/imx/imx.c
index 5eacfdf76b..4d2f65af9b 100644
--- a/scripts/imx/imx.c
+++ b/scripts/imx/imx.c
@@ -240,6 +240,7 @@ static struct soc_type socs[] = {
 	{ .name = "imx6",   .header_version = 2, .cpu_type = IMX_CPU_IMX6,   .header_gap = 0,      .first_opcode = 0xea0003fe /* b 0x1000 */},
 	{ .name = "imx7",   .header_version = 2, .cpu_type = IMX_CPU_IMX7,   .header_gap = 0,      .first_opcode = 0xea0003fe /* b 0x1000 */},
 	{ .name = "imx8mm", .header_version = 2, .cpu_type = IMX_CPU_IMX8MM, .header_gap = SZ_32K, .first_opcode = 0x14000000 /* b 0x0000 (offset computed) */},
+	{ .name = "imx8mp", .header_version = 2, .cpu_type = IMX_CPU_IMX8MP, .header_gap = SZ_32K, .first_opcode = 0x14000000 /* b 0x0000 (offset computed) */},
 	{ .name = "imx8mq", .header_version = 2, .cpu_type = IMX_CPU_IMX8MQ, .header_gap = SZ_32K, .first_opcode = 0x14000000 /* b 0x0000 (offset computed) */},
 	{ .name = "vf610",  .header_version = 2, .cpu_type = IMX_CPU_VF610,  .header_gap = 0,      .first_opcode = 0xea0003fe /* b 0x1000 */},
 };
diff --git a/scripts/imx/imx.h b/scripts/imx/imx.h
index d466e5dad0..7a3ac31cd2 100644
--- a/scripts/imx/imx.h
+++ b/scripts/imx/imx.h
@@ -4,7 +4,14 @@
 
 static inline int cpu_is_mx8m(const struct config_data *data)
 {
-	return data->cpu_type == IMX_CPU_IMX8MQ || data->cpu_type == IMX_CPU_IMX8MM;
+	switch (data->cpu_type) {
+	case IMX_CPU_IMX8MQ:
+	case IMX_CPU_IMX8MM:
+	case IMX_CPU_IMX8MP:
+		return true;
+	default:
+		return false;
+	}
 }
 
 int parse_config(struct config_data *data, const char *filename);
-- 
2.27.0




More information about the barebox mailing list