projects/linux·commit 7e97b283

Merge git://git.infradead.org/mtd-2.6

7e97b283 · Linus Torvalds <[email protected]> · 2008-04-25 12:25:48 -07:00

* git://git.infradead.org/mtd-2.6: (82 commits)
  [MTD] m25p80: Add Support for ATMEL AT25DF641 64-Megabit SPI Flash
  [MTD] m25p80: add FAST_READ access support to M25Pxx
  [MTD] [NAND] bf5xx_nand: Avoid crash if bfin_mac is installed.
  [MTD] [NAND] at91_nand: control NCE signal
  [MTD] [NAND] AT91 hardware ECC compile fix for at91sam9263 / at91sam9260
  [MTD] [NAND] Hardware ECC controller on at91sam9263 / at91sam9260
  [JFFS2] Introduce dbg_readinode2 log level, use it to shut read_dnode() up
  [JFFS2] Fix jffs2_reserve_space() when all blocks are pending erasure.
  [JFFS2] Add erase_checking_list to hold blocks being marked.
  UBI: add a message
  [JFFS2] Return values of jffs2_block_check_erase error paths
  [MTD] Clean up AR7 partition map support
  [MTD] [NOR] Fix Intel CFI driver for collie flash
  [JFFS2] Finally remove redundant ref->__totlen field.
  [JFFS2] Honour TEST_TOTLEN macro in debugging code. ref->__totlen is going!
  [JFFS2] Add paranoia debugging for superblock counts
  [JFFS2] Fix free space leak with in-band cleanmarkers
  [JFFS2] Self-sufficient #includes in jffs2_fs_i.h: include <linux/mutex.h>
  [MTD] [NAND] Verify probe by retrying to checking the results match
  [MTD] [NAND] S3C2410 Allow ECC disable to be specified by the board
  ...
Commit
7e97b28309edc5669ced2bb1371704e8f8d084e3
Parents
5421d059 · 3887ed52

Merge commit. Changes below are compared with the first parent: 5421d059.

Changes

89 files changed · +3342 −499

FileStatusAddDelContent
Documentation/ABI/stable/sysfs-class-ubiadded+212−0View file
Documentation/arm/Samsung-S3C24XX/NAND.txtadded+30−0View file
Documentation/arm/Samsung-S3C24XX/Overview.txtmodified+2−0View file
drivers/mtd/Kconfigmodified+6−0View file
drivers/mtd/Makefilemodified+1−0View file
drivers/mtd/ar7part.cadded+151−0View file
drivers/mtd/chips/cfi_cmdset_0001.cmodified+11−8View file
drivers/mtd/chips/cfi_cmdset_0002.cmodified+28−2View file
drivers/mtd/chips/cfi_cmdset_0020.cmodified+8−7View file
drivers/mtd/chips/cfi_probe.cmodified+6−1View file
drivers/mtd/chips/cfi_util.cmodified+1−1View file
drivers/mtd/chips/jedec_probe.cmodified+59−14View file
drivers/mtd/cmdlinepart.cmodified+7−8View file
drivers/mtd/devices/Kconfigmodified+7−0View file
drivers/mtd/devices/block2mtd.cmodified+5−5View file
drivers/mtd/devices/lart.cmodified+8−8View file
drivers/mtd/devices/m25p80.cmodified+26−14View file
drivers/mtd/devices/mtdram.cmodified+1−0View file
drivers/mtd/devices/phram.cmodified+1−1View file
drivers/mtd/ftl.cmodified+2−4View file
drivers/mtd/inftlmount.cmodified+0−5View file
drivers/mtd/maps/Kconfigmodified+3−0View file
drivers/mtd/maps/bast-flash.cmodified+3−2View file
drivers/mtd/maps/ck804xrom.cmodified+62−27View file
drivers/mtd/maps/integrator-flash.cmodified+2−0View file
drivers/mtd/maps/ixp2000.cmodified+2−1View file
drivers/mtd/maps/ixp4xx.cmodified+2−0View file
drivers/mtd/maps/omap_nor.cmodified+6−6View file
drivers/mtd/maps/pcmciamtd.cmodified+1−1View file
drivers/mtd/maps/physmap.cmodified+8−0View file
drivers/mtd/maps/plat-ram.cmodified+35−15View file
drivers/mtd/maps/pmcmsp-flash.cmodified+1−1View file
drivers/mtd/maps/sa1100-flash.cmodified+2−0View file
drivers/mtd/maps/sharpsl-flash.cmodified+1−1View file
drivers/mtd/maps/tqm8xxl.cmodified+3−3View file
drivers/mtd/mtdoops.cmodified+1−1View file
drivers/mtd/nand/Kconfigmodified+56−0View file
drivers/mtd/nand/Makefilemodified+2−0View file
drivers/mtd/nand/at91_nand.cmodified+364−6View file
drivers/mtd/nand/bf5xx_nand.cmodified+9−8View file
drivers/mtd/nand/cs553x_nand.cmodified+1−1View file
drivers/mtd/nand/fsl_elbc_nand.cmodified+26−13View file
drivers/mtd/nand/fsl_upm.cadded+291−0View file
drivers/mtd/nand/nand_base.cmodified+21−0View file
drivers/mtd/nand/ndfc.cmodified+2−0View file
drivers/mtd/nand/orion_nand.cmodified+1−0View file
drivers/mtd/nand/plat_nand.cmodified+2−0View file
drivers/mtd/nand/pxa3xx_nand.cadded+1249−0View file
drivers/mtd/nand/rtc_from4.cmodified+29−21View file
drivers/mtd/nand/s3c2410.cmodified+58−15View file
drivers/mtd/nftlmount.cmodified+0−5View file
drivers/mtd/ofpart.cmodified+2−0View file
drivers/mtd/onenand/onenand_base.cmodified+34−17View file
drivers/mtd/onenand/onenand_bbt.cmodified+0−3View file
drivers/mtd/rfd_ftl.cmodified+1−1View file
drivers/mtd/ubi/Kconfigmodified+7−2View file
drivers/mtd/ubi/build.cmodified+19−21View file
drivers/mtd/ubi/debug.hmodified+3−1View file
drivers/mtd/ubi/gluebi.cmodified+3−2View file
drivers/mtd/ubi/io.cmodified+4−0View file
drivers/mtd/ubi/scan.cmodified+8−33View file
drivers/mtd/ubi/scan.hmodified+1−1View file
include/mtd/ubi-header.h → drivers/mtd/ubi/ubi-media.hrenamed+4−4View file
drivers/mtd/ubi/ubi.hmodified+3−4View file
fs/jffs2/README.Lockingmodified+11−11View file
fs/jffs2/build.cmodified+1−0View file
fs/jffs2/debug.cmodified+159−5View file
fs/jffs2/debug.hmodified+6−0View file
fs/jffs2/dir.cmodified+29−29View file
fs/jffs2/erase.cmodified+42−38View file
fs/jffs2/file.cmodified+8−8View file
fs/jffs2/fs.cmodified+25−17View file
fs/jffs2/gc.cmodified+24−18View file
fs/jffs2/ioctl.cmodified+1−0View file
fs/jffs2/jffs2_fs_i.hmodified+2−2View file
fs/jffs2/jffs2_fs_sb.hmodified+4−3View file
fs/jffs2/nodelist.hmodified+1−1View file
fs/jffs2/nodemgmt.cmodified+13−11View file
fs/jffs2/readinode.cmodified+20−18View file
fs/jffs2/super.cmodified+7−7View file
fs/jffs2/wbuf.cmodified+20−8View file
fs/jffs2/write.cmodified+26−26View file
include/asm-arm/arch-pxa/pxa3xx_nand.hadded+18−0View file
include/asm-arm/plat-s3c/nand.hmodified+5−0View file
include/linux/mtd/inftl.hmodified+5−0View file
include/linux/mtd/nftl.hmodified+5−0View file
include/linux/mtd/onenand.hmodified+3−0View file
include/linux/mtd/plat-ram.hmodified+3−2View file
include/mtd/Kbuildmodified+0−1View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/ABI/stable/sysfs-class-ubi

View file
diff --git a/Documentation/ABI/stable/sysfs-class-ubi b/Documentation/ABI/stable/sysfs-class-ubi
new file mode 100644
index 0000000..18d471d
--- /dev/null
+++ b/Documentation/ABI/stable/sysfs-class-ubi
@@ -0,0 +1,212 @@
+What: /sys/class/ubi/
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ The ubi/ class sub-directory belongs to the UBI subsystem and
+ provides general UBI information, per-UBI device information
+ and per-UBI volume information.
+
+What: /sys/class/ubi/version
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ This file contains version of the latest supported UBI on-media
+ format. Currently it is 1, and there is no plan to change this.
+ However, if in the future UBI needs on-flash format changes
+ which cannot be done in a compatible manner, a new format
+ version will be added. So this is a mechanism for possible
+ future backward-compatible (but forward-incompatible)
+ improvements.
+
+What: /sys/class/ubiX/
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ The /sys/class/ubi0, /sys/class/ubi1, etc directories describe
+ UBI devices (UBI device 0, 1, etc). They contain general UBI
+ device information and per UBI volume information (each UBI
+ device may have many UBI volumes)
+
+What: /sys/class/ubi/ubiX/avail_eraseblocks
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Amount of available logical eraseblock. For example, one may
+ create a new UBI volume which has this amount of logical
+ eraseblocks.
+
+What: /sys/class/ubi/ubiX/bad_peb_count
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Count of bad physical eraseblocks on the underlying MTD device.
+
+What: /sys/class/ubi/ubiX/bgt_enabled
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Contains ASCII "0\n" if the UBI background thread is disabled,
+ and ASCII "1\n" if it is enabled.
+
+What: /sys/class/ubi/ubiX/dev
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Major and minor numbers of the character device corresponding
+ to this UBI device (in <major>:<minor> format).
+
+What: /sys/class/ubi/ubiX/eraseblock_size
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Maximum logical eraseblock size this UBI device may provide. UBI
+ volumes may have smaller logical eraseblock size because of their
+ alignment.
+
+What: /sys/class/ubi/ubiX/max_ec
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Maximum physical eraseblock erase counter value.
+
+What: /sys/class/ubi/ubiX/max_vol_count
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Maximum number of volumes which this UBI device may have.
+
+What: /sys/class/ubi/ubiX/min_io_size
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Minimum input/output unit size. All the I/O may only be done
+ in fractions of the contained number.
+
+What: /sys/class/ubi/ubiX/mtd_num
+Date: January 2008
+KernelVersion: 2.6.25
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Number of the underlying MTD device.
+
+What: /sys/class/ubi/ubiX/reserved_for_bad
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Number of physical eraseblocks reserved for bad block handling.
+
+What: /sys/class/ubi/ubiX/total_eraseblocks
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Total number of good (not marked as bad) physical eraseblocks on
+ the underlying MTD device.
+
+What: /sys/class/ubi/ubiX/volumes_count
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Count of volumes on this UBI device.
+
+What: /sys/class/ubi/ubiX/ubiX_Y/
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ The /sys/class/ubi/ubiX/ubiX_0/, /sys/class/ubi/ubiX/ubiX_1/,
+ etc directories describe UBI volumes on UBI device X (volumes
+ 0, 1, etc).
+
+What: /sys/class/ubi/ubiX/ubiX_Y/alignment
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Volume alignment - the value the logical eraseblock size of
+ this volume has to be aligned on. For example, 2048 means that
+ logical eraseblock size is multiple of 2048. In other words,
+ volume logical eraseblock size is UBI device logical eraseblock
+ size aligned to the alignment value.
+
+What: /sys/class/ubi/ubiX/ubiX_Y/corrupted
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Contains ASCII "0\n" if the UBI volume is OK, and ASCII "1\n"
+ if it is corrupted (e.g., due to an interrupted volume update).
+
+What: /sys/class/ubi/ubiX/ubiX_Y/data_bytes
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ The amount of data this volume contains. This value makes sense
+ only for static volumes, and for dynamic volume it equivalent
+ to the total volume size in bytes.
+
+What: /sys/class/ubi/ubiX/ubiX_Y/dev
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Major and minor numbers of the character device corresponding
+ to this UBI volume (in <major>:<minor> format).
+
+What: /sys/class/ubi/ubiX/ubiX_Y/name
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Volume name.
+
+What: /sys/class/ubi/ubiX/ubiX_Y/reserved_ebs
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Count of physical eraseblock reserved for this volume.
+ Equivalent to the volume size in logical eraseblocks.
+
+What: /sys/class/ubi/ubiX/ubiX_Y/type
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Volume type. Contains ASCII "dynamic\n" for dynamic volumes and
+ "static\n" for static volumes.
+
+What: /sys/class/ubi/ubiX/ubiX_Y/upd_marker
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Contains ASCII "0\n" if the update marker is not set for this
+ volume, and "1\n" if it is set. The update marker is set when
+ volume update starts, and cleaned when it ends. So the presence
+ of the update marker indicates that the volume is being updated
+ at the moment of the update was interrupted. The later may be
+ checked using the "corrupted" sysfs file.
+
+What: /sys/class/ubi/ubiX/ubiX_Y/usable_eb_size
+Date: July 2006
+KernelVersion: 2.6.22
+Contact: Artem Bityutskiy <[email protected]>
+Description:
+ Logical eraseblock size of this volume. Equivalent to logical
+ eraseblock size of the device aligned on the volume alignment
+ value.

Documentation/arm/Samsung-S3C24XX/NAND.txt

View file
diff --git a/Documentation/arm/Samsung-S3C24XX/NAND.txt b/Documentation/arm/Samsung-S3C24XX/NAND.txt
new file mode 100644
index 0000000..bc478a3
--- /dev/null
+++ b/Documentation/arm/Samsung-S3C24XX/NAND.txt
@@ -0,0 +1,30 @@
+ S3C24XX NAND Support
+ ====================
+
+Introduction
+------------
+
+Small Page NAND
+---------------
+
+The driver uses a 512 byte (1 page) ECC code for this setup. The
+ECC code is not directly compatible with the default kernel ECC
+code, so the driver enforces its own OOB layout and ECC parameters
+
+Large Page NAND
+---------------
+
+The driver is capable of handling NAND flash with a 2KiB page
+size, with support for hardware ECC generation and correction.
+
+Unlike the 512byte page mode, the driver generates ECC data for
+each 256 byte block in an 2KiB page. This means that more than
+one error in a page can be rectified. It also means that the
+OOB layout remains the default kernel layout for these flashes.
+
+
+Document Author
+---------------
+
+Ben Dooks, Copyright 2007 Simtec Electronics
+

Documentation/arm/Samsung-S3C24XX/Overview.txt

View file
diff --git a/Documentation/arm/Samsung-S3C24XX/Overview.txt b/Documentation/arm/Samsung-S3C24XX/Overview.txt
index c31b76f..d04e1e3 100644
--- a/Documentation/arm/Samsung-S3C24XX/Overview.txt
+++ b/Documentation/arm/Samsung-S3C24XX/Overview.txt
@@ -156,6 +156,8 @@ NAND
controller. If there are any problems the latest linux-mtd
code can be found from http://www.linux-mtd.infradead.org/
+ For more information see Documentation/arm/Samsung-S3C24XX/NAND.txt
+
Serial
------

drivers/mtd/Kconfig

View file
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index e850334..eed06d0 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -158,6 +158,12 @@ config MTD_OF_PARTS
the partition map from the children of the flash node,
as described in Documentation/powerpc/booting-without-of.txt.
+config MTD_AR7_PARTS
+ tristate "TI AR7 partitioning support"
+ depends on MTD_PARTITIONS
+ ---help---
+ TI AR7 partitioning support
+
comment "User Modules And Translation Layers"
config MTD_CHAR

drivers/mtd/Makefile

View file
diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
index 538e33d..4b77335 100644
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
@@ -11,6 +11,7 @@ obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o
obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
+obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o
obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o
# 'Users' - code which presents functionality to userspace.

drivers/mtd/ar7part.c

View file
diff --git a/drivers/mtd/ar7part.c b/drivers/mtd/ar7part.c
new file mode 100644
index 0000000..ecf170b
--- /dev/null
+++ b/drivers/mtd/ar7part.c
@@ -0,0 +1,151 @@
+/*
+ * Copyright © 2007 Eugene Konev <[email protected]>
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * TI AR7 flash partition table.
+ * Based on ar7 map by Felix Fietkau <[email protected]>
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/slab.h>
+
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/bootmem.h>
+#include <linux/magic.h>
+
+#define AR7_PARTS 4
+#define ROOT_OFFSET 0xe0000
+
+#define LOADER_MAGIC1 le32_to_cpu(0xfeedfa42)
+#define LOADER_MAGIC2 le32_to_cpu(0xfeed1281)
+
+#ifndef SQUASHFS_MAGIC
+#define SQUASHFS_MAGIC 0x73717368
+#endif
+
+struct ar7_bin_rec {
+ unsigned int checksum;
+ unsigned int length;
+ unsigned int address;
+};
+
+static struct mtd_partition ar7_parts[AR7_PARTS];
+
+static int create_mtd_partitions(struct mtd_info *master,
+ struct mtd_partition **pparts,
+ unsigned long origin)
+{
+ struct ar7_bin_rec header;
+ unsigned int offset;
+ size_t len;
+ unsigned int pre_size = master->erasesize, post_size = 0;
+ unsigned int root_offset = ROOT_OFFSET;
+
+ int retries = 10;
+
+ ar7_parts[0].name = "loader";
+ ar7_parts[0].offset = 0;
+ ar7_parts[0].size = master->erasesize;
+ ar7_parts[0].mask_flags = MTD_WRITEABLE;
+
+ ar7_parts[1].name = "config";
+ ar7_parts[1].offset = 0;
+ ar7_parts[1].size = master->erasesize;
+ ar7_parts[1].mask_flags = 0;
+
+ do { /* Try 10 blocks starting from master->erasesize */
+ offset = pre_size;
+ master->read(master, offset,
+ sizeof(header), &len, (uint8_t *)&header);
+ if (!strncmp((char *)&header, "TIENV0.8", 8))
+ ar7_parts[1].offset = pre_size;
+ if (header.checksum == LOADER_MAGIC1)
+ break;
+ if (header.checksum == LOADER_MAGIC2)
+ break;
+ pre_size += master->erasesize;
+ } while (retries--);
+
+ pre_size = offset;
+
+ if (!ar7_parts[1].offset) {
+ ar7_parts[1].offset = master->size - master->erasesize;
+ post_size = master->erasesize;
+ }
+
+ switch (header.checksum) {
+ case LOADER_MAGIC1:
+ while (header.length) {
+ offset += sizeof(header) + header.length;
+ master->read(master, offset, sizeof(header),
+ &len, (uint8_t *)&header);
+ }
+ root_offset = offset + sizeof(header) + 4;
+ break;
+ case LOADER_MAGIC2:
+ while (header.length) {
+ offset += sizeof(header) + header.length;
+ master->read(master, offset, sizeof(header),
+ &len, (uint8_t *)&header);
+ }
+ root_offset = offset + sizeof(header) + 4 + 0xff;
+ root_offset &= ~(uint32_t)0xff;
+ break;
+ default:
+ printk(KERN_WARNING "Unknown magic: %08x\n", header.checksum);
+ break;
+ }
+
+ master->read(master, root_offset,
+ sizeof(header), &len, (u8 *)&header);
+ if (header.checksum != SQUASHFS_MAGIC) {
+ root_offset += master->erasesize - 1;
+ root_offset &= ~(master->erasesize - 1);
+ }
+
+ ar7_parts[2].name = "linux";
+ ar7_parts[2].offset = pre_size;
+ ar7_parts[2].size = master->size - pre_size - post_size;
+ ar7_parts[2].mask_flags = 0;
+
+ ar7_parts[3].name = "rootfs";
+ ar7_parts[3].offset = root_offset;
+ ar7_parts[3].size = master->size - root_offset - post_size;
+ ar7_parts[3].mask_flags = 0;
+
+ *pparts = ar7_parts;
+ return AR7_PARTS;
+}
+
+static struct mtd_part_parser ar7_parser = {
+ .owner = THIS_MODULE,
+ .parse_fn = create_mtd_partitions,
+ .name = "ar7part",
+};
+
+static int __init ar7_parser_init(void)
+{
+ return register_mtd_parser(&ar7_parser);
+}
+
+module_init(ar7_parser_init);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR( "Felix Fietkau <[email protected]>, "
+ "Eugene Konev <[email protected]>");
+MODULE_DESCRIPTION("MTD partitioning for TI AR7");

drivers/mtd/chips/cfi_cmdset_0001.c

