summaryrefslogtreecommitdiff
path: root/cleopatre
diff options
context:
space:
mode:
authorThierry Carré2013-02-12 14:04:18 +0100
committerThierry Carré2013-02-14 10:42:10 +0100
commitd233a21a1bd19eb4a37e6d9fbc1627010915ef42 (patch)
tree419e1d6a5a6a4b190d8dbc300379641f0b74c127 /cleopatre
parent2714e6ba52fb79f5a6f4681a5b1b97f9ee0ec76f (diff)
cleo/linux/driver/mtd: linux use flash list defined in common, refs #3647
Diffstat (limited to 'cleopatre')
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/drivers/mtd/devices/.gitignore1
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/drivers/mtd/devices/m25p80.c72
-rwxr-xr-xcleopatre/linux-2.6.25.10-spc300/scripts/cpincludes2
3 files changed, 6 insertions, 69 deletions
diff --git a/cleopatre/linux-2.6.25.10-spc300/drivers/mtd/devices/.gitignore b/cleopatre/linux-2.6.25.10-spc300/drivers/mtd/devices/.gitignore
new file mode 100644
index 0000000000..1b875abaf8
--- /dev/null
+++ b/cleopatre/linux-2.6.25.10-spc300/drivers/mtd/devices/.gitignore
@@ -0,0 +1 @@
+all_flash.h
diff --git a/cleopatre/linux-2.6.25.10-spc300/drivers/mtd/devices/m25p80.c b/cleopatre/linux-2.6.25.10-spc300/drivers/mtd/devices/m25p80.c
index 2eb5fbf676..9a30546800 100644
--- a/cleopatre/linux-2.6.25.10-spc300/drivers/mtd/devices/m25p80.c
+++ b/cleopatre/linux-2.6.25.10-spc300/drivers/mtd/devices/m25p80.c
@@ -32,6 +32,8 @@
#include <asm/arch/nvram.h>
#endif
+#include "all_flash.h"
+
#define FLASH_PAGESIZE 256
@@ -544,75 +546,7 @@ struct flash_info {
* more flash chips. This current list focusses on newer chips, which
* have been converging on command sets which including JEDEC ID.
*/
-static struct flash_info __devinitdata m25p_data [] = {
-
- /* Atmel -- some are (confusingly) marketed as "DataFlash" */
- { "at25fs010", 0x1f6601, 32 * 1024, 4, SECT_4K, },
- { "at25fs040", 0x1f6604, 64 * 1024, 8, SECT_4K, },
-
- { "at25df041a", 0x1f4401, 64 * 1024, 8, SECT_4K, },
-
- { "at26f004", 0x1f0400, 64 * 1024, 8, SECT_4K, },
- { "at26df081a", 0x1f4501, 64 * 1024, 16, SECT_4K, },
- { "at26df161a", 0x1f4601, 64 * 1024, 32, SECT_4K, },
- { "at26df321", 0x1f4700, 64 * 1024, 64, SECT_4K, },
-
- /* Eon -- */
- { "en25q32", 0x1c3016, 64 * 1024, 64, },
- { "en25q64", 0x1c3017, 64 * 1024, 128, },
- { "en25q128", 0x1c3018, 64 * 1024, 256, },
-
- /* Macronix -- */
- { "mx25l3205d", 0xc22016, 64 * 1024, 64, SECT_4K, },
- { "mx25l6406e", 0xc22017, 64 * 1024, 128, SECT_4K, },
- { "mx25l128", 0xc22018, 64 * 1024, 256, SECT_4K, },
-
- /* Spansion -- single (large) sector size only, at least
- * for the chips listed here (without boot sectors).
- */
- { "s25sl004a", 0x010212, 64 * 1024, 8, },
- { "s25sl008a", 0x010213, 64 * 1024, 16, },
- { "s25sl016a", 0x010214, 64 * 1024, 32, },
- { "s25sl032a", 0x010215, 64 * 1024, 64, },
- { "s25sl064a", 0x010216, 64 * 1024, 128, },
-
- /* SST -- large erase sizes are "overlays", "sectors" are 4K */
- { "sst25vf040b", 0xbf258d, 64 * 1024, 8, SECT_4K, },
- { "sst25vf080b", 0xbf258e, 64 * 1024, 16, SECT_4K, },
- { "sst25vf016b", 0xbf2541, 64 * 1024, 32, SECT_4K, },
- { "sst25vf032b", 0xbf254a, 64 * 1024, 64, SECT_4K, },
-
- /* ST Microelectronics -- newer production may have feature updates */
- { "m25p05", 0x202010, 32 * 1024, 2, },
- { "m25p10", 0x202011, 32 * 1024, 4, },
- { "m25p20", 0x202012, 64 * 1024, 4, },
- { "m25p40", 0x202013, 64 * 1024, 8, },
- { "m25p80", 0, 64 * 1024, 16, },
- { "m25p16", 0x202015, 64 * 1024, 32, },
- { "m25p32", 0x202016, 64 * 1024, 64, },
- { "m25p64", 0x202017, 64 * 1024, 128, },
- { "m25p128", 0x202018, 256 * 1024, 64, },
-
- { "m45pe80", 0x204014, 64 * 1024, 16, },
- { "m45pe16", 0x204015, 64 * 1024, 32, },
-
- { "m25pe80", 0x208014, 64 * 1024, 16, },
- { "m25pe16", 0x208015, 64 * 1024, 32, SECT_4K, },
-
- { "n25q128", 0x20ba18, 64*1024, 256, SECT_4K },
-
- /* Winbond -- w25x "blocks" are 64K, "sectors" are 4KiB */
- { "w25x10", 0xef3011, 64 * 1024, 2, },
- { "w25x20", 0xef3012, 64 * 1024, 4, },
- { "w25x40", 0xef3013, 64 * 1024, 8, },
- { "w25x80", 0xef3014, 64 * 1024, 16, },
- { "w25x16", 0xef3015, 64 * 1024, 32, },
- { "w25x32", 0xef3016, 64 * 1024, 64, },
- { "w25q32", 0xef4016, 64 * 1024, 64, },
- { "w25x64", 0xef3017, 64 * 1024, 128, },
- { "w25q64", 0xef4017, 64 * 1024, 128, },
- { "w25q128", 0xef4018, 64 * 1024, 256, },
-};
+static struct flash_info __devinitdata m25p_data[] = FLASH_ARRAY(LINUX);
#ifdef CONFIG_ARCH_SPC300
static struct flash_info __devinitdata m25pgeneric =
diff --git a/cleopatre/linux-2.6.25.10-spc300/scripts/cpincludes b/cleopatre/linux-2.6.25.10-spc300/scripts/cpincludes
index af9c76b351..601672f7eb 100755
--- a/cleopatre/linux-2.6.25.10-spc300/scripts/cpincludes
+++ b/cleopatre/linux-2.6.25.10-spc300/scripts/cpincludes
@@ -8,6 +8,8 @@ LINUX_INC=$1/include/asm-arm/arch-spc300
COMMON_INC=$1/../../common/include
COMMON_INC_ASM=$COMMON_INC/asm/arch
MKSIMAGE=$1/scripts/mksimage
+FLASH_DEVICE_DIR=$1/drivers/mtd/devices
+cp -p $COMMON_INC/all_flash.h $FLASH_DEVICE_DIR
cp -p $COMMON_INC/spid_img_desc.h $MKSIMAGE
cp -p -r $COMMON_INC_ASM/* $LINUX_INC