From 5f0b1fd4f404fb2b86e86b4edb98c3bb0a41afa6 Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Sun, 12 Jan 2020 18:17:09 +0200 Subject: [PATCH] rimage: Add support for i.MX8X i.MX8X is very similar with i.MX8. Memory layout is the same except IRQSTEER address. Code will be shared but there will be different firmware binaries named: * sof-imx8.ri, for i.MX8 * sof-imx8x.ri, for i.MX8X Signed-off-by: Daniel Baluta --- rimage/file_simple.c | 23 +++++++++++++++++++++++ rimage/rimage.c | 1 + rimage/rimage.h | 3 ++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/rimage/file_simple.c b/rimage/file_simple.c index be64c7d8a..fbd3dd65e 100644 --- a/rimage/file_simple.c +++ b/rimage/file_simple.c @@ -568,3 +568,26 @@ const struct adsp machine_imx8 = { .machine_id = MACHINE_IMX8, .write_firmware = simple_write_firmware, }; + +const struct adsp machine_imx8x = { + .name = "imx8x", + .mem_zones = { + [SOF_FW_BLK_TYPE_IRAM] = { + .base = IMX8_IRAM_BASE, + .size = IMX8_IRAM_SIZE, + .host_offset = IMX8_IRAM_HOST_OFFSET, + }, + [SOF_FW_BLK_TYPE_DRAM] = { + .base = IMX8_DRAM_BASE, + .size = IMX8_DRAM_SIZE, + .host_offset = 0, + }, + [SOF_FW_BLK_TYPE_SRAM] = { + .base = IMX8_SRAM_BASE, + .size = IMX8_SRAM_SIZE, + .host_offset = 0, + }, + }, + .machine_id = MACHINE_IMX8X, + .write_firmware = simple_write_firmware, +}; diff --git a/rimage/rimage.c b/rimage/rimage.c index 5d18b96d9..64982f0fb 100644 --- a/rimage/rimage.c +++ b/rimage/rimage.c @@ -27,6 +27,7 @@ static const struct adsp *machine[] = { &machine_kbl, &machine_skl, &machine_imx8, + &machine_imx8x, }; static void usage(char *name) diff --git a/rimage/rimage.h b/rimage/rimage.h index 9c3cf8e35..545e7be1e 100644 --- a/rimage/rimage.h +++ b/rimage/rimage.h @@ -38,6 +38,7 @@ enum machine_id { MACHINE_TIGERLAKE, MACHINE_SUECREEK, MACHINE_IMX8, + MACHINE_IMX8X, MACHINE_MAX }; @@ -193,6 +194,6 @@ extern const struct adsp machine_sue; extern const struct adsp machine_skl; extern const struct adsp machine_kbl; extern const struct adsp machine_imx8; - +extern const struct adsp machine_imx8x; #endif