summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cleopatre/include/nvram.h4
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/include/asm-arm/arch-spc300/nvram.h1
-rw-r--r--cleopatre/tools/genNVRAM/genNVRAM.c11
-rw-r--r--cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300/nvram.h1
4 files changed, 16 insertions, 1 deletions
diff --git a/cleopatre/include/nvram.h b/cleopatre/include/nvram.h
index c60478cef5..dfb2e4e949 100644
--- a/cleopatre/include/nvram.h
+++ b/cleopatre/include/nvram.h
@@ -55,7 +55,9 @@ typedef struct
char oem_info[64]; // Additional information for OEM
unsigned char tonemask[192]; // HomePlugAV tonemask
char manufactory_info[64]; // Name of the product manufacturer
- uint32_t img_max_size; // Max size of an image in flash
+ uint32_t img_max_size; // Max size of an image in
+ // flash
+ uint32_t cpu_partnb; // SPC3x0 partnb
} spc300_nvram_t; //Currently __attribute__((packed)) not needed
#ifdef __KERNEL__
diff --git a/cleopatre/linux-2.6.25.10-spc300/include/asm-arm/arch-spc300/nvram.h b/cleopatre/linux-2.6.25.10-spc300/include/asm-arm/arch-spc300/nvram.h
index e528d01511..3ebc919191 100644
--- a/cleopatre/linux-2.6.25.10-spc300/include/asm-arm/arch-spc300/nvram.h
+++ b/cleopatre/linux-2.6.25.10-spc300/include/asm-arm/arch-spc300/nvram.h
@@ -55,6 +55,7 @@ typedef struct
unsigned char tonemask[192]; // HomePlugAV tonemask
char manufactory_info[64]; // Name of the product manufacturer
uint32_t img_max_size; // Max size of an image in flash
+ uint32_t cpu_partnb; // SPC3x0 partnb
} spc300_nvram_t; //Currently __attribute__((packed)) not needed
#ifdef __KERNEL__
diff --git a/cleopatre/tools/genNVRAM/genNVRAM.c b/cleopatre/tools/genNVRAM/genNVRAM.c
index 17fb2792e2..d065aea6c8 100644
--- a/cleopatre/tools/genNVRAM/genNVRAM.c
+++ b/cleopatre/tools/genNVRAM/genNVRAM.c
@@ -137,6 +137,7 @@
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
}
#define DEFAULT_MANUFACTORY_INFO "SPiDCOM"
+#define DEFAULT_CPU_PARTNB 2 /* 0002 part number */
#define TONEMASK_LABEL_AV "av"
#define TONEMASK_LABEL_EOC "eoc"
@@ -172,6 +173,7 @@ static spc300_nvram_t nvram = {
.tonemask = DEFAULT_TONEMASK,
.manufactory_info = DEFAULT_MANUFACTORY_INFO,
.img_max_size = DEFAULT_IMAGE_MAX_SIZE, /* Max size of an image in flash */
+ .cpu_partnb = DEFAULT_CPU_PARTNB, /* CPU version (for PRP support) */
};
/*
@@ -206,6 +208,7 @@ static void print_usage(const char *cmd)
" [ --tonemask [av|eoc|eoc-spc200] AV carriers tonemask ]\n" \
" [ --factory manufactory informations ]\n" \
" [ --imgmaxsize max size of an image in flash ]\n",
+ " [ --cpupartnb CPU part number ]\n",
cmd);
}
@@ -461,6 +464,12 @@ static int parse_factory(char *arg)
return 0;
}
+static int parse_cpu_partnb(char *arg)
+{
+ nvram.cpu_partnb = atoi(arg);
+ return 0;
+}
+
static char *chop(char *str)
{
@@ -510,6 +519,7 @@ struct parser parse_table[] =
{ "factory", 'x', parse_factory },
{ "portnb", 'y', parse_portnb },
{ "imgmaxsize", 'z', parse_imgmaxsize },
+ { "cpupartnb", 'A', parse_cpu_partnb },
};
/*
@@ -580,6 +590,7 @@ int main(int argc, char **argv)
{ "factory", required_argument, NULL, 'x' },
{ "portnb", required_argument, NULL, 'y' },
{ "imgmaxsize", required_argument, NULL, 'z' },
+ { "cpupartnb", required_argument, NULL, 'A' },
};
while( ( c = getopt_long_only(argc, argv, "", long_opts, &opt_index) ) != -1 )
diff --git a/cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300/nvram.h b/cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300/nvram.h
index 19f0bd2ca2..879fe3f29a 100644
--- a/cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300/nvram.h
+++ b/cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300/nvram.h
@@ -204,6 +204,7 @@ typedef struct
unsigned char tonemask[192]; // HomePlugAV tonemask
char manufactory_info[64]; // Name of the product manufacturer
uint32_t img_max_size; // Max size of an image in flash
+ uint32_t cpu_partnb; // SPC3x0 partnb
} spc300_nvram_t; //Currently __attribute__((packed)) not needed
// Bit manipulation macros