summaryrefslogtreecommitdiff
path: root/cleopatre
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre')
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/include/asm-arm/arch-spc300/nvram.h14
-rw-r--r--cleopatre/tools/genNVRAM/Makefile (renamed from cleopatre/u-boot-1.1.6/tools/genNVRAM/Makefile)7
-rw-r--r--cleopatre/tools/genNVRAM/genNVRAM.c (renamed from cleopatre/u-boot-1.1.6/tools/genNVRAM/genNVRAM.c)53
-rw-r--r--cleopatre/tools/genNVRAM/nvram300.conf (renamed from cleopatre/u-boot-1.1.6/tools/genNVRAM/nvram300.conf)0
-rw-r--r--cleopatre/u-boot-1.1.6/board/arizona/arizona.c2
-rw-r--r--cleopatre/u-boot-1.1.6/board/arizona/flash_spi.c2
-rw-r--r--cleopatre/u-boot-1.1.6/board/spk300g/flash.c2
-rw-r--r--cleopatre/u-boot-1.1.6/board/spk300g/spk300g.c2
-rw-r--r--cleopatre/u-boot-1.1.6/common/cmd_misc.c2
-rw-r--r--cleopatre/u-boot-1.1.6/common/cmd_spidboot.c2
-rw-r--r--cleopatre/u-boot-1.1.6/cpu/spc300-fcm3/timer.c2
-rw-r--r--cleopatre/u-boot-1.1.6/cpu/spc300/serial.c2
-rw-r--r--cleopatre/u-boot-1.1.6/cpu/spc300/timer.c2
-rw-r--r--cleopatre/u-boot-1.1.6/drivers/netspcmac_eth.c2
-rw-r--r--cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300-fcm3/nvram.h55
-rw-r--r--cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300-fcm3/spc300_nvram.h58
-rw-r--r--cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300/nvram.h55
-rw-r--r--cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300/spc300_nvram.h58
-rw-r--r--cleopatre/u-boot-1.1.6/net/spidupd.c2
-rw-r--r--cleopatre/u-boot-1.1.6/tools/mknvram/Makefile56
-rw-r--r--cleopatre/u-boot-1.1.6/tools/mknvram/mknvram.c121
-rwxr-xr-xcleopatre/u-boot-1.1.6/tools/mknvram/mknvram.sh6
-rw-r--r--cleopatre/u-boot-1.1.6/tools/mknvram/spc300_nvram.h56
-rwxr-xr-xcleopatre/u-boot-1.1.6/tools/mknvram/test_mknvram.sh12
24 files changed, 167 insertions, 406 deletions
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 a2e0356b48..ba7dde3a93 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
@@ -23,26 +23,26 @@
#define __ASM_ARCH_NVRAM_H
#define SPC300_NVRAM_MAGIC "NVRAM\0\0\0"
-#define SPC300_NVRAM_IS_VALID(nvram) (!memcmp((nvram)->magic, SPC300_NVRAM_MAGIC, 8))
+/* /!\ All values are LITTLE-ENDIAN */
typedef struct
{
char magic[8]; // Magic number "NVRAM\0\0\0"
uint32_t pkg_cfg; // SPC300 package configuration register
-// uint32_t gpio_0_7_cfg; // SPC300 GPIO 0 to 7 configuration register
-// uint32_t gpio_8_15_cfg; // SPC300 GPIO 8 to 15 configuration register
+ uint32_t gpio_0_7_cfg; // SPC300 GPIO 0 to 7 configuration register
+ uint32_t gpio_8_15_cfg; // SPC300 GPIO 8 to 15 configuration register
uint32_t sdram_config; // SPC300 SDRAM configuration register
uint32_t sdram_timing0; // SPC300 SDRAM timing register 0
uint32_t sdram_timing1; // SPC300 SDRAM timing register 1
uint32_t sdram_refresh; // SPC300 SDRAM refresh register
-// uint32_t flash_org; // Flash organization
-// uint32_t img_0_offset; // Offset of first image address
+ uint32_t flash_org; // Flash organization
+ uint32_t img_0_offset; // Offset of first image address
uint32_t nb_images; // Max Number of Images present in flash
char product_name[64]; // Product short name in string format
char product_partnb[64]; // Product part number in string format
char product_desc[128]; // Product long description in string format
char serial_number[64]; // Product serial number in string format
-// uint32_t eth_phy_addr; // Address of Ethernet PHY
+ uint32_t eth_phy_addr; // Address of Ethernet PHY
unsigned char eth_address[6]; // Ethernet MAC address
unsigned char reserved1[2];
unsigned char plc_address[6]; // PowerLine MAC address
@@ -52,6 +52,7 @@ typedef struct
unsigned char tonemask[192]; // HomePlugAV tonemask
} spc300_nvram_t; //Currently __attribute__((packed)) not needed
+#ifdef __KERNEL__
extern spc300_nvram_t spc300_nvram;
static inline void spc300_nvram_copy(void* dst, void* src, unsigned int length)
@@ -83,5 +84,6 @@ static inline void spc300_nvram_copy(void* dst, void* src, unsigned int length)
}
}
}
+#endif
#endif /* __ASM_ARCH_NVRAM_H */
diff --git a/cleopatre/u-boot-1.1.6/tools/genNVRAM/Makefile b/cleopatre/tools/genNVRAM/Makefile
index c5a14f7919..fad03d7cb8 100644
--- a/cleopatre/u-boot-1.1.6/tools/genNVRAM/Makefile
+++ b/cleopatre/tools/genNVRAM/Makefile
@@ -18,14 +18,11 @@
#
TOPDIR=../..
-LINUX_DIR=$(TOPDIR)/linux-2.6.10
-CFLAGS= -I$(TOPDIR)/include -I$(LINUX_DIR)/include -D__LINUX__
+LINUX_DIR=$(TOPDIR)/linux-2.6.25.10-spc300
+CFLAGS= -I$(LINUX_DIR)/include
all: genNVRAM
-debug: CFLAGS += -g
-debug: all
-
genNVRAM: genNVRAM.c
$(CC) $(CFLAGS) -o $@ $<
diff --git a/cleopatre/u-boot-1.1.6/tools/genNVRAM/genNVRAM.c b/cleopatre/tools/genNVRAM/genNVRAM.c
index 8e9da155bf..ba0d2a8dea 100644
--- a/cleopatre/u-boot-1.1.6/tools/genNVRAM/genNVRAM.c
+++ b/cleopatre/tools/genNVRAM/genNVRAM.c
@@ -32,21 +32,21 @@
#include <sys/types.h>
#include <inttypes.h>
-#include "../../include/asm-arm/arch-spc300/spc300_nvram.h"
+#include "asm-arm/arch-spc300/nvram.h"
#define HWADDR_LEN 6
static spc300_nvram_t nvram = {
.magic = SPC300_NVRAM_MAGIC, /* magic number "NVRAM\0\0\0" */
.pkg_cfg = 0, /* SPC300 package configuration register */
- .gpio_0_7_cfg = 0, /* SPC300 GPIO 0 to 7 configuration register */
- .gpio_8_15_cfg = 0, /* SPC300 GPIO 8 to 15 configuration register */
+ .gpio_0_7_cfg = 0, /* SPC300 GPIO 0 to 7 configuration register */
+ .gpio_8_15_cfg = 0, /* SPC300 GPIO 8 to 15 configuration register */
.sdram_config = 0, /* SPC300 SDRAM configuration register */
.sdram_timing0 = 0, /* SPC300 SDRAM timing register 0 */
.sdram_timing1 = 0, /* SPC300 SDRAM timing register 1 */
.sdram_refresh = 0, /* SPC300 SDRAM refresh register */
- .flash_org = 0, /* Flash organization */
- .img_0_offset = 0, /* offset of first image address */
+ .flash_org = 0, /* Flash organization */
+ .img_0_offset = 0, /* offset of first image address */
.nb_images = 1 /* Max Number of Images present in flash */
#if 0 /* product short name in string format */
.product_name = /* product part number in string format */
@@ -66,15 +66,22 @@ static spc300_nvram_t nvram = {
*/
static void print_usage(const char *cmd)
{
- fprintf(stderr, "Usage : %s " \
- "[ --infile base_conf ]" \
- "[ --oufile result_file ]" \
- "[ --sconr SDRAM config register ]" \
- "[ --stmg0r SDRAM timing0 register ]" \
- "[ --stmg1r SDRAM timing1 register ]" \
- "[ --srefr SDRAM refresh register ]" \
- "[ --ether MAC address ]" \
- "[ --nbimg number of Linux images]\n",
+ fprintf(stderr, "Usage : %s\n" \
+ " [ --infile base_conf ]\n" \
+ " [ --oufile result_file ]\n" \
+ " [ --pkgcfg package number ]\n" \
+ " [ --gpio07 GPIO 0 to 7 config ]\n" \
+ " [ --gpio815 GPIO 8 to 15 config ]\n" \
+ " [ --sconr SDRAM config register ]\n" \
+ " [ --stmg0r SDRAM timing0 register ]\n" \
+ " [ --stmg1r SDRAM timing1 register ]\n" \
+ " [ --srefr SDRAM refresh register ]\n" \
+ " [ --forg flash organization ]\n" \
+ " [ --img0off first image offset in flash ]\n" \
+ " [ --phy Ethernet PHY address ]\n" \
+ " [ --ether MAC address ]\n" \
+ " [ --plc MAC address ]\n" \
+ " [ --nbimg number of Linux images]\n",
cmd);
}
@@ -161,6 +168,12 @@ static int parse_eth(char *arg)
return 0;
}
+static int parse_plc(char *arg)
+{
+ str2hwaddr(nvram.plc_address, arg);
+ return 0;
+}
+
static int parse_nbimg(char *arg)
{
return( nvram.nb_images = atoi(arg) );
@@ -200,6 +213,7 @@ struct parser parse_table[] =
{ "img0off", parse_img0off },
{ "phy", parse_phy },
{ "ethernet", parse_eth },
+ { "plc", parse_plc },
{ "nbimg", parse_nbimg }
};
@@ -263,10 +277,11 @@ int main(int argc, char **argv)
{ "img0off", required_argument, NULL, 'z' },
{ "phy", required_argument, NULL, 'y' },
{ "ether", required_argument, NULL, 'e' },
+ { "plc", required_argument, NULL, 'l' },
{ "nbimg", required_argument, NULL, 'n' }
};
- while( ( c = getopt_long_only(argc, argv, "i:o:p:g:h:c:t:m:r:f:z:y:e:n:", long_opts, &opt_index) ) != -1 )
+ while( ( c = getopt_long_only(argc, argv, "i:o:p:g:h:c:t:m:r:f:z:y:e:l:n:", long_opts, &opt_index) ) != -1 )
{
switch(c)
{
@@ -306,10 +321,13 @@ int main(int argc, char **argv)
case 'y' : /* eth phy addr */
nvram.eth_phy_addr = (uint32_t)strtoul(optarg, NULL, 0);
break;
- case 'e' : /* ether */
+ case 'e' : /* ether addr */
str2hwaddr(nvram.eth_address, optarg);
break;
- case 'n' : /* image1 */
+ case 'l' : /* plc addr */
+ str2hwaddr(nvram.plc_address, optarg);
+ break;
+ case 'n' : /* nb images */
nvram.nb_images = atoi(optarg);
break;
@@ -323,3 +341,4 @@ int main(int argc, char **argv)
write(fileno(stdout), &nvram, sizeof(nvram));
return 0;
}
+
diff --git a/cleopatre/u-boot-1.1.6/tools/genNVRAM/nvram300.conf b/cleopatre/tools/genNVRAM/nvram300.conf
index 3bf6dcf2c6..3bf6dcf2c6 100644
--- a/cleopatre/u-boot-1.1.6/tools/genNVRAM/nvram300.conf
+++ b/cleopatre/tools/genNVRAM/nvram300.conf
diff --git a/cleopatre/u-boot-1.1.6/board/arizona/arizona.c b/cleopatre/u-boot-1.1.6/board/arizona/arizona.c
index 29eb43bc69..d7e92aac39 100644
--- a/cleopatre/u-boot-1.1.6/board/arizona/arizona.c
+++ b/cleopatre/u-boot-1.1.6/board/arizona/arizona.c
@@ -21,7 +21,7 @@
#include <common.h>
#include <asm/arch/hardware.h>
-#include <asm/arch/spc300_nvram.h>
+#include <asm/arch/nvram.h>
#if defined(CONFIG_SHOW_BOOT_PROGRESS)
void show_boot_progress(int progress)
diff --git a/cleopatre/u-boot-1.1.6/board/arizona/flash_spi.c b/cleopatre/u-boot-1.1.6/board/arizona/flash_spi.c
index c28dd5e12c..1ee2579aa3 100644
--- a/cleopatre/u-boot-1.1.6/board/arizona/flash_spi.c
+++ b/cleopatre/u-boot-1.1.6/board/arizona/flash_spi.c
@@ -24,7 +24,7 @@
#include <common.h>
#include <malloc.h>
-#include <asm/arch/spc300_nvram.h>
+#include <asm/arch/nvram.h>
//#define DEBUG_FLASH_SPI
diff --git a/cleopatre/u-boot-1.1.6/board/spk300g/flash.c b/cleopatre/u-boot-1.1.6/board/spk300g/flash.c
index 2c3fe1f059..202d438eb7 100644
--- a/cleopatre/u-boot-1.1.6/board/spk300g/flash.c
+++ b/cleopatre/u-boot-1.1.6/board/spk300g/flash.c
@@ -24,7 +24,7 @@
#include <common.h>
#include <malloc.h>
-#include <asm/arch/spc300_nvram.h>
+#include <asm/arch/nvram.h>
//#define DEBUG_FLASH_SPI
diff --git a/cleopatre/u-boot-1.1.6/board/spk300g/spk300g.c b/cleopatre/u-boot-1.1.6/board/spk300g/spk300g.c
index 9254624a82..52127ea527 100644
--- a/cleopatre/u-boot-1.1.6/board/spk300g/spk300g.c
+++ b/cleopatre/u-boot-1.1.6/board/spk300g/spk300g.c
@@ -21,7 +21,7 @@
#include <common.h>
#include <asm/arch/hardware.h>
-#include <asm/arch/spc300_nvram.h>
+#include <asm/arch/nvram.h>
#if defined(CONFIG_SHOW_BOOT_PROGRESS)
void show_boot_progress(int progress)
diff --git a/cleopatre/u-boot-1.1.6/common/cmd_misc.c b/cleopatre/u-boot-1.1.6/common/cmd_misc.c
index dbdafc67e5..aaf2dc83f9 100644
--- a/cleopatre/u-boot-1.1.6/common/cmd_misc.c
+++ b/cleopatre/u-boot-1.1.6/common/cmd_misc.c
@@ -30,7 +30,7 @@
#if (CONFIG_COMMANDS & CFG_CMD_MISC)
#if defined(CONFIG_ARCH_SPC300) && !defined(CONFIG_ARCH_ARIZONA)
-#include <asm/arch/spc300_nvram.h>
+#include <asm/arch/nvram.h>
static ulong get_timer_clock(void)
{
diff --git a/cleopatre/u-boot-1.1.6/common/cmd_spidboot.c b/cleopatre/u-boot-1.1.6/common/cmd_spidboot.c
index 743d0be47e..df86862875 100644
--- a/cleopatre/u-boot-1.1.6/common/cmd_spidboot.c
+++ b/cleopatre/u-boot-1.1.6/common/cmd_spidboot.c
@@ -30,7 +30,7 @@
#include <command.h>
#include <net.h>
#include <asm/arch/image_desc.h>
-#include <asm/arch/spc300_nvram.h>
+#include <asm/arch/nvram.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/cleopatre/u-boot-1.1.6/cpu/spc300-fcm3/timer.c b/cleopatre/u-boot-1.1.6/cpu/spc300-fcm3/timer.c
index 9e00b4ef87..a8ca95cc90 100644
--- a/cleopatre/u-boot-1.1.6/cpu/spc300-fcm3/timer.c
+++ b/cleopatre/u-boot-1.1.6/cpu/spc300-fcm3/timer.c
@@ -22,7 +22,7 @@
#include <common.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
-#include <asm/arch/spc300_nvram.h>
+#include <asm/arch/nvram.h>
#define TIMER_LOAD_VAL 0xffffffff
diff --git a/cleopatre/u-boot-1.1.6/cpu/spc300/serial.c b/cleopatre/u-boot-1.1.6/cpu/spc300/serial.c
index a08e3d058f..811fd52d8b 100644
--- a/cleopatre/u-boot-1.1.6/cpu/spc300/serial.c
+++ b/cleopatre/u-boot-1.1.6/cpu/spc300/serial.c
@@ -22,7 +22,7 @@
#include <common.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
-#include <asm/arch/spc300_nvram.h>
+#include <asm/arch/nvram.h>
#if !defined(CONFIG_USART0)
#error must define CONFIG_USART0
diff --git a/cleopatre/u-boot-1.1.6/cpu/spc300/timer.c b/cleopatre/u-boot-1.1.6/cpu/spc300/timer.c
index b0ac39a9a3..eafe939a74 100644
--- a/cleopatre/u-boot-1.1.6/cpu/spc300/timer.c
+++ b/cleopatre/u-boot-1.1.6/cpu/spc300/timer.c
@@ -22,7 +22,7 @@
#include <common.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
-#include <asm/arch/spc300_nvram.h>
+#include <asm/arch/nvram.h>
#define TIMER_LOAD_VAL 0xffffffff
diff --git a/cleopatre/u-boot-1.1.6/drivers/netspcmac_eth.c b/cleopatre/u-boot-1.1.6/drivers/netspcmac_eth.c
index 9637807014..4b5428e849 100644
--- a/cleopatre/u-boot-1.1.6/drivers/netspcmac_eth.c
+++ b/cleopatre/u-boot-1.1.6/drivers/netspcmac_eth.c
@@ -34,7 +34,7 @@
#include "netspcmac_eth.h"
#ifdef CONFIG_ARCH_SPC300
-#include <asm/arch/spc300_nvram.h>
+#include <asm/arch/nvram.h>
#endif
#ifdef CONFIG_ARCH_ARIZONA
diff --git a/cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300-fcm3/nvram.h b/cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300-fcm3/nvram.h
new file mode 100644
index 0000000000..f98867f8c6
--- /dev/null
+++ b/cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300-fcm3/nvram.h
@@ -0,0 +1,55 @@
+/*
+ * include/asm-arm/arch-spc300-fcm3/nvram.h
+ *
+ * Copyright (C) 2009 SPiDCOM Technologies
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __ASM_ARCH_SPC300_NVRAM_H
+#define __ASM_ARCH_SPC300_NVRAM_H
+
+#define SPC300_NVRAM_MAGIC "NVRAM\0\0\0"
+
+/* /!\ All values are LITTLE-ENDIAN */
+typedef struct
+{
+ char magic[8]; // Magic number "NVRAM\0\0\0"
+ uint32_t pkg_cfg; // SPC300 package configuration register
+ uint32_t gpio_0_7_cfg; // SPC300 GPIO 0 to 7 configuration register
+ uint32_t gpio_8_15_cfg; // SPC300 GPIO 8 to 15 configuration register
+ uint32_t sdram_config; // SPC300 SDRAM configuration register
+ uint32_t sdram_timing0; // SPC300 SDRAM timing register 0
+ uint32_t sdram_timing1; // SPC300 SDRAM timing register 1
+ uint32_t sdram_refresh; // SPC300 SDRAM refresh register
+ uint32_t flash_org; // Flash organization
+ uint32_t img_0_offset; // Offset of first image address
+ uint32_t nb_images; // Max Number of Images present in flash
+ char product_name[64]; // Product short name in string format
+ char product_partnb[64]; // Product part number in string format
+ char product_desc[128]; // Product long description in string format
+ char serial_number[64]; // Product serial number in string format
+ uint32_t eth_phy_addr; // Address of Ethernet PHY
+ unsigned char eth_address[6]; // Ethernet MAC address
+ unsigned char reserved1[2];
+ unsigned char plc_address[6]; // PowerLine MAC address
+ unsigned char reserved2[2];
+ char device_password[32]; // HomePlugAV device unique password (DPW)
+ char oem_info[64]; // Additional information for OEM
+ unsigned char tonemask[192]; // HomePlugAV tonemask
+} spc300_nvram_t; //Currently __attribute__((packed)) not needed
+
+#endif /* __ASM_ARCH_SPC300_NVRAM_H */
diff --git a/cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300-fcm3/spc300_nvram.h b/cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300-fcm3/spc300_nvram.h
deleted file mode 100644
index 3e58f35da7..0000000000
--- a/cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300-fcm3/spc300_nvram.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * include/asm-arm/arch-spc300-fcm3/spc300_nvram.h
- *
- * Copyright (C) 2009 SPiDCOM Technologies
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#ifndef __ASM_ARCH_SPC300_NVRAM_H
-#define __ASM_ARCH_SPC300_NVRAM_H
-
-#define SPC300_NVRAM_MAGIC "NVRAM\0\0\0"
-#define SPC300_NVRAM_ARCH 0
-#define SPC300_NVRAM_IS_VALID(desc) ( !memcmp((desc)->magic, SPIDCOM_IMG_DESC_MAGIC, 8) && \
- (desc)->is_valid && \
- ( (desc)->index != SPIDCOM_IMG_DESC_INVALID_INDEX ) )
-
-/* /!\ All values are LITTLE-ENDIAN */
-typedef struct
-{
- char magic[8]; /* magic number "NVRAM\0\0\0" */
- uint32_t pkg_cfg; /* SPC300 package configuration register */
- uint32_t gpio_0_7_cfg; /* SPC300 GPIO 0 to 7 configuration register */
- uint32_t gpio_8_15_cfg; /* SPC300 GPIO 8 to 15 configuration register */
- uint32_t sdram_config; /* SPC300 SDRAM configuration register */
- uint32_t sdram_timing0; /* SPC300 SDRAM timing register 0 */
- uint32_t sdram_timing1; /* SPC300 SDRAM timing register 1 */
- uint32_t sdram_refresh; /* SPC300 SDRAM refresh register */
- uint32_t flash_org; /* Flash organization */
- uint32_t img_0_offset; /* offset of first image address */
- uint32_t nb_images; /* Max Number of Images present in flash */
- char product_name[16]; /* product short name in string format */
- char product_partnb[16]; /* product part number in string format */
- char product_desc[128]; /* product long description in string format */
- char serial_number[16]; /* product serial number in string format */
- uint32_t eth_phy_addr; /* address of Ethernet PHY */
- unsigned char eth_address[6]; /* ethernet MAC address */
- unsigned char reserved1[2];
- unsigned char plc_address[6]; /* powerline MAC address */
- unsigned char reserved2[2];
- char device_password[32]; /* HomeplugAV device unique password (DPW) */
- char oem_info[64]; /* additional information for oem */
-} spc300_nvram_t;
-
-#endif /* __ASM_ARCH_SPC300_NVRAM_H */
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
new file mode 100644
index 0000000000..ab278c5024
--- /dev/null
+++ b/cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300/nvram.h
@@ -0,0 +1,55 @@
+/*
+ * include/asm-arm/arch-spc300/nvram.h
+ *
+ * Copyright (C) 2009 SPiDCOM Technologies
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __ASM_ARCH_SPC300_NVRAM_H
+#define __ASM_ARCH_SPC300_NVRAM_H
+
+#define SPC300_NVRAM_MAGIC "NVRAM\0\0\0"
+
+/* /!\ All values are LITTLE-ENDIAN */
+typedef struct
+{
+ char magic[8]; // Magic number "NVRAM\0\0\0"
+ uint32_t pkg_cfg; // SPC300 package configuration register
+ uint32_t gpio_0_7_cfg; // SPC300 GPIO 0 to 7 configuration register
+ uint32_t gpio_8_15_cfg; // SPC300 GPIO 8 to 15 configuration register
+ uint32_t sdram_config; // SPC300 SDRAM configuration register
+ uint32_t sdram_timing0; // SPC300 SDRAM timing register 0
+ uint32_t sdram_timing1; // SPC300 SDRAM timing register 1
+ uint32_t sdram_refresh; // SPC300 SDRAM refresh register
+ uint32_t flash_org; // Flash organization
+ uint32_t img_0_offset; // Offset of first image address
+ uint32_t nb_images; // Max Number of Images present in flash
+ char product_name[64]; // Product short name in string format
+ char product_partnb[64]; // Product part number in string format
+ char product_desc[128]; // Product long description in string format
+ char serial_number[64]; // Product serial number in string format
+ uint32_t eth_phy_addr; // Address of Ethernet PHY
+ unsigned char eth_address[6]; // Ethernet MAC address
+ unsigned char reserved1[2];
+ unsigned char plc_address[6]; // PowerLine MAC address
+ unsigned char reserved2[2];
+ char device_password[32]; // HomePlugAV device unique password (DPW)
+ char oem_info[64]; // Additional information for OEM
+ unsigned char tonemask[192]; // HomePlugAV tonemask
+} spc300_nvram_t; //Currently __attribute__((packed)) not needed
+
+#endif /* __ASM_ARCH_SPC300_NVRAM_H */
diff --git a/cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300/spc300_nvram.h b/cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300/spc300_nvram.h
deleted file mode 100644
index aa5a7d1d57..0000000000
--- a/cleopatre/u-boot-1.1.6/include/asm-arm/arch-spc300/spc300_nvram.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * include/asm-arm/arch-spc300/spc300_nvram.h
- *
- * Copyright (C) 2009 SPiDCOM Technologies
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#ifndef __ASM_ARCH_SPC300_NVRAM_H
-#define __ASM_ARCH_SPC300_NVRAM_H
-
-#define SPC300_NVRAM_MAGIC "NVRAM\0\0\0"
-#define SPC300_NVRAM_ARCH 0
-#define SPC300_NVRAM_IS_VALID(desc) ( !memcmp((desc)->magic, SPIDCOM_IMG_DESC_MAGIC, 8) && \
- (desc)->is_valid && \
- ( (desc)->index != SPIDCOM_IMG_DESC_INVALID_INDEX ) )
-
-/* /!\ All values are LITTLE-ENDIAN */
-typedef struct
-{
- char magic[8]; /* magic number "NVRAM\0\0\0" */
- uint32_t pkg_cfg; /* SPC300 package configuration register */
- uint32_t gpio_0_7_cfg; /* SPC300 GPIO 0 to 7 configuration register */
- uint32_t gpio_8_15_cfg; /* SPC300 GPIO 8 to 15 configuration register */
- uint32_t sdram_config; /* SPC300 SDRAM configuration register */
- uint32_t sdram_timing0; /* SPC300 SDRAM timing register 0 */
- uint32_t sdram_timing1; /* SPC300 SDRAM timing register 1 */
- uint32_t sdram_refresh; /* SPC300 SDRAM refresh register */
- uint32_t flash_org; /* Flash organization */
- uint32_t img_0_offset; /* offset of first image address */
- uint32_t nb_images; /* Max Number of Images present in flash */
- char product_name[16]; /* product short name in string format */
- char product_partnb[16]; /* product part number in string format */
- char product_desc[128]; /* product long description in string format */
- char serial_number[16]; /* product serial number in string format */
- uint32_t eth_phy_addr; /* address of Ethernet PHY */
- unsigned char eth_address[6]; /* ethernet MAC address */
- unsigned char reserved1[2];
- unsigned char plc_address[6]; /* powerline MAC address */
- unsigned char reserved2[2];
- char device_password[32]; /* HomeplugAV device unique password (DPW) */
- char oem_info[64]; /* additional information for oem */
-} spc300_nvram_t;
-
-#endif /* __ASM_ARCH_SPC300_NVRAM_H */
diff --git a/cleopatre/u-boot-1.1.6/net/spidupd.c b/cleopatre/u-boot-1.1.6/net/spidupd.c
index 5b1106df87..9c1efd7688 100644
--- a/cleopatre/u-boot-1.1.6/net/spidupd.c
+++ b/cleopatre/u-boot-1.1.6/net/spidupd.c
@@ -27,7 +27,7 @@
#include <net.h>
#include <md5.h>
#include <asm/arch/image_desc.h>
-#include <asm/arch/spc300_nvram.h>
+#include <asm/arch/nvram.h>
#include "spidupd.h"
/** Debug management */
diff --git a/cleopatre/u-boot-1.1.6/tools/mknvram/Makefile b/cleopatre/u-boot-1.1.6/tools/mknvram/Makefile
deleted file mode 100644
index 56151ea2f4..0000000000
--- a/cleopatre/u-boot-1.1.6/tools/mknvram/Makefile
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# Copyright (C) 2009 SPiDCOM Technologies
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-#
-
-DEBUG=no
-CC=gcc
-ifeq ($(DEBUG),yes)
- CFLAGS=-W -Wall -ansi -pedantic -g
- LDFLAGS=
-else
- #CFLAGS=-W -Wall -ansi -pedantic
- LDFLAGS=
-endif
-EXEC=mknvram
-SRC= $(wildcard *.c)
-OBJ= $(SRC:.c=.o)
-LDLIBS=
-
-all: $(EXEC)
-ifeq ($(DEBUG),yes)
- @echo "Génération en mode debug"
-else
- @echo "Génération en mode release"
-endif
-
-$(EXEC): $(OBJ)
- $(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)
-
-%.o: %.c
- $(CC) -o $@ -c $< $(CFLAGS) $(LDLIBS)
-
-mknvram.o: ../../include/asm-arm/arch-spc300/spc300_nvram.h
-
-.PHONY: clean mrproper
-
-clean:
- @rm -rf *.o
-
-mrproper: clean
- @rm -rf $(EXEC)
-
diff --git a/cleopatre/u-boot-1.1.6/tools/mknvram/mknvram.c b/cleopatre/u-boot-1.1.6/tools/mknvram/mknvram.c
deleted file mode 100644
index 2806732296..0000000000
--- a/cleopatre/u-boot-1.1.6/tools/mknvram/mknvram.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * tools/mknvram/mknvram.c
- *
- * Copyright (C) 2009 SPiDCOM Technologies
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- * Author(s):
- * May 2009 Drasko DRASKOVIC <drasko.draskovic@spidcom.com>
- */
-
-#include <stdio.h>
-#include <fcntl.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <getopt.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <inttypes.h>
-
-#include "../../include/asm-arm/arch-spc300/spc300_nvram.h"
-
-static spc300_nvram_t nvram = {
- .magic = SPC300_NVRAM_MAGIC, /* magic number "NVRAM\0\0\0" */
- .pineout_cfg = 0, /* SPC300 pineout configuration register */
- .sdram_config = 0, /* SPC300 SDRAM configuration register */
- .sdram_timing0 = 0, /* SPC300 SDRAM timing register 0 */
- .sdram_timing1 = 0, /* SPC300 SDRAM timing register 1 */
- .sdram_refresh = 0, /* SPC300 SDRAM refresh register */
- .nb_images = 1 /* Max Number of Images present in flash */
-#if 0 /* product short name in string format */
- .product_name = /* product part number in string format */
- .product_partnb = /* product long description in string format */
- .product_desc = /* product serial number in string format */
- .serial_number = /* ethernet MAC address */
- .eth_address =
- .plc_address = /* powerline MAC address */
- .device_password =
- .oem_info = /* HomeplugAV device unique password (DPW) */
-#endif /* additional information for oem */
-};
-
-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;
- unsigned char tmpstr[3];
- char *pch = NULL;
-
- struct option opt[] =
- {
- { "sdramcfg", required_argument, NULL, 's' },
- { "sdramt0", required_argument, NULL, 'z' },
- { "sdramt1", required_argument, NULL, 'o' },
- { "sdramref", required_argument, NULL, 'r' },
- { "nbimg", required_argument, NULL, 'n' },
- { "eth", required_argument, NULL, 'e' },
- { "help", no_argument, NULL, 'h' }
- };
-
- while((c = getopt_long(argc, argv, "s:z:o:r:n:e:h", opt, &i)) != EOF)
- {
- switch(c)
- {
- case 's' :
- nvram.sdram_config = (uint32_t)strtoul(optarg, NULL, 0);
- break;
- case 'z' :
- nvram.sdram_timing0 = (uint32_t)strtoul(optarg, NULL, 0);
- break;
- case 'o' :
- nvram.sdram_timing1 = (uint32_t)strtoul(optarg, NULL, 0);
- case 'r' :
- nvram.sdram_refresh = (uint32_t)strtoul(optarg, NULL, 0);
- break;
- case 'n' :
- nvram.nb_images = atoi(optarg);
- break;
- case 'e' :
- {
- int i = 0;
- char *s = optarg;
- char *e = NULL;
-
- for (i = 0; i < 6; i++)
- {
- nvram.eth_address[i] = s ? strtoul (s, &e, 16) : 0;
- if (s)
- s = (*e) ? e + 1 : e;
- }
- }
- break;
- case 'h' :
- case '?' :
- print_usage(argv[0]);
- return -1;
- }
- }
-
- write(fileno(stdout), &nvram, sizeof(spc300_nvram_t));
- return 0;
-}
diff --git a/cleopatre/u-boot-1.1.6/tools/mknvram/mknvram.sh b/cleopatre/u-boot-1.1.6/tools/mknvram/mknvram.sh
deleted file mode 100755
index b3975c5e49..0000000000
--- a/cleopatre/u-boot-1.1.6/tools/mknvram/mknvram.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/sh
-
-make clean
-make mrproper
-make
-./mknvram -s 0x1c3168 -z 0x22a569a -o 0x70008 -r 0x927 -n 2 -e 00:50:c2:38:00:0B > nvram.bin
diff --git a/cleopatre/u-boot-1.1.6/tools/mknvram/spc300_nvram.h b/cleopatre/u-boot-1.1.6/tools/mknvram/spc300_nvram.h
deleted file mode 100644
index d5327ccc27..0000000000
--- a/cleopatre/u-boot-1.1.6/tools/mknvram/spc300_nvram.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * tools/mknvram/spc300_nvram.h
- *
- * Copyright (C) 2009 SPiDCOM Technologies
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- * Author(s):
- * May 2009 Drasko DRASKOVIC <drasko.draskovic@spidcom.com>
- */
-
-#ifndef _SPC300_NVRAM_H_
-#define _SPC300_NVRAM_H_
-
-#define SPC300_NVRAM_MAGIC "NVRAM\0\0\0"
-#define SPC300_NVRAM_ARCH 0
-#define SPC300_NVRAM_IS_VALID(desc) ( !memcmp((desc)->magic, SPIDCOM_IMG_DESC_MAGIC, 8) && \
- (desc)->is_valid && \
- ( (desc)->index != SPIDCOM_IMG_DESC_INVALID_INDEX ) )
-
-/* /!\ All values are LITTLE-ENDIAN */
-typedef struct
-{
- char magic[8]; /* magic number "NVRAM\0\0\0" */
- uint32_t pineout_cfg; /* SPC300 pineout configuration register */
- uint32_t sdram_config; /* SPC300 SDRAM configuration register */
- uint32_t sdram_timing0; /* SPC300 SDRAM timing register 0 */
- uint32_t sdram_timing1; /* SPC300 SDRAM timing register 1 */
- uint32_t sdram_refresh; /* SPC300 SDRAM refresh register */
- uint32_t nb_images; /* Max Number of Images present in flash */
- char product_name[16]; /* product short name in string format */
- char product_partnb[16]; /* product part number in string format */
- char product_desc[128]; /* product long description in string format */
- char serial_number[16]; /* product serial number in string format */
- unsigned char eth_address[6]; /* ethernet MAC address */
- unsigned char reserved1[2];
- unsigned char plc_address[6]; /* powerline MAC address */
- unsigned char reserved2[2];
- char device_password[32]; /* HomeplugAV device unique password (DPW) */
- char oem_info[64]; /* additional information for oem */
-} spc300_nvram_t __attribute__((packed));
-
-#endif /* _SPC300_NVRAM_H_ */
diff --git a/cleopatre/u-boot-1.1.6/tools/mknvram/test_mknvram.sh b/cleopatre/u-boot-1.1.6/tools/mknvram/test_mknvram.sh
deleted file mode 100755
index 1f3f86b10a..0000000000
--- a/cleopatre/u-boot-1.1.6/tools/mknvram/test_mknvram.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-
-# changes :
-# SCONR : bit 20, "1" -> "0"
-# STMG0R : bit 18, "0" -> "1"
-# STMG1R : bit 0, "0" -> "1"
-# SREF : bit 0, "1" -> "0"
-#
-make clean
-make mrproper
-make
-./mknvram -s 0xC3168 -z 0x22E569A -o 0x70009 -r 0x926 -n 2 -e 00:50:c2:38:00:0B > nvram.bin