summaryrefslogtreecommitdiff
path: root/cleopatre/linux-2.6.25.10-spc300
diff options
context:
space:
mode:
authorsave2009-07-27 12:49:38 +0000
committersave2009-07-27 12:49:38 +0000
commit9b509f12cba1f8a7bec0e6b37ad818322af95af2 (patch)
tree054962e9c25e025a12cab178af879990427b531f /cleopatre/linux-2.6.25.10-spc300
parent7d6aa6554dec54c7834725a2cf0f2d601561efd8 (diff)
[CLEO][U-BOOT]Detection of leon needed ram size
- Changed image_desc : added a plc_ram field under linux and u-boot - Passed the new SDRAM size to linux under u-boot git-svn-id: svn+ssh://pessac/svn/cesar/trunk@5079 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cleopatre/linux-2.6.25.10-spc300')
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/tools/mkimagedesc/image_desc.h11
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/tools/mkimagedesc/mkimagedesc.c17
2 files changed, 16 insertions, 12 deletions
diff --git a/cleopatre/linux-2.6.25.10-spc300/tools/mkimagedesc/image_desc.h b/cleopatre/linux-2.6.25.10-spc300/tools/mkimagedesc/image_desc.h
index bf69ba63fb..74134750bb 100644
--- a/cleopatre/linux-2.6.25.10-spc300/tools/mkimagedesc/image_desc.h
+++ b/cleopatre/linux-2.6.25.10-spc300/tools/mkimagedesc/image_desc.h
@@ -17,6 +17,8 @@
#define SPIDCOM_IMG_DESC_NORMAL_TYPE 0x0
+#define SPIDCOM_IMG_DESC_PLC_RAM 0x400000 /* 4M */
+
#define SPIDCOM_IMG_DESC_IS_VALID(desc) ( !memcmp((desc)->magic, SPIDCOM_IMG_DESC_MAGIC, 8) && \
(desc)->is_valid && \
( (desc)->index != SPIDCOM_IMG_DESC_INVALID_INDEX ) )
@@ -24,8 +26,8 @@
/* /!\ All values are LITTLE-ENDIAN */
typedef struct {
char magic[8]; /* Magic number = "SPIDIMG\0"
- * = { 0x53, 0x50, 0x49, 0x44,
- * 0x49, 0x4d, 0x47, 0x00 } */
+ * = { 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 ? */
@@ -36,8 +38,9 @@ typedef struct {
uint8_t md5_sum[16]; /* MD5 checksum of the whole firmware */
char version[16]; /* Image version string */
char description[64]; /* Image description string */
- uint32_t arch; /* spc300 or unknown */
- char reserved[904];
+ uint32_t arch; /* spc300 or unknown */
+ uint32_t plc_ram; /* RAM size needed for the PLC processor */
+ char reserved[900];
char image[0]; /* Used in bootloader to mark beging of the payload */
} spidcom_image_desc_t;
diff --git a/cleopatre/linux-2.6.25.10-spc300/tools/mkimagedesc/mkimagedesc.c b/cleopatre/linux-2.6.25.10-spc300/tools/mkimagedesc/mkimagedesc.c
index 2781233b4c..d4c81ae8ed 100644
--- a/cleopatre/linux-2.6.25.10-spc300/tools/mkimagedesc/mkimagedesc.c
+++ b/cleopatre/linux-2.6.25.10-spc300/tools/mkimagedesc/mkimagedesc.c
@@ -1,6 +1,6 @@
/*
* /linux/tools/mkimagedesc/mkimagedesc.c
- *
+ *
* (C) Copyright 2008 SPiDCOM Technologies
*
* This program is free software; you can redistribute it and/or
@@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
- * Author(s):
+ * Author(s):
* 30 Apr 2009 Drasko DRASKOVIC <drasko.draskovic@spidcom.com>
*/
@@ -43,21 +43,22 @@ spidcom_image_desc_t image = {
.type = 0,
.version = "v0.0",
.description = "SPiDCOM image",
- .arch = SPIDCOM_IMG_DESC_SPC300
+ .arch = SPIDCOM_IMG_DESC_SPC300,
+ .plc_ram = SPIDCOM_IMG_DESC_PLC_RAM
};
-static void print_usage(const char *cmd)
+static void print_usage(const char *cmd)
{
fprintf(stderr, "%s : \n", cmd);
}
int main(int argc, char **argv)
-{
+{
int c, i = 0;
int j = 0;
char tmpstr[3];
- struct option opt[] =
+ struct option opt[] =
{
{ "size", required_argument, NULL, 's' },
{ "ldaddr", required_argument, NULL, 'l' },
@@ -103,7 +104,7 @@ int main(int argc, char **argv)
return -1;
}
}
-
- write(fileno(stdout), &image, sizeof(image));
+
+ write(fileno(stdout), &image, sizeof(image));
return 0;
}