Commit 621146d8 authored by Grzegorz Jaszczyk's avatar Grzegorz Jaszczyk Committed by Marcin Wojtas
Browse files

plat: marvell: armada: scp_bl2: allow loading up to 8 images



Extend possible images to 8, additionaly add another type which will be
used with platform containing up to 3 CPs.

Change-Id: Ib68092d11af9801e344d02de839f53127e056e46
Signed-off-by: default avatarGrzegorz Jaszczyk <jaz@semihalf.com>
parent 81646055
......@@ -8,7 +8,7 @@
#ifndef MSS_SCP_BL2_FORMAT_H
#define MSS_SCP_BL2_FORMAT_H
#define MAX_NR_OF_FILES 5
#define MAX_NR_OF_FILES 8
#define FILE_MAGIC 0xddd01ff
#define HEADER_VERSION 0x1
......@@ -31,6 +31,7 @@ enum cm3_t {
MSS_CP3,
MG_CP0,
MG_CP1,
MG_CP2,
};
typedef struct img_header {
......
......@@ -250,7 +250,13 @@ static int load_img_to_cm3(enum cm3_t cm3_type,
break;
case MG_CP0:
case MG_CP1:
case MG_CP2:
cp_index = cm3_type - MG_CP0;
if (bl2_plat_get_cp_count(0) <= cp_index) {
NOTICE("Skipping MG CP%d related image\n",
cp_index);
break;
}
NOTICE("Load image to CP%d MG\n", cp_index);
ret = mg_image_load(single_img, image_size,
MG_CM3_SRAM_BASE(cp_index));
......@@ -288,7 +294,7 @@ static int split_and_load_bl2_image(void *image)
}
if (file_hdr->nr_of_imgs > MAX_NR_OF_FILES) {
ERROR("SCP_BL2 concatenated image contains to many images\n");
ERROR("SCP_BL2 concatenated image contains too many images\n");
return -1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment