Commit 5af017c0 authored by David Woodhouse's avatar David Woodhouse

MTD and JFFS2 update.

 - JFFS2 bugfixes and performance improvements
 - Support for 64-bit flash arrangements
 - Optimise for linear mappings of flash, without out-of-line access functions
 - New map drivers
 - Updated NAND flash support, new board drivers
 - Support for DiskOnChip Millennium Plus and INFTL translation layer
 - Clean up all translation layers with a single blkdev helper library.
 - Fix races in MTD device registration/deregistration
 - Add support for new flash chips
 - Clean up partition parsing code

More detailed comments in per-file changelogs.
parent 015498d5
# $Id: Config.in,v 1.74 2002/04/23 13:52:14 mag Exp $ # $Id: Kconfig,v 1.3 2003/05/28 11:02:23 dwmw2 Exp $
menu "Memory Technology Devices (MTD)" menu "Memory Technology Devices (MTD)"
...@@ -199,13 +199,28 @@ config NFTL ...@@ -199,13 +199,28 @@ config NFTL
not use it. not use it.
config NFTL_RW config NFTL_RW
bool "Write support for NFTL (BETA)" bool "Write support for NFTL"
depends on NFTL depends on NFTL
help help
If you're lucky, this will actually work. Don't whinge if it Support for writing to the NAND Flash Translation Layer, as used
doesn't. Send mail to the MTD mailing list on the DiskOnChip.
<linux-mtd@lists.infradead.org> if you want to help to make it more
reliable. config INFTL
tristate "INFTL (Inverse NAND Flash Translation Layer) support"
depends on MTD
---help---
This provides support for the Inverse NAND Flash Translation
Layer which is used on M-Systems' newer DiskOnChip devices. It
uses a kind of pseudo-file system on a flash device to emulate
a block device with 512-byte sectors, on top of which you put
a 'normal' file system.
You may find that the algorithms used in this code are patented
unless you live in the Free World where software patents aren't
legal - in the USA you are only permitted to use this on DiskOnChip
hardware, although under the terms of the GPL you're obviously
permitted to copy, modify and distribute the code as you wish. Just
not use it.
source "drivers/mtd/chips/Kconfig" source "drivers/mtd/chips/Kconfig"
......
# #
# Makefile for the memory technology device drivers. # Makefile for the memory technology device drivers.
# #
# Based on: # $Id: Makefile.common,v 1.2 2003/05/23 11:38:29 dwmw2 Exp $
# $Id: Makefile,v 1.66 2002/04/23 13:52:14 mag Exp $
obj-y += chips/ maps/ devices/ nand/
# *** BIG UGLY NOTE *** # *** BIG UGLY NOTE ***
# #
...@@ -27,14 +24,18 @@ obj-$(CONFIG_MTD) += mtdcore.o ...@@ -27,14 +24,18 @@ obj-$(CONFIG_MTD) += mtdcore.o
obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o
obj-$(CONFIG_MTD_PARTITIONS) += mtdpart.o obj-$(CONFIG_MTD_PARTITIONS) += mtdpart.o
obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdline.o obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
obj-$(CONFIG_MTD_AFS_PARTS) += afs.o obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
# 'Users' - code which presents functionality to userspace. # 'Users' - code which presents functionality to userspace.
obj-$(CONFIG_MTD_CHAR) += mtdchar.o obj-$(CONFIG_MTD_CHAR) += mtdchar.o
obj-$(CONFIG_MTD_BLOCK) += mtdblock.o obj-$(CONFIG_MTD_BLOCK) += mtdblock.o mtd_blkdevs.o
obj-$(CONFIG_MTD_BLOCK_RO) += mtdblock_ro.o obj-$(CONFIG_MTD_BLOCK_RO) += mtdblock_ro.o mtd_blkdevs.o
obj-$(CONFIG_FTL) += ftl.o obj-$(CONFIG_FTL) += ftl.o mtd_blkdevs.o
obj-$(CONFIG_NFTL) += nftl.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
nftl-objs := nftlcore.o nftlmount.o obj-y += chips/ maps/ devices/ nand/
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
This is access code for flashes using ARM's flash partitioning This is access code for flashes using ARM's flash partitioning
standards. standards.
$Id: afs.c,v 1.8 2002/05/04 08:49:09 rmk Exp $ $Id: afs.c,v 1.11 2003/05/16 17:08:24 dwmw2 Exp $
======================================================================*/ ======================================================================*/
...@@ -125,7 +125,9 @@ afs_read_iis(struct mtd_info *mtd, struct image_info_struct *iis, u_int ptr) ...@@ -125,7 +125,9 @@ afs_read_iis(struct mtd_info *mtd, struct image_info_struct *iis, u_int ptr)
return ret; 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; struct mtd_partition *parts;
u_int mask, off, idx, sz; u_int mask, off, idx, sz;
...@@ -227,7 +229,25 @@ int parse_afs_partitions(struct mtd_info *mtd, struct mtd_partition **pparts) ...@@ -227,7 +229,25 @@ int parse_afs_partitions(struct mtd_info *mtd, struct mtd_partition **pparts)
return idx ? idx : ret; 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_AUTHOR("ARM Ltd");
MODULE_DESCRIPTION("ARM Firmware Suite partition parser"); MODULE_DESCRIPTION("ARM Firmware Suite partition parser");
......
# drivers/mtd/chips/Config.in # drivers/mtd/chips/Kconfig
# $Id: Config.in,v 1.12 2001/09/23 15:35:21 dwmw2 Exp $ # $Id: Kconfig,v 1.2 2003/05/28 10:59:06 dwmw2 Exp $
menu "RAM/ROM/Flash chip drivers" menu "RAM/ROM/Flash chip drivers"
depends on MTD!=n depends on MTD!=n
...@@ -15,7 +15,6 @@ config MTD_CFI ...@@ -15,7 +15,6 @@ config MTD_CFI
option. Visit <http://www.amd.com/products/nvd/overview/cfi.html> option. Visit <http://www.amd.com/products/nvd/overview/cfi.html>
for more information on CFI. for more information on CFI.
#dep_tristate ' Detect non-CFI Intel-compatible flash chips' CONFIG_MTD_INTELPROBE $CONFIG_MTD
config MTD_JEDECPROBE config MTD_JEDECPROBE
tristate "Detect non-CFI AMD/JEDEC-compatible flash chips" tristate "Detect non-CFI AMD/JEDEC-compatible flash chips"
depends on MTD depends on MTD
...@@ -145,7 +144,15 @@ config MTD_CFI_AMDSTD ...@@ -145,7 +144,15 @@ config MTD_CFI_AMDSTD
The Common Flash Interface defines a number of different command The Common Flash Interface defines a number of different command
sets which a CFI-compliant chip may claim to implement. This code sets which a CFI-compliant chip may claim to implement. This code
provides support for one of those command sets, used on chips provides support for one of those command sets, used on chips
chips including the AMD Am29LV320. including the AMD Am29LV320.
config MTD_CFI_STAA
tristate "Support for ST (Advanced Architecture) flash chips"
depends on MTD_GEN_PROBE
help
The Common Flash Interface defines a number of different command
sets which a CFI-compliant chip may claim to implement. This code
provides support for one of those command sets.
config MTD_RAM config MTD_RAM
tristate "Support for RAM chips in bus mapping" tristate "Support for RAM chips in bus mapping"
...@@ -177,10 +184,10 @@ config MTD_OBSOLETE_CHIPS ...@@ -177,10 +184,10 @@ config MTD_OBSOLETE_CHIPS
help help
This option does not enable any code directly, but will allow you to This option does not enable any code directly, but will allow you to
select some other chip drivers which are now considered obsolete, select some other chip drivers which are now considered obsolete,
because the generic CONFIG_JEDEC_PROBE code above should now detect because the generic CONFIG_JEDECPROBE code above should now detect
the chips which are supported by these drivers, and allow the generic the chips which are supported by these drivers, and allow the generic
CFI-compatible drivers to drive the chips. Say 'N' here unless you have CFI-compatible drivers to drive the chips. Say 'N' here unless you have
already tried the CONFIG_JEDEC_PROBE method and reported its failure already tried the CONFIG_JEDECPROBE method and reported its failure
to the MTD mailing list at <linux-mtd@lists.infradead.org> to the MTD mailing list at <linux-mtd@lists.infradead.org>
config MTD_AMDSTD config MTD_AMDSTD
...@@ -209,8 +216,7 @@ config MTD_JEDEC ...@@ -209,8 +216,7 @@ config MTD_JEDEC
programming flash. It is commonly used in older AMD chips. It is programming flash. It is commonly used in older AMD chips. It is
only called JEDEC because the JEDEC association only called JEDEC because the JEDEC association
<http://www.jedec.org/> distributes the identification codes for the <http://www.jedec.org/> distributes the identification codes for the
chips. WARNING!!!! This code does not compile and is incomplete as chips.
are the specific JEDEC devices drivers.
endmenu endmenu
# #
# linux/drivers/chips/Makefile # linux/drivers/chips/Makefile
# #
# $Id: Makefile,v 1.7 2001/10/05 06:53:51 dwmw2 Exp $ # $Id: Makefile.common,v 1.1 2003/05/21 15:00:01 dwmw2 Exp $
# *** BIG UGLY NOTE *** # *** BIG UGLY NOTE ***
# #
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
obj-$(CONFIG_MTD) += chipreg.o obj-$(CONFIG_MTD) += chipreg.o
obj-$(CONFIG_MTD_AMDSTD) += amd_flash.o obj-$(CONFIG_MTD_AMDSTD) += amd_flash.o
obj-$(CONFIG_MTD_CFI) += cfi_probe.o obj-$(CONFIG_MTD_CFI) += cfi_probe.o
obj-$(CONFIG_MTD_CFI_STAA) += cfi_cmdset_0020.o
obj-$(CONFIG_MTD_CFI_AMDSTD) += cfi_cmdset_0002.o obj-$(CONFIG_MTD_CFI_AMDSTD) += cfi_cmdset_0002.o
obj-$(CONFIG_MTD_CFI_INTELEXT) += cfi_cmdset_0001.o obj-$(CONFIG_MTD_CFI_INTELEXT) += cfi_cmdset_0001.o
obj-$(CONFIG_MTD_GEN_PROBE) += gen_probe.o obj-$(CONFIG_MTD_GEN_PROBE) += gen_probe.o
obj-$(CONFIG_MTD_INTELPROBE) += intel_probe.o
obj-$(CONFIG_MTD_JEDEC) += jedec.o obj-$(CONFIG_MTD_JEDEC) += jedec.o
obj-$(CONFIG_MTD_JEDECPROBE) += jedec_probe.o obj-$(CONFIG_MTD_JEDECPROBE) += jedec_probe.o
obj-$(CONFIG_MTD_RAM) += map_ram.o obj-$(CONFIG_MTD_RAM) += map_ram.o
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# #
# linux/drivers/devices/Makefile # linux/drivers/devices/Makefile
# #
# $Id: Makefile,v 1.4 2001/06/26 21:10:05 spse Exp $ # $Id: Makefile.common,v 1.3 2003/05/28 10:54:23 dwmw2 Exp $
# *** BIG UGLY NOTE *** # *** BIG UGLY NOTE ***
# #
...@@ -10,12 +10,13 @@ ...@@ -10,12 +10,13 @@
# here where previously there was none. We now have to ensure that # here where previously there was none. We now have to ensure that
# doc200[01].o are linked before docprobe.o # doc200[01].o are linked before docprobe.o
obj-$(CONFIG_MTD_DOC1000) += doc1000.o
obj-$(CONFIG_MTD_DOC2000) += doc2000.o obj-$(CONFIG_MTD_DOC2000) += doc2000.o
obj-$(CONFIG_MTD_DOC2001) += doc2001.o obj-$(CONFIG_MTD_DOC2001) += doc2001.o
obj-$(CONFIG_MTD_DOC2001PLUS) += doc2001plus.o
obj-$(CONFIG_MTD_DOCPROBE) += docprobe.o docecc.o obj-$(CONFIG_MTD_DOCPROBE) += docprobe.o docecc.o
obj-$(CONFIG_MTD_SLRAM) += slram.o obj-$(CONFIG_MTD_SLRAM) += slram.o
obj-$(CONFIG_MTD_PMC551) += pmc551.o obj-$(CONFIG_MTD_PMC551) += pmc551.o
obj-$(CONFIG_MTD_MS02NV) += ms02-nv.o
obj-$(CONFIG_MTD_MTDRAM) += mtdram.o obj-$(CONFIG_MTD_MTDRAM) += mtdram.o
obj-$(CONFIG_MTD_LART) += lart.o obj-$(CONFIG_MTD_LART) += lart.o
obj-$(CONFIG_MTD_BLKMTD) += blkmtd.o obj-$(CONFIG_MTD_BLKMTD) += blkmtd.o
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment