rimage: Add support for imx8m

This defines the iram/dram/sram memory zones and creates
a new machine type for i.MX8M.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This commit is contained in:
Daniel Baluta 2020-01-11 19:38:37 +02:00 committed by Daniel Baluta
parent b00869e204
commit 0781a4bed5
3 changed files with 34 additions and 0 deletions

View File

@ -40,6 +40,14 @@
#define IMX8_SRAM_BASE 0x92400000
#define IMX8_SRAM_SIZE 0x800000
#define IMX8M_IRAM_BASE 0x3b6f8000
#define IMX8M_IRAM_HOST_OFFSET 0x10000
#define IMX8M_IRAM_SIZE 0x800
#define IMX8M_DRAM_BASE 0x3b6f8000
#define IMX8M_DRAM_SIZE 0x8000
#define IMX8M_SRAM_BASE 0x92400000
#define IMX8M_SRAM_SIZE 0x800000
static int get_mem_zone_type(struct image *image, Elf32_Shdr *section)
{
const struct adsp *adsp = image->adsp;
@ -591,3 +599,26 @@ const struct adsp machine_imx8x = {
.machine_id = MACHINE_IMX8X,
.write_firmware = simple_write_firmware,
};
const struct adsp machine_imx8m = {
.name = "imx8m",
.mem_zones = {
[SOF_FW_BLK_TYPE_IRAM] = {
.base = IMX8M_IRAM_BASE,
.size = IMX8M_IRAM_SIZE,
.host_offset = IMX8M_IRAM_HOST_OFFSET,
},
[SOF_FW_BLK_TYPE_DRAM] = {
.base = IMX8M_DRAM_BASE,
.size = IMX8M_DRAM_SIZE,
.host_offset = 0,
},
[SOF_FW_BLK_TYPE_SRAM] = {
.base = IMX8M_SRAM_BASE,
.size = IMX8M_SRAM_SIZE,
.host_offset = 0,
},
},
.machine_id = MACHINE_IMX8M,
.write_firmware = simple_write_firmware,
};

View File

@ -28,6 +28,7 @@ static const struct adsp *machine[] = {
&machine_skl,
&machine_imx8,
&machine_imx8x,
&machine_imx8m,
};
static void usage(char *name)

View File

@ -39,6 +39,7 @@ enum machine_id {
MACHINE_SUECREEK,
MACHINE_IMX8,
MACHINE_IMX8X,
MACHINE_IMX8M,
MACHINE_MAX
};
@ -195,5 +196,6 @@ extern const struct adsp machine_skl;
extern const struct adsp machine_kbl;
extern const struct adsp machine_imx8;
extern const struct adsp machine_imx8x;
extern const struct adsp machine_imx8m;
#endif