summaryrefslogtreecommitdiff
path: root/linux/linux-mtx-1-2.4.27
diff options
context:
space:
mode:
Diffstat (limited to 'linux/linux-mtx-1-2.4.27')
-rw-r--r--linux/linux-mtx-1-2.4.27/01-mtd-2004-01-27.diff51503
-rw-r--r--linux/linux-mtx-1-2.4.27/02-mtd-mtx-1-map.diff248
-rw-r--r--linux/linux-mtx-1-2.4.27/03-mtd-erase-compiler-bug.diff21
-rw-r--r--linux/linux-mtx-1-2.4.27/04-mtx-1-board-reset.diff15
-rw-r--r--linux/linux-mtx-1-2.4.27/05-mtx-1-pci-irq.diff18
-rw-r--r--linux/linux-mtx-1-2.4.27/06-zboot-2.4.26.patch5308
-rw-r--r--linux/linux-mtx-1-2.4.27/07-zboot-zimage-flash-bin.diff11
-rw-r--r--linux/linux-mtx-1-2.4.27/08-usb-nonpci-2.4.24.patch3185
-rw-r--r--linux/linux-mtx-1-2.4.27/09-au1000-eth-vlan.diff10
-rw-r--r--linux/linux-mtx-1-2.4.27/10-iw-max-spy-32.diff11
-rw-r--r--linux/linux-mtx-1-2.4.27/11-mtd-proc-partition-rw.diff173
-rw-r--r--linux/linux-mtx-1-2.4.27/12-openswan-2.2.0-nat-t.diff143
-rw-r--r--linux/linux-mtx-1-2.4.27/13-openswan-2.2.0.patch61573
-rw-r--r--linux/linux-mtx-1-2.4.27/14-au1000-eth-link-beat.diff64
-rw-r--r--linux/linux-mtx-1-2.4.27/15-au1000-pci-fixup-non-coherent-pre-ac.diff0
-rw-r--r--linux/linux-mtx-1-2.4.27/defconfig-mtx-11200
-rw-r--r--linux/linux-mtx-1-2.4.27/mtx-1-board-reset.diff15
-rw-r--r--linux/linux-mtx-1-2.4.27/zimage-flash-bin.patch11
18 files changed, 0 insertions, 123509 deletions
diff --git a/linux/linux-mtx-1-2.4.27/01-mtd-2004-01-27.diff b/linux/linux-mtx-1-2.4.27/01-mtd-2004-01-27.diff
deleted file mode 100644
index 74e6375385..0000000000
--- a/linux/linux-mtx-1-2.4.27/01-mtd-2004-01-27.diff
+++ /dev/null
@@ -1,51503 +0,0 @@
-diff -Nurb linux-mips-2.4.27/drivers/mtd/Config.in linux/drivers/mtd/Config.in
---- linux-mips-2.4.27/drivers/mtd/Config.in 2003-02-26 01:53:49.000000000 +0100
-+++ linux/drivers/mtd/Config.in 2004-11-19 10:25:11.607244176 +0100
-@@ -1,5 +1,5 @@
-
--# $Id$
-+# $Id$
-
- mainmenu_option next_comment
- comment 'Memory Technology Devices (MTD)'
-@@ -30,6 +30,7 @@
- if [ "$CONFIG_NFTL" = "y" -o "$CONFIG_NFTL" = "m" ]; then
- bool ' Write support for NFTL (BETA)' CONFIG_NFTL_RW
- fi
-+ dep_tristate ' INFTL (Inverse NAND Flash Translation Layer) support' CONFIG_INFTL $CONFIG_MTD
-
- source drivers/mtd/chips/Config.in
-
-diff -Nurb linux-mips-2.4.27/drivers/mtd/Makefile linux/drivers/mtd/Makefile
---- linux-mips-2.4.27/drivers/mtd/Makefile 2003-02-26 01:53:49.000000000 +0100
-+++ linux/drivers/mtd/Makefile 2004-11-19 10:25:11.608244024 +0100
-@@ -1,30 +1,7 @@
- #
- # Makefile for the memory technology device drivers.
- #
--# Note! Dependencies are done automagically by 'make dep', which also
--# removes any old dependencies. DON'T put your own dependencies here
--# unless it's something special (ie not a .c file).
--#
--# Note 2! The CFLAGS definitions are now inherited from the
--# parent makes..
--#
--# $Id$
--
--
--obj-y += chips/chipslink.o maps/mapslink.o \
-- devices/devlink.o nand/nandlink.o
--obj-m :=
--obj-n :=
--obj- :=
--
--O_TARGET := mtdlink.o
--
--export-objs := mtdcore.o mtdpart.o redboot.o cmdlinepart.o afs.o mtdconcat.o
--list-multi := nftl.o
--
--mod-subdirs :=
--subdir-y := chips maps devices nand
--subdir-m := $(subdir-y)
-+# $Id$
-
- # *** BIG UGLY NOTE ***
- #
-@@ -52,15 +29,44 @@
-
- # 'Users' - code which presents functionality to userspace.
- obj-$(CONFIG_MTD_CHAR) += mtdchar.o
--obj-$(CONFIG_MTD_BLOCK) += mtdblock.o
--obj-$(CONFIG_MTD_BLOCK_RO) += mtdblock_ro.o
--obj-$(CONFIG_FTL) += ftl.o
--obj-$(CONFIG_NFTL) += nftl.o
-+obj-$(CONFIG_MTD_BLOCK) += mtdblock.o mtd_blkdevs.o
-+obj-$(CONFIG_MTD_BLOCK_RO) += mtdblock_ro.o mtd_blkdevs.o
-+obj-$(CONFIG_FTL) += ftl.o mtd_blkdevs.o
-+obj-$(CONFIG_NFTL) += nftl.o mtd_blkdevs.o
-+obj-$(CONFIG_INFTL) += inftl.o mtd_blkdevs.o
-
- nftl-objs := nftlcore.o nftlmount.o
-+inftl-objs := inftlcore.o inftlmount.o
-+
-+ifeq ($(PATCHLEVEL),4)
-+
-+export-objs := mtdcore.o mtdpart.o redboot.o cmdlinepart.o afs.o \
-+ mtdconcat.o mtd_blkdevs-24.o
-+
-+mtd_blkdevs-objs := mtd_blkdevs-24.o
-+
-+obj-y += chips/chipslink.o maps/mapslink.o \
-+ devices/devlink.o nand/nandlink.o
-+
-+O_TARGET := mtdlink.o
-+
-+list-multi := nftl.o inftl.o mtd_blkdevs.o
-+
-+mod-subdirs :=
-+subdir-y := chips maps devices nand
-+subdir-m := $(subdir-y)
-
- include $(TOPDIR)/Rules.make
-
- nftl.o: $(nftl-objs)
- $(LD) -r -o $@ $(nftl-objs)
-
-+inftl.o: $(inftl-objs)
-+ $(LD) -r -o $@ $(inftl-objs)
-+
-+mtd_blkdevs.o: $(mtd_blkdevs-objs)
-+ $(LD) -r -o $@ $(mtd_blkdevs-objs)
-+
-+else
-+obj-y += chips/ maps/ devices/ nand/
-+endif
-diff -Nurb linux-mips-2.4.27/drivers/mtd/afs.c linux/drivers/mtd/afs.c
---- linux-mips-2.4.27/drivers/mtd/afs.c 2003-02-26 01:53:49.000000000 +0100
-+++ linux/drivers/mtd/afs.c 2004-11-19 10:25:11.610243720 +0100
-@@ -21,7 +21,7 @@
- This is access code for flashes using ARM's flash partitioning
- standards.
-
-- $Id$
-+ $Id$
-
- ======================================================================*/
-
-@@ -76,17 +76,19 @@
- return ret;
- }
-
-+ ret = 1;
-+
- /*
- * Does it contain the magic number?
- */
- if (fs.signature != 0xa0ffff9f)
-- ret = 1;
-+ ret = 0;
-
- /*
- * Don't touch the SIB.
- */
- if (fs.type == 2)
-- ret = 1;
-+ ret = 0;
-
- *iis_start = fs.image_info_base & mask;
- *img_start = fs.image_start & mask;
-@@ -96,14 +98,14 @@
- * be located after the footer structure.
- */
- if (*iis_start >= ptr)
-- ret = 1;
-+ ret = 0;
-
- /*
- * Check the start of this image. The image
- * data can not be located after this block.
- */
- if (*img_start > off)
-- ret = 1;
-+ ret = 0;
-
- return ret;
- }
-@@ -125,7 +127,9 @@
- return ret;
- }
-
--int parse_afs_partitions(struct mtd_info *mtd, struct mtd_partition **pparts)
-+static int parse_afs_partitions(struct mtd_info *mtd,
-+ struct mtd_partition **pparts,
-+ unsigned long origin)
- {
- struct mtd_partition *parts;
- u_int mask, off, idx, sz;
-@@ -150,7 +154,7 @@
- ret = afs_read_footer(mtd, &img_ptr, &iis_ptr, off, mask);
- if (ret < 0)
- break;
-- if (ret == 1)
-+ if (ret == 0)
- continue;
-
- ret = afs_read_iis(mtd, &iis, iis_ptr);
-@@ -183,7 +187,7 @@
- ret = afs_read_footer(mtd, &img_ptr, &iis_ptr, off, mask);
- if (ret < 0)
- break;
-- if (ret == 1)
-+ if (ret == 0)
- continue;
-
- /* Read the image info block */
-@@ -227,7 +231,25 @@
- return idx ? idx : ret;
- }
-
--EXPORT_SYMBOL(parse_afs_partitions);
-+static struct mtd_part_parser afs_parser = {
-+ .owner = THIS_MODULE,
-+ .parse_fn = parse_afs_partitions,
-+ .name = "afs",
-+};
-+
-+static int __init afs_parser_init(void)
-+{
-+ return register_mtd_parser(&afs_parser);
-+}
-+
-+static void __exit afs_parser_exit(void)
-+{
-+ deregister_mtd_parser(&afs_parser);
-+}
-+
-+module_init(afs_parser_init);
-+module_exit(afs_parser_exit);
-+
-
- MODULE_AUTHOR("ARM Ltd");
- MODULE_DESCRIPTION("ARM Firmware Suite partition parser");
-diff -Nurb linux-mips-2.4.27/drivers/mtd/chips/Config.in linux/drivers/mtd/chips/Config.in
---- linux-mips-2.4.27/drivers/mtd/chips/Config.in 2003-02-26 01:53:49.000000000 +0100
-+++ linux/drivers/mtd/chips/Config.in 2004-11-19 10:25:11.712228216 +0100
-@@ -1,6 +1,6 @@
- # drivers/mtd/chips/Config.in
-
--# $Id$
-+# $Id$
-
- mainmenu_option next_comment
-
-@@ -11,13 +11,12 @@
-
- if [ "$CONFIG_MTD_CFI" = "y" -o "$CONFIG_MTD_JEDECPROBE" = "y" ]; then
- define_bool CONFIG_MTD_GEN_PROBE y
--else
-- if [ "$CONFIG_MTD_CFI" = "m" -o "$CONFIG_MTD_JEDECPROBE" = "m" ]; then
-+elif [ "$CONFIG_MTD_CFI" = "m" -o "$CONFIG_MTD_JEDECPROBE" = "m" ]; then
- define_bool CONFIG_MTD_GEN_PROBE m
-- else
-+else
- define_bool CONFIG_MTD_GEN_PROBE n
-- fi
- fi
-+
- if [ "$CONFIG_MTD_GEN_PROBE" = "y" -o "$CONFIG_MTD_GEN_PROBE" = "m" ]; then
- bool ' Flash chip driver advanced configuration options' CONFIG_MTD_CFI_ADV_OPTIONS
- if [ "$CONFIG_MTD_CFI_ADV_OPTIONS" = "y" ]; then
-@@ -44,8 +43,27 @@
- fi
- dep_tristate ' Support for Intel/Sharp flash chips' CONFIG_MTD_CFI_INTELEXT $CONFIG_MTD_GEN_PROBE
- dep_tristate ' Support for AMD/Fujitsu flash chips' CONFIG_MTD_CFI_AMDSTD $CONFIG_MTD_GEN_PROBE
-+if [ "$CONFIG_MTD_CFI_AMDSTD" = "y" -o "$CONFIG_MTD_CFI_AMDSTD" = "m" ]; then
-+ bool ' Retry failed commands (erase/program)' CONFIG_MTD_CFI_AMDSTD_RETRY n
-+ if [ "$CONFIG_MTD_CFI_AMDSTD_RETRY" = "y" ]; then
-+ int ' Max retries of failed commands (erase/program)' CONFIG_MTD_CFI_AMDSTD_RETRY_MAX 0
-+ fi
-+fi
-+
- dep_tristate ' Support for ST (Advanced Architecture) flash chips' CONFIG_MTD_CFI_STAA $CONFIG_MTD_GEN_PROBE
-
-+if [ "$CONFIG_MTD_CFI_INTELEXT" = "y" \
-+ -o "$CONFIG_MTD_CFI_AMDSTD" = "y" \
-+ -o "$CONFIG_MTD_CFI_STAA" = "y" ]; then
-+ define_bool CONFIG_MTD_CFI_UTIL y
-+elif [ "$CONFIG_MTD_CFI_INTELEXT" = "m" \
-+ -o "$CONFIG_MTD_CFI_AMDSTD" = "m" \
-+ -o "$CONFIG_MTD_CFI_STAA" = "m" ]; then
-+ define_bool CONFIG_MTD_CFI_UTIL m
-+else
-+ define_bool CONFIG_MTD_CFI_UTIL n
-+fi
-+
- dep_tristate ' Support for RAM chips in bus mapping' CONFIG_MTD_RAM $CONFIG_MTD
- dep_tristate ' Support for ROM chips in bus mapping' CONFIG_MTD_ROM $CONFIG_MTD
- dep_tristate ' Support for absent chips in bus mapping' CONFIG_MTD_ABSENT $CONFIG_MTD
-diff -Nurb linux-mips-2.4.27/drivers/mtd/chips/Makefile linux/drivers/mtd/chips/Makefile
---- linux-mips-2.4.27/drivers/mtd/chips/Makefile 2003-07-05 05:23:38.000000000 +0200
-+++ linux/drivers/mtd/chips/Makefile 2004-11-19 10:25:11.714227912 +0100
-@@ -1,11 +1,12 @@
- #
- # linux/drivers/chips/Makefile
- #
--# $Id$
-+# $Id$
-
-+ifeq ($(PATCHLEVEL),4)
- O_TARGET := chipslink.o
--
--export-objs := chipreg.o gen_probe.o
-+export-objs := chipreg.o gen_probe.o cfi_util.o
-+endif
-
- # *** BIG UGLY NOTE ***
- #
-@@ -17,6 +18,7 @@
- obj-$(CONFIG_MTD) += chipreg.o
- obj-$(CONFIG_MTD_AMDSTD) += amd_flash.o
- obj-$(CONFIG_MTD_CFI) += cfi_probe.o
-+obj-$(CONFIG_MTD_CFI_UTIL) += cfi_util.o
- obj-$(CONFIG_MTD_CFI_STAA) += cfi_cmdset_0020.o
- obj-$(CONFIG_MTD_CFI_AMDSTD) += cfi_cmdset_0002.o
- obj-$(CONFIG_MTD_CFI_INTELEXT) += cfi_cmdset_0001.o
-@@ -28,4 +30,4 @@
- obj-$(CONFIG_MTD_SHARP) += sharp.o
- obj-$(CONFIG_MTD_ABSENT) += map_absent.o
-
--include $(TOPDIR)/Rules.make
-+-include $(TOPDIR)/Rules.make
-diff -Nurb linux-mips-2.4.27/drivers/mtd/chips/amd_flash.c linux/drivers/mtd/chips/amd_flash.c
---- linux-mips-2.4.27/drivers/mtd/chips/amd_flash.c 2003-02-26 01:53:49.000000000 +0100
-+++ linux/drivers/mtd/chips/amd_flash.c 2004-11-19 10:25:11.722226696 +0100
-@@ -3,7 +3,7 @@
- *
- * Author: Jonas Holmberg <jonas.holmberg@axis.com>
- *
-- * $Id$
-+ * $Id$
- *
- * Copyright (c) 2001 Axis Communications AB
- *
-@@ -19,6 +19,7 @@
- #include <linux/slab.h>
- #include <linux/delay.h>
- #include <linux/interrupt.h>
-+#include <linux/init.h>
- #include <linux/mtd/map.h>
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/flashchip.h>
-@@ -125,10 +126,10 @@
-
-
- static struct mtd_chip_driver amd_flash_chipdrv = {
-- probe: amd_flash_probe,
-- destroy: amd_flash_destroy,
-- name: "amd_flash",
-- module: THIS_MODULE
-+ .probe = amd_flash_probe,
-+ .destroy = amd_flash_destroy,
-+ .name = "amd_flash",
-+ .module = THIS_MODULE
- };
-
-
-@@ -140,11 +141,11 @@
- static inline __u32 wide_read(struct map_info *map, __u32 addr)
- {
- if (map->buswidth == 1) {
-- return map->read8(map, addr);
-+ return map_read8(map, addr);
- } else if (map->buswidth == 2) {
-- return map->read16(map, addr);
-+ return map_read16(map, addr);
- } else if (map->buswidth == 4) {
-- return map->read32(map, addr);
-+ return map_read32(map, addr);
- }
-
- return 0;
-@@ -153,11 +154,11 @@
- static inline void wide_write(struct map_info *map, __u32 val, __u32 addr)
- {
- if (map->buswidth == 1) {
-- map->write8(map, val, addr);
-+ map_write8(map, val, addr);
- } else if (map->buswidth == 2) {
-- map->write16(map, val, addr);
-+ map_write16(map, val, addr);
- } else if (map->buswidth == 4) {
-- map->write32(map, val, addr);
-+ map_write32(map, val, addr);
- }
- }
-
-@@ -424,231 +425,228 @@
-
- static struct mtd_info *amd_flash_probe(struct map_info *map)
- {
-- /* Keep this table on the stack so that it gets deallocated after the
-- * probe is done.
-- */
-- const struct amd_flash_info table[] = {
-+ static const struct amd_flash_info table[] = {
- {
-- mfr_id: MANUFACTURER_AMD,
-- dev_id: AM29LV160DT,
-- name: "AMD AM29LV160DT",
-- size: 0x00200000,
-- numeraseregions: 4,
-- regions: {
-- { offset: 0x000000, erasesize: 0x10000, numblocks: 31 },
-- { offset: 0x1F0000, erasesize: 0x08000, numblocks: 1 },
-- { offset: 0x1F8000, erasesize: 0x02000, numblocks: 2 },
-- { offset: 0x1FC000, erasesize: 0x04000, numblocks: 1 }
-+ .mfr_id = MANUFACTURER_AMD,
-+ .dev_id = AM29LV160DT,
-+ .name = "AMD AM29LV160DT",
-+ .size = 0x00200000,
-+ .numeraseregions = 4,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x10000, .numblocks = 31 },
-+ { .offset = 0x1F0000, .erasesize = 0x08000, .numblocks = 1 },
-+ { .offset = 0x1F8000, .erasesize = 0x02000, .numblocks = 2 },
-+ { .offset = 0x1FC000, .erasesize = 0x04000, .numblocks = 1 }
- }
- }, {
-- mfr_id: MANUFACTURER_AMD,
-- dev_id: AM29LV160DB,
-- name: "AMD AM29LV160DB",
-- size: 0x00200000,
-- numeraseregions: 4,
-- regions: {
-- { offset: 0x000000, erasesize: 0x04000, numblocks: 1 },
-- { offset: 0x004000, erasesize: 0x02000, numblocks: 2 },
-- { offset: 0x008000, erasesize: 0x08000, numblocks: 1 },
-- { offset: 0x010000, erasesize: 0x10000, numblocks: 31 }
-+ .mfr_id = MANUFACTURER_AMD,
-+ .dev_id = AM29LV160DB,
-+ .name = "AMD AM29LV160DB",
-+ .size = 0x00200000,
-+ .numeraseregions = 4,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x04000, .numblocks = 1 },
-+ { .offset = 0x004000, .erasesize = 0x02000, .numblocks = 2 },
-+ { .offset = 0x008000, .erasesize = 0x08000, .numblocks = 1 },
-+ { .offset = 0x010000, .erasesize = 0x10000, .numblocks = 31 }
- }
- }, {
-- mfr_id: MANUFACTURER_TOSHIBA,
-- dev_id: TC58FVT160,
-- name: "Toshiba TC58FVT160",
-- size: 0x00200000,
-- numeraseregions: 4,
-- regions: {
-- { offset: 0x000000, erasesize: 0x10000, numblocks: 31 },
-- { offset: 0x1F0000, erasesize: 0x08000, numblocks: 1 },
-- { offset: 0x1F8000, erasesize: 0x02000, numblocks: 2 },
-- { offset: 0x1FC000, erasesize: 0x04000, numblocks: 1 }
-+ .mfr_id = MANUFACTURER_TOSHIBA,
-+ .dev_id = TC58FVT160,
-+ .name = "Toshiba TC58FVT160",
-+ .size = 0x00200000,
-+ .numeraseregions = 4,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x10000, .numblocks = 31 },
-+ { .offset = 0x1F0000, .erasesize = 0x08000, .numblocks = 1 },
-+ { .offset = 0x1F8000, .erasesize = 0x02000, .numblocks = 2 },
-+ { .offset = 0x1FC000, .erasesize = 0x04000, .numblocks = 1 }
- }
- }, {
-- mfr_id: MANUFACTURER_FUJITSU,
-- dev_id: MBM29LV160TE,
-- name: "Fujitsu MBM29LV160TE",
-- size: 0x00200000,
-- numeraseregions: 4,
-- regions: {
-- { offset: 0x000000, erasesize: 0x10000, numblocks: 31 },
-- { offset: 0x1F0000, erasesize: 0x08000, numblocks: 1 },
-- { offset: 0x1F8000, erasesize: 0x02000, numblocks: 2 },
-- { offset: 0x1FC000, erasesize: 0x04000, numblocks: 1 }
-+ .mfr_id = MANUFACTURER_FUJITSU,
-+ .dev_id = MBM29LV160TE,
-+ .name = "Fujitsu MBM29LV160TE",
-+ .size = 0x00200000,
-+ .numeraseregions = 4,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x10000, .numblocks = 31 },
-+ { .offset = 0x1F0000, .erasesize = 0x08000, .numblocks = 1 },
-+ { .offset = 0x1F8000, .erasesize = 0x02000, .numblocks = 2 },
-+ { .offset = 0x1FC000, .erasesize = 0x04000, .numblocks = 1 }
- }
- }, {
-- mfr_id: MANUFACTURER_TOSHIBA,
-- dev_id: TC58FVB160,
-- name: "Toshiba TC58FVB160",
-- size: 0x00200000,
-- numeraseregions: 4,
-- regions: {
-- { offset: 0x000000, erasesize: 0x04000, numblocks: 1 },
-- { offset: 0x004000, erasesize: 0x02000, numblocks: 2 },
-- { offset: 0x008000, erasesize: 0x08000, numblocks: 1 },
-- { offset: 0x010000, erasesize: 0x10000, numblocks: 31 }
-+ .mfr_id = MANUFACTURER_TOSHIBA,
-+ .dev_id = TC58FVB160,
-+ .name = "Toshiba TC58FVB160",
-+ .size = 0x00200000,
-+ .numeraseregions = 4,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x04000, .numblocks = 1 },
-+ { .offset = 0x004000, .erasesize = 0x02000, .numblocks = 2 },
-+ { .offset = 0x008000, .erasesize = 0x08000, .numblocks = 1 },
-+ { .offset = 0x010000, .erasesize = 0x10000, .numblocks = 31 }
- }
- }, {
-- mfr_id: MANUFACTURER_FUJITSU,
-- dev_id: MBM29LV160BE,
-- name: "Fujitsu MBM29LV160BE",
-- size: 0x00200000,
-- numeraseregions: 4,
-- regions: {
-- { offset: 0x000000, erasesize: 0x04000, numblocks: 1 },
-- { offset: 0x004000, erasesize: 0x02000, numblocks: 2 },
-- { offset: 0x008000, erasesize: 0x08000, numblocks: 1 },
-- { offset: 0x010000, erasesize: 0x10000, numblocks: 31 }
-+ .mfr_id = MANUFACTURER_FUJITSU,
-+ .dev_id = MBM29LV160BE,
-+ .name = "Fujitsu MBM29LV160BE",
-+ .size = 0x00200000,
-+ .numeraseregions = 4,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x04000, .numblocks = 1 },
-+ { .offset = 0x004000, .erasesize = 0x02000, .numblocks = 2 },
-+ { .offset = 0x008000, .erasesize = 0x08000, .numblocks = 1 },
-+ { .offset = 0x010000, .erasesize = 0x10000, .numblocks = 31 }
- }
- }, {
-- mfr_id: MANUFACTURER_AMD,
-- dev_id: AM29LV800BB,
-- name: "AMD AM29LV800BB",
-- size: 0x00100000,
-- numeraseregions: 4,
-- regions: {
-- { offset: 0x000000, erasesize: 0x04000, numblocks: 1 },
-- { offset: 0x004000, erasesize: 0x02000, numblocks: 2 },
-- { offset: 0x008000, erasesize: 0x08000, numblocks: 1 },
-- { offset: 0x010000, erasesize: 0x10000, numblocks: 15 }
-+ .mfr_id = MANUFACTURER_AMD,
-+ .dev_id = AM29LV800BB,
-+ .name = "AMD AM29LV800BB",
-+ .size = 0x00100000,
-+ .numeraseregions = 4,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x04000, .numblocks = 1 },
-+ { .offset = 0x004000, .erasesize = 0x02000, .numblocks = 2 },
-+ { .offset = 0x008000, .erasesize = 0x08000, .numblocks = 1 },
-+ { .offset = 0x010000, .erasesize = 0x10000, .numblocks = 15 }
- }
- }, {
-- mfr_id: MANUFACTURER_AMD,
-- dev_id: AM29F800BB,
-- name: "AMD AM29F800BB",
-- size: 0x00100000,
-- numeraseregions: 4,
-- regions: {
-- { offset: 0x000000, erasesize: 0x04000, numblocks: 1 },
-- { offset: 0x004000, erasesize: 0x02000, numblocks: 2 },
-- { offset: 0x008000, erasesize: 0x08000, numblocks: 1 },
-- { offset: 0x010000, erasesize: 0x10000, numblocks: 15 }
-+ .mfr_id = MANUFACTURER_AMD,
-+ .dev_id = AM29F800BB,
-+ .name = "AMD AM29F800BB",
-+ .size = 0x00100000,
-+ .numeraseregions = 4,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x04000, .numblocks = 1 },
-+ { .offset = 0x004000, .erasesize = 0x02000, .numblocks = 2 },
-+ { .offset = 0x008000, .erasesize = 0x08000, .numblocks = 1 },
-+ { .offset = 0x010000, .erasesize = 0x10000, .numblocks = 15 }
- }
- }, {
-- mfr_id: MANUFACTURER_AMD,
-- dev_id: AM29LV800BT,
-- name: "AMD AM29LV800BT",
-- size: 0x00100000,
-- numeraseregions: 4,
-- regions: {
-- { offset: 0x000000, erasesize: 0x10000, numblocks: 15 },
-- { offset: 0x0F0000, erasesize: 0x08000, numblocks: 1 },
-- { offset: 0x0F8000, erasesize: 0x02000, numblocks: 2 },
-- { offset: 0x0FC000, erasesize: 0x04000, numblocks: 1 }
-+ .mfr_id = MANUFACTURER_AMD,
-+ .dev_id = AM29LV800BT,
-+ .name = "AMD AM29LV800BT",
-+ .size = 0x00100000,
-+ .numeraseregions = 4,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x10000, .numblocks = 15 },
-+ { .offset = 0x0F0000, .erasesize = 0x08000, .numblocks = 1 },
-+ { .offset = 0x0F8000, .erasesize = 0x02000, .numblocks = 2 },
-+ { .offset = 0x0FC000, .erasesize = 0x04000, .numblocks = 1 }
- }
- }, {
-- mfr_id: MANUFACTURER_AMD,
-- dev_id: AM29F800BT,
-- name: "AMD AM29F800BT",
-- size: 0x00100000,
-- numeraseregions: 4,
-- regions: {
-- { offset: 0x000000, erasesize: 0x10000, numblocks: 15 },
-- { offset: 0x0F0000, erasesize: 0x08000, numblocks: 1 },
-- { offset: 0x0F8000, erasesize: 0x02000, numblocks: 2 },
-- { offset: 0x0FC000, erasesize: 0x04000, numblocks: 1 }
-+ .mfr_id = MANUFACTURER_AMD,
-+ .dev_id = AM29F800BT,
-+ .name = "AMD AM29F800BT",
-+ .size = 0x00100000,
-+ .numeraseregions = 4,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x10000, .numblocks = 15 },
-+ { .offset = 0x0F0000, .erasesize = 0x08000, .numblocks = 1 },
-+ { .offset = 0x0F8000, .erasesize = 0x02000, .numblocks = 2 },
-+ { .offset = 0x0FC000, .erasesize = 0x04000, .numblocks = 1 }
- }
- }, {
-- mfr_id: MANUFACTURER_AMD,
-- dev_id: AM29LV800BB,
-- name: "AMD AM29LV800BB",
-- size: 0x00100000,
-- numeraseregions: 4,
-- regions: {
-- { offset: 0x000000, erasesize: 0x10000, numblocks: 15 },
-- { offset: 0x0F0000, erasesize: 0x08000, numblocks: 1 },
-- { offset: 0x0F8000, erasesize: 0x02000, numblocks: 2 },
-- { offset: 0x0FC000, erasesize: 0x04000, numblocks: 1 }
-+ .mfr_id = MANUFACTURER_AMD,
-+ .dev_id = AM29LV800BB,
-+ .name = "AMD AM29LV800BB",
-+ .size = 0x00100000,
-+ .numeraseregions = 4,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x10000, .numblocks = 15 },
-+ { .offset = 0x0F0000, .erasesize = 0x08000, .numblocks = 1 },
-+ { .offset = 0x0F8000, .erasesize = 0x02000, .numblocks = 2 },
-+ { .offset = 0x0FC000, .erasesize = 0x04000, .numblocks = 1 }
- }
- }, {
-- mfr_id: MANUFACTURER_FUJITSU,
-- dev_id: MBM29LV800BB,
-- name: "Fujitsu MBM29LV800BB",
-- size: 0x00100000,
-- numeraseregions: 4,
-- regions: {
-- { offset: 0x000000, erasesize: 0x04000, numblocks: 1 },
-- { offset: 0x004000, erasesize: 0x02000, numblocks: 2 },
-- { offset: 0x008000, erasesize: 0x08000, numblocks: 1 },
-- { offset: 0x010000, erasesize: 0x10000, numblocks: 15 }
-+ .mfr_id = MANUFACTURER_FUJITSU,
-+ .dev_id = MBM29LV800BB,
-+ .name = "Fujitsu MBM29LV800BB",
-+ .size = 0x00100000,
-+ .numeraseregions = 4,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x04000, .numblocks = 1 },
-+ { .offset = 0x004000, .erasesize = 0x02000, .numblocks = 2 },
-+ { .offset = 0x008000, .erasesize = 0x08000, .numblocks = 1 },
-+ { .offset = 0x010000, .erasesize = 0x10000, .numblocks = 15 }
- }
- }, {
-- mfr_id: MANUFACTURER_ST,
-- dev_id: M29W800T,
-- name: "ST M29W800T",
-- size: 0x00100000,
-- numeraseregions: 4,
-- regions: {
-- { offset: 0x000000, erasesize: 0x10000, numblocks: 15 },
-- { offset: 0x0F0000, erasesize: 0x08000, numblocks: 1 },
-- { offset: 0x0F8000, erasesize: 0x02000, numblocks: 2 },
-- { offset: 0x0FC000, erasesize: 0x04000, numblocks: 1 }
-+ .mfr_id = MANUFACTURER_ST,
-+ .dev_id = M29W800T,
-+ .name = "ST M29W800T",
-+ .size = 0x00100000,
-+ .numeraseregions = 4,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x10000, .numblocks = 15 },
-+ { .offset = 0x0F0000, .erasesize = 0x08000, .numblocks = 1 },
-+ { .offset = 0x0F8000, .erasesize = 0x02000, .numblocks = 2 },
-+ { .offset = 0x0FC000, .erasesize = 0x04000, .numblocks = 1 }
- }
- }, {
-- mfr_id: MANUFACTURER_ST,
-- dev_id: M29W160DT,
-- name: "ST M29W160DT",
-- size: 0x00200000,
-- numeraseregions: 4,
-- regions: {
-- { offset: 0x000000, erasesize: 0x10000, numblocks: 31 },
-- { offset: 0x1F0000, erasesize: 0x08000, numblocks: 1 },
-- { offset: 0x1F8000, erasesize: 0x02000, numblocks: 2 },
-- { offset: 0x1FC000, erasesize: 0x04000, numblocks: 1 }
-+ .mfr_id = MANUFACTURER_ST,
-+ .dev_id = M29W160DT,
-+ .name = "ST M29W160DT",
-+ .size = 0x00200000,
-+ .numeraseregions = 4,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x10000, .numblocks = 31 },
-+ { .offset = 0x1F0000, .erasesize = 0x08000, .numblocks = 1 },
-+ { .offset = 0x1F8000, .erasesize = 0x02000, .numblocks = 2 },
-+ { .offset = 0x1FC000, .erasesize = 0x04000, .numblocks = 1 }
- }
- }, {
-- mfr_id: MANUFACTURER_ST,
-- dev_id: M29W160DB,
-- name: "ST M29W160DB",
-- size: 0x00200000,
-- numeraseregions: 4,
-- regions: {
-- { offset: 0x000000, erasesize: 0x04000, numblocks: 1 },
-- { offset: 0x004000, erasesize: 0x02000, numblocks: 2 },
-- { offset: 0x008000, erasesize: 0x08000, numblocks: 1 },
-- { offset: 0x010000, erasesize: 0x10000, numblocks: 31 }
-+ .mfr_id = MANUFACTURER_ST,
-+ .dev_id = M29W160DB,
-+ .name = "ST M29W160DB",
-+ .size = 0x00200000,
-+ .numeraseregions = 4,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x04000, .numblocks = 1 },
-+ { .offset = 0x004000, .erasesize = 0x02000, .numblocks = 2 },
-+ { .offset = 0x008000, .erasesize = 0x08000, .numblocks = 1 },
-+ { .offset = 0x010000, .erasesize = 0x10000, .numblocks = 31 }
- }
- }, {
-- mfr_id: MANUFACTURER_AMD,
-- dev_id: AM29BDS323D,
-- name: "AMD AM29BDS323D",
-- size: 0x00400000,
-- numeraseregions: 3,
-- regions: {
-- { offset: 0x000000, erasesize: 0x10000, numblocks: 48 },
-- { offset: 0x300000, erasesize: 0x10000, numblocks: 15 },
-- { offset: 0x3f0000, erasesize: 0x02000, numblocks: 8 },
-+ .mfr_id = MANUFACTURER_AMD,
-+ .dev_id = AM29BDS323D,
-+ .name = "AMD AM29BDS323D",
-+ .size = 0x00400000,
-+ .numeraseregions = 3,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x10000, .numblocks = 48 },
-+ { .offset = 0x300000, .erasesize = 0x10000, .numblocks = 15 },
-+ { .offset = 0x3f0000, .erasesize = 0x02000, .numblocks = 8 },
- }
- }, {
-- mfr_id: MANUFACTURER_AMD,
-- dev_id: AM29BDS643D,
-- name: "AMD AM29BDS643D",
-- size: 0x00800000,
-- numeraseregions: 3,
-- regions: {
-- { offset: 0x000000, erasesize: 0x10000, numblocks: 96 },
-- { offset: 0x600000, erasesize: 0x10000, numblocks: 31 },
-- { offset: 0x7f0000, erasesize: 0x02000, numblocks: 8 },
-+ .mfr_id = MANUFACTURER_AMD,
-+ .dev_id = AM29BDS643D,
-+ .name = "AMD AM29BDS643D",
-+ .size = 0x00800000,
-+ .numeraseregions = 3,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x10000, .numblocks = 96 },
-+ { .offset = 0x600000, .erasesize = 0x10000, .numblocks = 31 },
-+ { .offset = 0x7f0000, .erasesize = 0x02000, .numblocks = 8 },
- }
- }, {
-- mfr_id: MANUFACTURER_ATMEL,
-- dev_id: AT49xV16x,
-- name: "Atmel AT49xV16x",
-- size: 0x00200000,
-- numeraseregions: 2,
-- regions: {
-- { offset: 0x000000, erasesize: 0x02000, numblocks: 8 },
-- { offset: 0x010000, erasesize: 0x10000, numblocks: 31 }
-+ .mfr_id = MANUFACTURER_ATMEL,
-+ .dev_id = AT49xV16x,
-+ .name = "Atmel AT49xV16x",
-+ .size = 0x00200000,
-+ .numeraseregions = 2,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x02000, .numblocks = 8 },
-+ { .offset = 0x010000, .erasesize = 0x10000, .numblocks = 31 }
- }
- }, {
-- mfr_id: MANUFACTURER_ATMEL,
-- dev_id: AT49xV16xT,
-- name: "Atmel AT49xV16xT",
-- size: 0x00200000,
-- numeraseregions: 2,
-- regions: {
-- { offset: 0x000000, erasesize: 0x10000, numblocks: 31 },
-- { offset: 0x1F0000, erasesize: 0x02000, numblocks: 8 }
-+ .mfr_id = MANUFACTURER_ATMEL,
-+ .dev_id = AT49xV16xT,
-+ .name = "Atmel AT49xV16xT",
-+ .size = 0x00200000,
-+ .numeraseregions = 2,
-+ .regions = {
-+ { .offset = 0x000000, .erasesize = 0x10000, .numblocks = 31 },
-+ { .offset = 0x1F0000, .erasesize = 0x02000, .numblocks = 8 }
- }
- }
- };
-@@ -822,7 +820,7 @@
-
- chip->state = FL_READY;
-
-- map->copy_from(map, buf, adr, len);
-+ map_copy_from(map, buf, adr, len);
-
- wake_up(&chip->wq);
- spin_unlock_bh(chip->mutex);
-@@ -984,7 +982,7 @@
- u_char tmp_buf[4];
- __u32 datum;
-
-- map->copy_from(map, tmp_buf,
-+ map_copy_from(map, tmp_buf,
- bus_ofs + private->chips[chipnum].start,
- map->buswidth);
- while (len && i < map->buswidth)
-@@ -1057,7 +1055,7 @@
- u_char tmp_buf[2];
- __u32 datum;
-
-- map->copy_from(map, tmp_buf,
-+ map_copy_from(map, tmp_buf,
- ofs + private->chips[chipnum].start,
- map->buswidth);
- while (len--) {
-@@ -1178,7 +1176,7 @@
- __u8 verify;
-
- for (address = adr; address < (adr + size); address++) {
-- if ((verify = map->read8(map, address)) != 0xFF) {
-+ if ((verify = map_read8(map, address)) != 0xFF) {
- error = 1;
- break;
- }
-diff -Nurb linux-mips-2.4.27/drivers/mtd/chips/cfi_cmdset_0001.c linux/drivers/mtd/chips/cfi_cmdset_0001.c
---- linux-mips-2.4.27/drivers/mtd/chips/cfi_cmdset_0001.c 2003-07-05 05:23:38.000000000 +0200
-+++ linux/drivers/mtd/chips/cfi_cmdset_0001.c 2004-11-19 10:25:11.733225024 +0100
-@@ -4,7 +4,7 @@
- *
- * (C) 2000 Red Hat. GPL'd
- *
-- * $Id$
-+ * $Id$
- *
- *
- * 10/10/2000 Nicolas Pitre <nico@cam.org>
-@@ -21,6 +21,7 @@
- #include <linux/types.h>
- #include <linux/kernel.h>
- #include <linux/sched.h>
-+#include <linux/init.h>
- #include <asm/io.h>
- #include <asm/byteorder.h>
-
-@@ -29,10 +30,14 @@
- #include <linux/delay.h>
- #include <linux/interrupt.h>
- #include <linux/mtd/map.h>
--#include <linux/mtd/cfi.h>
-+#include <linux/mtd/mtd.h>
- #include <linux/mtd/compatmac.h>
-+#include <linux/mtd/cfi.h>
-+
-+/* #define CMDSET0001_DISABLE_ERASE_SUSPEND_ON_WRITE */
-
--// debugging, turns off buffer write mode #define FORCE_WORD_WRITE
-+// debugging, turns off buffer write mode if set to 1
-+#define FORCE_WORD_WRITE 0
-
- static int cfi_intelext_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
- static int cfi_intelext_read_user_prot_reg (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
-@@ -52,16 +57,21 @@
-
- static struct mtd_info *cfi_intelext_setup (struct map_info *);
-
--static int do_point (struct mtd_info *mtd, loff_t from, size_t len,
-+static int cfi_intelext_point (struct mtd_info *mtd, loff_t from, size_t len,
- size_t *retlen, u_char **mtdbuf);
--static void do_unpoint (struct mtd_info *mtd, u_char *addr, loff_t from,
-+static void cfi_intelext_unpoint (struct mtd_info *mtd, u_char *addr, loff_t from,
- size_t len);
-
-+
-+/*
-+ * *********** SETUP AND PROBE BITS ***********
-+ */
-+
- static struct mtd_chip_driver cfi_intelext_chipdrv = {
-- probe: NULL, /* Not usable directly */
-- destroy: cfi_intelext_destroy,
-- name: "cfi_cmdset_0001",
-- module: THIS_MODULE
-+ .probe = NULL, /* Not usable directly */
-+ .destroy = cfi_intelext_destroy,
-+ .name = "cfi_cmdset_0001",
-+ .module = THIS_MODULE
- };
-
- /* #define DEBUG_LOCK_BITS */
-@@ -102,13 +112,63 @@
- }
-
- printk(" Vcc Logic Supply Optimum Program/Erase Voltage: %d.%d V\n",
-- extp->VccOptimal >> 8, extp->VccOptimal & 0xf);
-+ extp->VccOptimal >> 4, extp->VccOptimal & 0xf);
- if (extp->VppOptimal)
- printk(" Vpp Programming Supply Optimum Program/Erase Voltage: %d.%d V\n",
-- extp->VppOptimal >> 8, extp->VppOptimal & 0xf);
-+ extp->VppOptimal >> 4, extp->VppOptimal & 0xf);
- }
- #endif
-
-+#ifdef CMDSET0001_DISABLE_ERASE_SUSPEND_ON_WRITE
-+/* Some Intel Strata Flash prior to FPO revision C has bugs in this area */
-+static void fixup_intel_strataflash(struct map_info *map, void* param)
-+{
-+ struct cfi_private *cfi = map->fldrv_priv;
-+ struct cfi_pri_amdstd *extp = cfi->cmdset_priv;
-+
-+ printk(KERN_WARNING "cfi_cmdset_0001: Suspend "
-+ "erase on write disabled.\n");
-+ extp->SuspendCmdSupport &= ~1;
-+}
-+#endif
-+
-+static void fixup_st_m28w320ct(struct map_info *map, void* param)
-+{
-+ struct cfi_private *cfi = map->fldrv_priv;
-+
-+ cfi->cfiq->BufWriteTimeoutTyp = 0; /* Not supported */
-+ cfi->cfiq->Buf