View file
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 0080452..e812df6 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -384,7 +384,7 @@ read_pri_intelext(struct map_info *map, __u16 adr)
if (extp_size > 4096) {
printk(KERN_ERR
"%s: cfi_pri_intelext is too fat\n",
- __FUNCTION__);
+ __func__);
return NULL;
}
goto again;
@@ -619,6 +619,9 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
sizeof(struct cfi_intelext_blockinfo);
}
+ if (!numparts)
+ numparts = 1;
+
/* Programming Region info */
if (extp->MinorVersion >= '4') {
struct cfi_intelext_programming_regioninfo *prinfo;
@@ -641,7 +644,7 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
if ((1 << partshift) < mtd->erasesize) {
printk( KERN_ERR
"%s: bad number of hw partitions (%d)\n",
- __FUNCTION__, numparts);
+ __func__, numparts);
return -EINVAL;
}
@@ -1071,10 +1074,10 @@ static int __xipram xip_wait_for_operation(
chip->state = newstate;
map_write(map, CMD(0xff), adr);
(void) map_read(map, adr);
- asm volatile (".rep 8; nop; .endr");
+ xip_iprefetch();
local_irq_enable();
spin_unlock(chip->mutex);
- asm volatile (".rep 8; nop; .endr");
+ xip_iprefetch();
cond_resched();
/*
@@ -2013,7 +2016,7 @@ static int cfi_intelext_lock(struct mtd_info *mtd, loff_t ofs, size_t len)
#ifdef DEBUG_LOCK_BITS
printk(KERN_DEBUG "%s: lock status before, ofs=0x%08llx, len=0x%08X\n",
- __FUNCTION__, ofs, len);
+ __func__, ofs, len);
cfi_varsize_frob(mtd, do_printlockstatus_oneblock,
ofs, len, NULL);
#endif
@@ -2023,7 +2026,7 @@ static int cfi_intelext_lock(struct mtd_info *mtd, loff_t ofs, size_t len)
#ifdef DEBUG_LOCK_BITS
printk(KERN_DEBUG "%s: lock status after, ret=%d\n",
- __FUNCTION__, ret);
+ __func__, ret);
cfi_varsize_frob(mtd, do_printlockstatus_oneblock,
ofs, len, NULL);
#endif
@@ -2037,7 +2040,7 @@ static int cfi_intelext_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
#ifdef DEBUG_LOCK_BITS
printk(KERN_DEBUG "%s: lock status before, ofs=0x%08llx, len=0x%08X\n",
- __FUNCTION__, ofs, len);
+ __func__, ofs, len);
cfi_varsize_frob(mtd, do_printlockstatus_oneblock,
ofs, len, NULL);
#endif
@@ -2047,7 +2050,7 @@ static int cfi_intelext_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
#ifdef DEBUG_LOCK_BITS
printk(KERN_DEBUG "%s: lock status after, ret=%d\n",
- __FUNCTION__, ret);
+ __func__, ret);
cfi_varsize_frob(mtd, do_printlockstatus_oneblock,
ofs, len, NULL);
#endif

drivers/mtd/chips/cfi_cmdset_0002.c

View file
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 458d477..f7fcc63 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -220,6 +220,28 @@ static void fixup_use_atmel_lock(struct mtd_info *mtd, void *param)
mtd->flags |= MTD_POWERUP_LOCK;
}
+static void fixup_s29gl064n_sectors(struct mtd_info *mtd, void *param)
+{
+ struct map_info *map = mtd->priv;
+ struct cfi_private *cfi = map->fldrv_priv;
+
+ if ((cfi->cfiq->EraseRegionInfo[0] & 0xffff) == 0x003f) {
+ cfi->cfiq->EraseRegionInfo[0] |= 0x0040;
+ pr_warning("%s: Bad S29GL064N CFI data, adjust from 64 to 128 sectors\n", mtd->name);
+ }
+}
+
+static void fixup_s29gl032n_sectors(struct mtd_info *mtd, void *param)
+{
+ struct map_info *map = mtd->priv;
+ struct cfi_private *cfi = map->fldrv_priv;
+
+ if ((cfi->cfiq->EraseRegionInfo[1] & 0xffff) == 0x007e) {
+ cfi->cfiq->EraseRegionInfo[1] &= ~0x0040;
+ pr_warning("%s: Bad S29GL032N CFI data, adjust from 127 to 63 sectors\n", mtd->name);
+ }
+}
+
static struct cfi_fixup cfi_fixup_table[] = {
{ CFI_MFR_ATMEL, CFI_ID_ANY, fixup_convert_atmel_pri, NULL },
#ifdef AMD_BOOTLOC_BUG
@@ -231,6 +253,10 @@ static struct cfi_fixup cfi_fixup_table[] = {
{ CFI_MFR_AMD, 0x0056, fixup_use_secsi, NULL, },
{ CFI_MFR_AMD, 0x005C, fixup_use_secsi, NULL, },
{ CFI_MFR_AMD, 0x005F, fixup_use_secsi, NULL, },
+ { CFI_MFR_AMD, 0x0c01, fixup_s29gl064n_sectors, NULL, },
+ { CFI_MFR_AMD, 0x1301, fixup_s29gl064n_sectors, NULL, },
+ { CFI_MFR_AMD, 0x1a00, fixup_s29gl032n_sectors, NULL, },
+ { CFI_MFR_AMD, 0x1a01, fixup_s29gl032n_sectors, NULL, },
#if !FORCE_WORD_WRITE
{ CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers, NULL, },
#endif
@@ -723,10 +749,10 @@ static void __xipram xip_udelay(struct map_info *map, struct flchip *chip,
chip->erase_suspended = 1;
map_write(map, CMD(0xf0), adr);
(void) map_read(map, adr);
- asm volatile (".rep 8; nop; .endr");
+ xip_iprefetch();
local_irq_enable();
spin_unlock(chip->mutex);
- asm volatile (".rep 8; nop; .endr");
+ xip_iprefetch();
cond_resched();
/*

drivers/mtd/chips/cfi_cmdset_0020.c

View file
diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c
index 492e2ab..1b720cc 100644
--- a/drivers/mtd/chips/cfi_cmdset_0020.c
+++ b/drivers/mtd/chips/cfi_cmdset_0020.c
@@ -445,7 +445,7 @@ static inline int do_write_buffer(struct map_info *map, struct flchip *chip,
retry:
#ifdef DEBUG_CFI_FEATURES
- printk("%s: chip->state[%d]\n", __FUNCTION__, chip->state);

This diff is incomplete. Download the complete patch.

drivers/mtd/chips/cfi_probe.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/chips/cfi_util.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/chips/jedec_probe.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/cmdlinepart.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/devices/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/devices/block2mtd.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/devices/lart.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/devices/m25p80.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/devices/mtdram.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/devices/phram.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/ftl.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/inftlmount.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/bast-flash.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/ck804xrom.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/integrator-flash.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/ixp2000.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/ixp4xx.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/omap_nor.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/pcmciamtd.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/physmap.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/plat-ram.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/pmcmsp-flash.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/sa1100-flash.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/sharpsl-flash.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/tqm8xxl.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/mtdoops.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/at91_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/bf5xx_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/cs553x_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/fsl_elbc_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/fsl_upm.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/nand_base.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/ndfc.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/orion_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/plat_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/pxa3xx_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/rtc_from4.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/s3c2410.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nftlmount.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/ofpart.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/onenand/onenand_base.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/onenand/onenand_bbt.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/rfd_ftl.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/ubi/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/ubi/build.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/ubi/debug.h

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/ubi/gluebi.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/ubi/io.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/ubi/scan.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/ubi/scan.h

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/ubi/ubi-media.h

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/ubi/ubi.h

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/README.Locking

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/build.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/debug.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/debug.h

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/dir.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/erase.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/file.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/fs.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/gc.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/ioctl.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/jffs2_fs_i.h

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/jffs2_fs_sb.h

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/nodelist.h

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/nodemgmt.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/readinode.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/super.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/wbuf.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/write.c

View file

This diff is incomplete. Download the complete patch.

include/asm-arm/arch-pxa/pxa3xx_nand.h

View file

This diff is incomplete. Download the complete patch.

include/asm-arm/plat-s3c/nand.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/inftl.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/nftl.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/onenand.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/plat-ram.h

View file

This diff is incomplete. Download the complete patch.

include/mtd/Kbuild

View file

This diff is incomplete. Download the complete patch.