summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/include/asm/arch/spid_img_desc.h46
1 files changed, 44 insertions, 2 deletions
diff --git a/common/include/asm/arch/spid_img_desc.h b/common/include/asm/arch/spid_img_desc.h
index ef96b84e78..82d2b89e11 100644
--- a/common/include/asm/arch/spid_img_desc.h
+++ b/common/include/asm/arch/spid_img_desc.h
@@ -51,7 +51,20 @@
(desc)->is_valid && \
( (desc)->index != SPIDCOM_IMG_DESC_INVALID_INDEX ) )
-/* /!\ All values are LITTLE-ENDIAN */
+/**
+ * List of image type supported.
+ */
+typedef enum {
+ SPIDCOM_IMG_DESC_IMAGE_TYPE_200,
+ SPIDCOM_IMG_DESC_IMAGE_TYPE_300,
+ SPIDCOM_IMG_DESC_IMAGE_TYPE_NB,
+ SPIDCOM_IMG_DESC_IMAGE_TYPE_UNKNOWN,
+} spidcom_image_desc_image_type_t;
+
+/**
+ * Image descriptor for SPC300 (and MSE500-300).
+ * All values are in little-endian.
+ */
typedef struct {
char magic[8]; /* Magic number = "SPIDIMG\0"
* = { 0x53, 0x50, 0x49, 0x44,
@@ -71,6 +84,35 @@ typedef struct {
char board_type[32]; /* Board type string */
char reserved[864];
char image[0]; /* Used in bootloader to mark beging of the payload */
-} spidcom_image_desc_t;
+} spidcom_image_desc_300_t;
+
+/**
+ * Image descriptor for SPC200 (and MSE500-200).
+ * All values are in little-endian.
+ */
+typedef struct {
+ char magic[8]; /* Magic number = "SPIDIMG\0"
+ * = { 0x53, 0x50, 0x49, 0x44,
+ * 0x49, 0x4d, 0x47, 0x00 } */
+ uint32_t index; /* The biggest one is the image to boot */
+ uint32_t is_valid:1; /* Is image valid (bootable ?) */
+ uint32_t is_1st_boot:1; /* Is first image boot ? */
+ uint32_t is_not_success:1; /* Is first boot successful ? */
+ uint32_t size; /* Firmware size (descriptor included) */
+ uint32_t type; /* Image type : 0 is normal image */
+ uint8_t md5_sum[16]; /* MD5 checksum of the whole firmware */
+ char version[64]; /* Image version string */
+ char description[64]; /* Image description string */
+ uint32_t arch; /* spc200e, spc200c or unknown */
+ char reserved[852];
+ char image[0]; /* Used in bootloader */
+} spidcom_image_desc_200_t;
+
+/* For more information on ARCH_IS_POLUX, see polux/include/image_desc.h. */
+#ifdef ARCH_IS_POLUX
+typedef spidcom_image_desc_200_t spidcom_image_desc_t;
+#else
+typedef spidcom_image_desc_300_t spidcom_image_desc_t;
+#endif
#endif /* __ASM_ARCH_SPID_IMG_DESC_H */