projects/linux·commit e8a89ceb

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

e8a89ceb · Linus Torvalds <[email protected]> · 2010-08-10 11:49:21 -07:00

* git://git.infradead.org/mtd-2.6: (79 commits)
  mtd: Remove obsolete <mtd/compatmac.h> include
  mtd: Update copyright notices
  jffs2: Update copyright notices
  mtd-physmap: add support users can assign the probe type in board files
  mtd: remove redwood map driver
  mxc_nand: Add v3 (i.MX51) Support
  mxc_nand: support 8bit ecc
  mxc_nand: fix correct_data function
  mxc_nand: add V1_V2 namespace to registers
  mxc_nand: factor out a check_int function
  mxc_nand: make some internally used functions overwriteable
  mxc_nand: rework get_dev_status
  mxc_nand: remove 0xe00 offset from registers
  mtd: denali: Add multi connected NAND support
  mtd: denali: Remove set_ecc_config function
  mtd: denali: Remove unuseful code in get_xx_nand_para functions
  mtd: denali: Remove device_info_tag structure
  mtd: m25p80: add support for the Winbond W25Q32 SPI flash chip
  mtd: m25p80: add support for the Intel/Numonyx {16,32,64}0S33B SPI flash chips
  mtd: m25p80: add support for the EON EN25P{32, 64} SPI flash chips
  ...

Fix up trivial conflicts in drivers/mtd/maps/{Kconfig,redwood.c} due to
redwood driver removal.
Commit
e8a89cebdbaab14caaa26debdb4ffd493b8831af
Parents
8196867c · 6ae0185f

Merge commit. Changes below are compared with the first parent: 8196867c.

Changes

107 files changed · +1910 −1525

FileStatusAddDelContent
arch/blackfin/include/asm/nand.hmodified+0−3View file
drivers/mtd/Kconfigmodified+7−5View file
drivers/mtd/afs.cmodified+1−1View file
drivers/mtd/chips/cfi_cmdset_0001.cmodified+20−11View file
drivers/mtd/chips/cfi_cmdset_0002.cmodified+13−4View file
drivers/mtd/chips/cfi_cmdset_0020.cmodified+0−1View file
drivers/mtd/chips/cfi_probe.cmodified+2−2View file
drivers/mtd/chips/cfi_util.cmodified+0−1View file
drivers/mtd/chips/chipreg.cmodified+0−1View file
drivers/mtd/chips/map_absent.cmodified+0−1View file
drivers/mtd/chips/map_ram.cmodified+0−1View file
drivers/mtd/chips/map_rom.cmodified+0−1View file
drivers/mtd/cmdlinepart.cmodified+16−1View file
drivers/mtd/devices/docecc.cmodified+0−1View file
drivers/mtd/devices/docprobe.cmodified+0−1View file
drivers/mtd/devices/m25p80.cmodified+29−14View file
drivers/mtd/devices/mtd_dataflash.cmodified+6−6View file
drivers/mtd/devices/mtdram.cmodified+0−1View file
drivers/mtd/devices/pmc551.cmodified+0−1View file
drivers/mtd/devices/sst25l.cmodified+1−1View file
drivers/mtd/ftl.cmodified+1−1View file
drivers/mtd/inftlcore.cmodified+3−3View file
drivers/mtd/inftlmount.cmodified+2−3View file
drivers/mtd/lpddr/lpddr_cmds.cmodified+10−10View file
drivers/mtd/maps/Kconfigmodified+0−8View file
drivers/mtd/maps/Makefilemodified+0−1View file
drivers/mtd/maps/ixp4xx.cmodified+27−8View file
drivers/mtd/maps/physmap.cmodified+9−5View file
drivers/mtd/maps/physmap_of.cmodified+3−3View file
drivers/mtd/maps/redwood.cdeleted+0−131View before deletion
drivers/mtd/mtd_blkdevs.cmodified+21−5View file
drivers/mtd/mtdblock.cmodified+17−2View file
drivers/mtd/mtdblock_ro.cmodified+17−2View file
drivers/mtd/mtdchar.cmodified+56−3View file
drivers/mtd/mtdconcat.cmodified+28−10View file
drivers/mtd/mtdcore.cmodified+17−4View file
drivers/mtd/mtdoops.cmodified+1−1View file
drivers/mtd/mtdpart.cmodified+26−5View file
drivers/mtd/mtdsuper.cmodified+2−0View file
drivers/mtd/nand/Kconfigmodified+16−17View file
drivers/mtd/nand/atmel_nand.cmodified+1−1View file
drivers/mtd/nand/bf5xx_nand.cmodified+72−45View file
drivers/mtd/nand/davinci_nand.cmodified+17−0View file
drivers/mtd/nand/denali.cmodified+475−765View file
drivers/mtd/nand/denali.hmodified+49−91View file
drivers/mtd/nand/diskonchip.cmodified+3−3View file
drivers/mtd/nand/mxc_nand.cmodified+425−175View file
drivers/mtd/nand/nand_base.cmodified+61−18View file
drivers/mtd/nand/nand_bbt.cmodified+75−28View file
drivers/mtd/nand/nand_ids.cmodified+4−0View file
drivers/mtd/nand/nandsim.cmodified+7−7View file
drivers/mtd/nand/plat_nand.cmodified+1−1View file
drivers/mtd/nand/r852.cmodified+3−3View file
drivers/mtd/nand/rtc_from4.cmodified+0−1View file
drivers/mtd/nand/s3c2410.cmodified+6−9View file
drivers/mtd/nand/sm_common.cmodified+1−1View file
drivers/mtd/nftlcore.cmodified+18−7View file
drivers/mtd/nftlmount.cmodified+2−1View file
drivers/mtd/ofpart.cmodified+2−2View file
drivers/mtd/onenand/Kconfigmodified+2−2View file
drivers/mtd/onenand/onenand_base.cmodified+35−14View file
drivers/mtd/onenand/onenand_bbt.cmodified+0−1View file
drivers/mtd/onenand/samsung.cmodified+8−13View file
drivers/mtd/redboot.cmodified+18−0View file
drivers/mtd/rfd_ftl.cmodified+1−1View file
drivers/mtd/ssfdc.cmodified+1−1View file
drivers/mtd/tests/mtd_pagetest.cmodified+4−5View file
fs/jffs2/background.cmodified+1−0View file
fs/jffs2/build.cmodified+1−0View file
fs/jffs2/compr.cmodified+3−2View file
fs/jffs2/compr.hmodified+1−0View file
fs/jffs2/compr_lzo.cmodified+1−0View file
fs/jffs2/compr_rtime.cmodified+1−0View file
fs/jffs2/compr_rubin.cmodified+1−0View file
fs/jffs2/compr_zlib.cmodified+1−0View file
fs/jffs2/debug.cmodified+1−0View file
fs/jffs2/debug.hmodified+1−0View file
fs/jffs2/dir.cmodified+1−0View file
fs/jffs2/erase.cmodified+1−0View file
fs/jffs2/file.cmodified+1−0View file
fs/jffs2/fs.cmodified+1−0View file
fs/jffs2/gc.cmodified+1−0View file
fs/jffs2/ioctl.cmodified+1−0View file
fs/jffs2/jffs2_fs_i.hmodified+1−0View file
fs/jffs2/jffs2_fs_sb.hmodified+1−0View file
fs/jffs2/nodelist.hmodified+0−1View file
include/linux/jffs2.hmodified+2−1View file
include/linux/mtd/bbm.hmodified+22−2View file
include/linux/mtd/blktrans.hmodified+14−2View file
include/linux/mtd/cfi.hmodified+17−3View file
include/linux/mtd/cfi_endian.hmodified+19−0View file
include/linux/mtd/compatmac.hdeleted+0−10View before deletion
include/linux/mtd/concat.hmodified+15−2View file
include/linux/mtd/doc2000.hmodified+18−5View file
include/linux/mtd/flashchip.hmodified+16−5View file
include/linux/mtd/gen_probe.hmodified+17−2View file
include/linux/mtd/map.hmodified+18−1View file
include/linux/mtd/mtd.hmodified+16−3View file
include/linux/mtd/nand.hmodified+3−5View file
include/linux/mtd/nand_ecc.hmodified+3−1View file
include/linux/mtd/nftl.hmodified+16−1View file
include/linux/mtd/onenand.hmodified+2−0View file
include/linux/mtd/physmap.hmodified+1−0View file
include/mtd/mtd-abi.hmodified+17−1View file
include/mtd/mtd-user.hmodified+16−1View file
include/mtd/nftl-user.hmodified+15−1View file
include/mtd/ubi-user.hmodified+1−1View file

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

arch/blackfin/include/asm/nand.h

View file
diff --git a/arch/blackfin/include/asm/nand.h b/arch/blackfin/include/asm/nand.h
index 3a1e79d..256c50d 100644
--- a/arch/blackfin/include/asm/nand.h
+++ b/arch/blackfin/include/asm/nand.h
@@ -15,8 +15,6 @@
* partitions = mtd partition list
*/
-#define NFC_PG_SIZE_256 0
-#define NFC_PG_SIZE_512 1
#define NFC_PG_SIZE_OFFSET 9
#define NFC_NWIDTH_8 0
@@ -30,7 +28,6 @@
struct bf5xx_nand_platform {
/* NAND chip information */
- unsigned short page_size;
unsigned short data_width;
/* RD/WR strobe delay timing information, all times in SCLK cycles */

drivers/mtd/Kconfig

View file
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index f8210bf..1e2cbf5 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -311,15 +311,17 @@ config SM_FTL
select MTD_BLKDEVS
select MTD_NAND_ECC
help
- This enables new and very EXPERMENTAL support for SmartMedia/xD
+ This enables EXPERIMENTAL R/W support for SmartMedia/xD
FTL (Flash translation layer).
- Write support isn't yet well tested, therefore this code IS likely to
- eat your card, so please don't use it together with valuable data.
- Use readonly driver (CONFIG_SSFDC) instead.
+ Write support is only lightly tested, therefore this driver
+ isn't recommended to use with valuable data (anyway if you have
+ valuable data, do backups regardless of software/hardware you
+ use, because you never know what will eat your data...)
+ If you only need R/O access, you can use older R/O driver
+ (CONFIG_SSFDC)
config MTD_OOPS
tristate "Log panic/oops to an MTD buffer"
- depends on MTD
help
This enables panic and oops messages to be logged to a circular
buffer in a flash partition where it can be read back at some

drivers/mtd/afs.c

View file
diff --git a/drivers/mtd/afs.c b/drivers/mtd/afs.c
index cec7ab9..302372c 100644
--- a/drivers/mtd/afs.c
+++ b/drivers/mtd/afs.c
@@ -2,7 +2,7 @@
drivers/mtd/afs.c: ARM Flash Layout/Partitioning
- Copyright (C) 2000 ARM Limited
+ Copyright © 2000 ARM Limited
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

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 62f3ea9..9e2b7e9 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -34,7 +34,6 @@
#include <linux/mtd/xip.h>
#include <linux/mtd/map.h>
#include <linux/mtd/mtd.h>
-#include <linux/mtd/compatmac.h>
#include <linux/mtd/cfi.h>
/* #define CMDSET0001_DISABLE_ERASE_SUSPEND_ON_WRITE */
@@ -63,6 +62,8 @@ static int cfi_intelext_erase_varsize(struct mtd_info *, struct erase_info *);
static void cfi_intelext_sync (struct mtd_info *);
static int cfi_intelext_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
static int cfi_intelext_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
+static int cfi_intelext_is_locked(struct mtd_info *mtd, loff_t ofs,
+ uint64_t len);
#ifdef CONFIG_MTD_OTP
static int cfi_intelext_read_fact_prot_reg (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 *);
@@ -448,6 +449,7 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary)
mtd->sync = cfi_intelext_sync;
mtd->lock = cfi_intelext_lock;
mtd->unlock = cfi_intelext_unlock;
+ mtd->is_locked = cfi_intelext_is_locked;
mtd->suspend = cfi_intelext_suspend;
mtd->resume = cfi_intelext_resume;
mtd->flags = MTD_CAP_NORFLASH;
@@ -717,7 +719,7 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
chip = &newcfi->chips[0];
for (i = 0; i < cfi->numchips; i++) {
shared[i].writing = shared[i].erasing = NULL;
- spin_lock_init(&shared[i].lock);
+ mutex_init(&shared[i].lock);
for (j = 0; j < numparts; j++) {
*chip = cfi->chips[i];
chip->start += j << partshift;
@@ -886,7 +888,7 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr
*/
struct flchip_shared *shared = chip->priv;
struct flchip *contender;
- spin_lock(&shared->lock);
+ mutex_lock(&shared->lock);
contender = shared->writing;
if (contender && contender != chip) {
/*
@@ -899,7 +901,7 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr
* get_chip returns success we're clear to go ahead.
*/
ret = mutex_trylock(&contender->mutex);
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
if (!ret)
goto retry;
mutex_unlock(&chip->mutex);
@@ -914,7 +916,7 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr
mutex_unlock(&contender->mutex);
return ret;
}
- spin_lock(&shared->lock);
+ mutex_lock(&shared->lock);
/* We should not own chip if it is already
* in FL_SYNCING state. Put contender and retry. */
@@ -930,7 +932,7 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr
* on this chip. Sleep. */
if (mode == FL_ERASING && shared->erasing
&& shared->erasing->oldstate == FL_ERASING) {
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
set_current_state(TASK_UNINTERRUPTIBLE);
add_wait_queue(&chip->wq, &wait);
mutex_unlock(&chip->mutex);
@@ -944,7 +946,7 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr
shared->writing = chip;
if (mode == FL_ERASING)
shared->erasing = chip;
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
}
ret = chip_ready(map, chip, adr, mode);
if (ret == -EAGAIN)
@@ -959,7 +961,7 @@ static void put_chip(struct map_info *map, struct flchip *chip, unsigned long ad
if (chip->priv) {
struct flchip_shared *shared = chip->priv;
- spin_lock(&shared->lock);
+ mutex_lock(&shared->lock);
if (shared->writing == chip && chip->oldstate == FL_READY) {
/* We own the ability to write, but we're done */
shared->writing = shared->erasing;
@@ -967,7 +969,7 @@ static void put_chip(struct map_info *map, struct flchip *chip, unsigned long ad
/* give back ownership to who we loaned it from */
struct flchip *loaner = shared->writing;
mutex_lock(&loaner->mutex);
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
mutex_unlock(&chip->mutex);
put_chip(map, loaner, loaner->start);
mutex_lock(&chip->mutex);
@@ -985,11 +987,11 @@ static void put_chip(struct map_info *map, struct flchip *chip, unsigned long ad
* Don't let the switch below mess things up since
* we don't have ownership to resume anything.
*/
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
wake_up(&chip->wq);
return;
}
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
}
switch(chip->oldstate) {
@@ -2139,6 +2141,13 @@ static int cfi_intelext_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
return ret;
}
+static int cfi_intelext_is_locked(struct mtd_info *mtd, loff_t ofs,
+ uint64_t len)
+{
+ return cfi_varsize_frob(mtd, do_getlockstatus_oneblock,
+ ofs, len, NULL) ? 1 : 0;
+}
+
#ifdef CONFIG_MTD_OTP
typedef int (*otp_op_t)(struct map_info *map, struct flchip *chip,

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 d81079e..3e6c47b 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -33,7 +33,6 @@
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/reboot.h>
-#include <linux/mtd/compatmac.h>
#include <linux/mtd/map.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/cfi.h>
@@ -417,16 +416,26 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
*/
cfi_fixup_major_minor(cfi, extp);
+ /*
+ * Valid primary extension versions are: 1.0, 1.1, 1.2, 1.3, 1.4
+ * see: http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_r20.pdf, page 19
+ * http://www.amd.com/us-en/assets/content_type/DownloadableAssets/cfi_100_20011201.pdf
+ * http://www.spansion.com/Support/Datasheets/s29ws-p_00_a12_e.pdf
+ */
if (extp->MajorVersion != '1' ||
- (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
+ (extp->MajorVersion == '1' && (extp->MinorVersion < '0' || extp->MinorVersion > '4'))) {
printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
- "version %c.%c.\n", extp->MajorVersion,
- extp->MinorVersion);
+ "version %c.%c (%#02x/%#02x).\n",
+ extp->MajorVersion, extp->MinorVersion,
+ extp->MajorVersion, extp->MinorVersion);
kfree(extp);
kfree(mtd);
return NULL;
}
+ printk(KERN_INFO " Amd/Fujitsu Extended Query version %c.%c.\n",
+ extp->MajorVersion, extp->MinorVersion);
+
/* Install our own private info structure */
cfi->cmdset_priv = extp;

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 e54e8c1..314af1f 100644
--- a/drivers/mtd/chips/cfi_cmdset_0020.c
+++ b/drivers/mtd/chips/cfi_cmdset_0020.c
@@ -33,7 +33,6 @@
#include <linux/mtd/map.h>
#include <linux/mtd/cfi.h>
#include <linux/mtd/mtd.h>
-#include <linux/mtd/compatmac.h>
static int cfi_staa_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *);

drivers/mtd/chips/cfi_probe.c

View file
diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c
index b2acd32..8f5b96a 100644
--- a/drivers/mtd/chips/cfi_probe.c
+++ b/drivers/mtd/chips/cfi_probe.c
@@ -235,9 +235,9 @@ static int __xipram cfi_chip_setup(struct map_info *map,
cfi_qry_mode_off(base, map, cfi);
xip_allowed(base, map);
- printk(KERN_INFO "%s: Found %d x%d devices at 0x%x in %d-bit bank\n",
+ printk(KERN_INFO "%s: Found %d x%d devices at 0x%x in %d-bit bank. Manufacturer ID %#08x Chip ID %#08x\n",
map->name, cfi->interleave, cfi->device_type*8, base,
- map->bankwidth*8);
+ map->bankwidth*8, cfi->mfr, cfi->id);
return 1;
}

drivers/mtd/chips/cfi_util.c

View file
diff --git a/drivers/mtd/chips/cfi_util.c b/drivers/mtd/chips/cfi_util.c
index d7c2c67..e503b2c 100644
--- a/drivers/mtd/chips/cfi_util.c
+++ b/drivers/mtd/chips/cfi_util.c
@@ -22,7 +22,6 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/map.h>
#include <linux/mtd/cfi.h>
-#include <linux/mtd/compatmac.h>
int __xipram cfi_qry_present(struct map_info *map, __u32 base,
struct cfi_private *cfi)

drivers/mtd/chips/chipreg.c

View file
diff --git a/drivers/mtd/chips/chipreg.c b/drivers/mtd/chips/chipreg.c
index c857609..da1f96f 100644
--- a/drivers/mtd/chips/chipreg.c
+++ b/drivers/mtd/chips/chipreg.c
@@ -10,7 +10,6 @@
#include <linux/slab.h>
#include <linux/mtd/map.h>
#include <linux/mtd/mtd.h>
-#include <linux/mtd/compatmac.h>
static DEFINE_SPINLOCK(chip_drvs_lock);
static LIST_HEAD(chip_drvs_list);

drivers/mtd/chips/map_absent.c

View file
diff --git a/drivers/mtd/chips/map_absent.c b/drivers/mtd/chips/map_absent.c
index 494d30d..f2b8729 100644
--- a/drivers/mtd/chips/map_absent.c
+++ b/drivers/mtd/chips/map_absent.c
@@ -25,7 +25,6 @@
#include <linux/init.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/map.h>
-#include <linux/mtd/compatmac.h>
static int map_absent_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
static int map_absent_write (struct mtd_info *, loff_t, size_t, size_t *, const u_char *);

drivers/mtd/chips/map_ram.c

View file
diff --git a/drivers/mtd/chips/map_ram.c b/drivers/mtd/chips/map_ram.c
index 6bdc50c..67640cc 100644
--- a/drivers/mtd/chips/map_ram.c
+++ b/drivers/mtd/chips/map_ram.c
@@ -13,7 +13,6 @@
#include <linux/init.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/map.h>
-#include <linux/mtd/compatmac.h>
static int mapram_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);

drivers/mtd/chips/map_rom.c

View file
diff --git a/drivers/mtd/chips/map_rom.c b/drivers/mtd/chips/map_rom.c
index 076090a..593f73d 100644
--- a/drivers/mtd/chips/map_rom.c
+++ b/drivers/mtd/chips/map_rom.c
@@ -13,7 +13,6 @@
#include <linux/init.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/map.h>
-#include <linux/mtd/compatmac.h>
static int maprom_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
static int maprom_write (struct mtd_info *, loff_t, size_t, size_t *, const u_char *);

drivers/mtd/cmdlinepart.c

View file
diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
index 1479da6..e790f38 100644
--- a/drivers/mtd/cmdlinepart.c
+++ b/drivers/mtd/cmdlinepart.c
@@ -1,7 +1,22 @@
/*
* Read flash partition table from command line
*
- * Copyright 2002 SYSGO Real-Time Solutions GmbH
+ * Copyright © 2002 SYSGO Real-Time Solutions GmbH
+ * Copyright © 2002-2010 David Woodhouse <[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
*
* The format for the command line is as follows:
*

drivers/mtd/devices/docecc.c

View file
diff --git a/drivers/mtd/devices/docecc.c b/drivers/mtd/devices/docecc.c
index a19cda5..a99838b 100644
--- a/drivers/mtd/devices/docecc.c
+++ b/drivers/mtd/devices/docecc.c
@@ -31,7 +31,6 @@
#include <linux/init.h>
#include <linux/types.h>
-#include <linux/mtd/compatmac.h> /* for min() in older kernels */
#include <linux/mtd/mtd.h>
#include <linux/mtd/doc2000.h>

drivers/mtd/devices/docprobe.c

View file
diff --git a/drivers/mtd/devices/docprobe.c b/drivers/mtd/devices/docprobe.c
index 6e62922..d374603 100644
--- a/drivers/mtd/devices/docprobe.c
+++ b/drivers/mtd/devices/docprobe.c
@@ -49,7 +49,6 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/doc2000.h>
-#include <linux/mtd/compatmac.h>
/* Where to look for the devices? */
#ifndef CONFIG_MTD_DOCPROBE_ADDRESS

drivers/mtd/devices/m25p80.c

View file
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 81e49a9..f90941a 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -16,6 +16,8 @@
*/
#include <linux/init.h>
+#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/interrupt.h>
@@ -639,8 +641,18 @@ static const struct spi_device_id m25p_ids[] = {
{ "at26df161a", INFO(0x1f4601, 0, 64 * 1024, 32, SECT_4K) },
{ "at26df321", INFO(0x1f4701, 0, 64 * 1024, 64, SECT_4K) },
+ /* EON -- en25pxx */
+ { "en25p32", INFO(0x1c2016, 0, 64 * 1024, 64, 0) },
+ { "en25p64", INFO(0x1c2017, 0, 64 * 1024, 128, 0) },
+
+ /* Intel/Numonyx -- xxxs33b */
+ { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) },
+ { "320s33b", INFO(0x898912, 0, 64 * 1024, 64, 0) },
+ { "640s33b", INFO(0x898913, 0, 64 * 1024, 128, 0) },
+
/* Macronix */
{ "mx25l4005a", INFO(0xc22013, 0, 64 * 1024, 8, SECT_4K) },
+ { "mx25l8005", INFO(0xc22014, 0, 64 * 1024, 16, 0) },
{ "mx25l3205d", INFO(0xc22016, 0, 64 * 1024, 64, 0) },
{ "mx25l6405d", INFO(0xc22017, 0, 64 * 1024, 128, 0) },
{ "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) },
@@ -680,6 +692,16 @@ static const struct spi_device_id m25p_ids[] = {
{ "m25p64", INFO(0x202017, 0, 64 * 1024, 128, 0) },
{ "m25p128", INFO(0x202018, 0, 256 * 1024, 64, 0) },
+ { "m25p05-nonjedec", INFO(0, 0, 32 * 1024, 2, 0) },
+ { "m25p10-nonjedec", INFO(0, 0, 32 * 1024, 4, 0) },
+ { "m25p20-nonjedec", INFO(0, 0, 64 * 1024, 4, 0) },
+ { "m25p40-nonjedec", INFO(0, 0, 64 * 1024, 8, 0) },
+ { "m25p80-nonjedec", INFO(0, 0, 64 * 1024, 16, 0) },
+ { "m25p16-nonjedec", INFO(0, 0, 64 * 1024, 32, 0) },
+ { "m25p32-nonjedec", INFO(0, 0, 64 * 1024, 64, 0) },
+ { "m25p64-nonjedec", INFO(0, 0, 64 * 1024, 128, 0) },
+ { "m25p128-nonjedec", INFO(0, 0, 256 * 1024, 64, 0) },
+
{ "m45pe10", INFO(0x204011, 0, 64 * 1024, 2, 0) },
{ "m45pe80", INFO(0x204014, 0, 64 * 1024, 16, 0) },
{ "m45pe16", INFO(0x204015, 0, 64 * 1024, 32, 0) },
@@ -694,6 +716,7 @@ static const struct spi_device_id m25p_ids[] = {
{ "w25x80", INFO(0xef3014, 0, 64 * 1024, 16, SECT_4K) },
{ "w25x16", INFO(0xef3015, 0, 64 * 1024, 32, SECT_4K) },
{ "w25x32", INFO(0xef3016, 0, 64 * 1024, 64, SECT_4K) },
+ { "w25q32", INFO(0xef4016, 0, 64 * 1024, 64, SECT_4K) },
{ "w25x64", INFO(0xef3017, 0, 64 * 1024, 128, SECT_4K) },
/* Catalyst / On Semiconductor -- non-JEDEC */
@@ -723,7 +746,7 @@ static const struct spi_device_id *__devinit jedec_probe(struct spi_device *spi)
if (tmp < 0) {
DEBUG(MTD_DEBUG_LEVEL0, "%s: error %d reading JEDEC ID\n",
dev_name(&spi->dev), tmp);
- return NULL;
+ return ERR_PTR(tmp);
}
jedec = id[0];
jedec = jedec << 8;
@@ -731,14 +754,6 @@ static const struct spi_device_id *__devinit jedec_probe(struct spi_device *spi)
jedec = jedec << 8;
jedec |= id[2];
- /*
- * Some chips (like Numonyx M25P80) have JEDEC and non-JEDEC variants,
- * which depend on technology process. Officially RDID command doesn't
- * exist for non-JEDEC chips, but for compatibility they return ID 0.
- */
- if (jedec == 0)
- return NULL;
-
ext_jedec = id[3] << 8 | id[4];
for (tmp = 0; tmp < ARRAY_SIZE(m25p_ids) - 1; tmp++) {
@@ -749,7 +764,7 @@ static const struct spi_device_id *__devinit jedec_probe(struct spi_device *spi)
return &m25p_ids[tmp];
}
}
- return NULL;
+ return ERR_PTR(-ENODEV);
}
@@ -794,9 +809,8 @@ static int __devinit m25p_probe(struct spi_device *spi)
const struct spi_device_id *jid;
jid = jedec_probe(spi);
- if (!jid) {
- dev_info(&spi->dev, "non-JEDEC variant of %s\n",
- id->name);
+ if (IS_ERR(jid)) {
+ return PTR_ERR(jid);
} else if (jid != id) {
/*
* JEDEC knows better, so overwrite platform ID. We
@@ -826,11 +840,12 @@ static int __devinit m25p_probe(struct spi_device *spi)
dev_set_drvdata(&spi->dev, flash);
/*
- * Atmel and SST serial flash tend to power
+ * Atmel, SST and Intel/Numonyx serial flash tend to power
* up with the software protection bits set
*/
if (info->jedec_id >> 16 == 0x1f ||
+ info->jedec_id >> 16 == 0x89 ||
info->jedec_id >> 16 == 0xbf) {
write_enable(flash);
write_sr(flash, 0);

drivers/mtd/devices/mtd_dataflash.c

View file
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index 1981740..c5015cc 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -141,7 +141,7 @@ static int dataflash_waitready(struct spi_device *spi)
*/
static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr)
{
- struct dataflash *priv = (struct dataflash *)mtd->priv;
+ struct dataflash *priv = mtd->priv;
struct spi_device *spi = priv->spi;
struct spi_transfer x = { .tx_dma = 0, };
struct spi_message msg;
@@ -231,7 +231,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr)
static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, u_char *buf)
{
- struct dataflash *priv = (struct dataflash *)mtd->priv;
+ struct dataflash *priv = mtd->priv;
struct spi_transfer x[2] = { { .tx_dma = 0, }, };
struct spi_message msg;
unsigned int addr;
@@ -304,7 +304,7 @@ static int dataflash_read(struct mtd_info *mtd, loff_t from, size_t len,
static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
size_t * retlen, const u_char * buf)
{
- struct dataflash *priv = (struct dataflash *)mtd->priv;
+ struct dataflash *priv = mtd->priv;
struct spi_device *spi = priv->spi;
struct spi_transfer x[2] = { { .tx_dma = 0, }, };
struct spi_message msg;
@@ -515,7 +515,7 @@ static ssize_t otp_read(struct spi_device *spi, unsigned base,
static int dataflash_read_fact_otp(struct mtd_info *mtd,
loff_t from, size_t len, size_t *retlen, u_char *buf)
{
- struct dataflash *priv = (struct dataflash *)mtd->priv;
+ struct dataflash *priv = mtd->priv;
int status;
/* 64 bytes, from 0..63 ... start at 64 on-chip */
@@ -532,7 +532,7 @@ static int dataflash_read_fact_otp(struct mtd_info *mtd,
static int dataflash_read_user_otp(struct mtd_info *mtd,
loff_t from, size_t len, size_t *retlen, u_char *buf)
{
- struct dataflash *priv = (struct dataflash *)mtd->priv;
+ struct dataflash *priv = mtd->priv;
int status;
/* 64 bytes, from 0..63 ... start at 0 on-chip */
@@ -553,7 +553,7 @@ static int dataflash_write_user_otp(struct mtd_info *mtd,
const size_t l = 4 + 64;
uint8_t *scratch;
struct spi_transfer t;
- struct dataflash *priv = (struct dataflash *)mtd->priv;
+ struct dataflash *priv = mtd->priv;
int status;
if (len > 64)

drivers/mtd/devices/mtdram.c

View file
diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c
index fce5ff7..26a6e80 100644
--- a/drivers/mtd/devices/mtdram.c
+++ b/drivers/mtd/devices/mtdram.c
@@ -14,7 +14,6 @@
#include <linux/ioport.h>
#include <linux/vmalloc.h>
#include <linux/init.h>
-#include <linux/mtd/compatmac.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/mtdram.h>

drivers/mtd/devices/pmc551.c

View file
diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c
index fc8ea0a..ef0aba0 100644
--- a/drivers/mtd/devices/pmc551.c
+++ b/drivers/mtd/devices/pmc551.c
@@ -98,7 +98,6 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/pmc551.h>
-#include <linux/mtd/compatmac.h>
static struct mtd_info *pmc551list;

drivers/mtd/devices/sst25l.c

View file
diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index ab5d8cd..684247a 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -454,7 +454,7 @@ static int __init sst25l_probe(struct spi_device *spi)
parts, nr_parts);
}
- } else if (data->nr_parts) {
+ } else if (data && data->nr_parts) {
dev_warn(&spi->dev, "ignoring %d default partitions on %s\n",
data->nr_parts, data->name);
}

drivers/mtd/ftl.c

View file
diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c
index 62da9eb..4d6a64c 100644
--- a/drivers/mtd/ftl.c
+++ b/drivers/mtd/ftl.c
@@ -26,7 +26,7 @@
The initial developer of the original code is David A. Hinds
<[email protected]>. Portions created by David A. Hinds
- are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
+ are Copyright © 1999 David A. Hinds. All Rights Reserved.
Alternatively, the contents of this file may be used under the
terms of the GNU General Public License version 2 (the "GPL"), in

drivers/mtd/inftlcore.c

View file
diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c
index 015a7fe..d7592e6 100644
--- a/drivers/mtd/inftlcore.c
+++ b/drivers/mtd/inftlcore.c

This diff is incomplete. Download the complete patch.

drivers/mtd/inftlmount.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/lpddr/lpddr_cmds.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/Makefile

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/physmap.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/physmap_of.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/redwood.c

View before deletion

This diff is incomplete. Download the complete patch.

drivers/mtd/mtd_blkdevs.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/mtdblock.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/mtdblock_ro.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/mtdchar.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/mtdconcat.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/mtdcore.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/mtdpart.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/mtdsuper.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/atmel_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/davinci_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/denali.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/denali.h

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/diskonchip.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/mxc_nand.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/nand_bbt.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/nand_ids.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/nandsim.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/r852.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/nand/sm_common.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nftlcore.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/Kconfig

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/onenand/samsung.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/redboot.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/ssfdc.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/tests/mtd_pagetest.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/background.c

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/compr.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/compr.h

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/compr_lzo.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/compr_rtime.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/compr_rubin.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/compr_zlib.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.

include/linux/jffs2.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/bbm.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/blktrans.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/cfi.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/cfi_endian.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/compatmac.h

View before deletion

This diff is incomplete. Download the complete patch.

include/linux/mtd/concat.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/doc2000.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/flashchip.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/gen_probe.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/map.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/mtd.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/nand.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/nand_ecc.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/physmap.h

View file

This diff is incomplete. Download the complete patch.

include/mtd/mtd-abi.h

View file

This diff is incomplete. Download the complete patch.

include/mtd/mtd-user.h

View file

This diff is incomplete. Download the complete patch.

include/mtd/nftl-user.h

View file

This diff is incomplete. Download the complete patch.

include/mtd/ubi-user.h

View file

This diff is incomplete. Download the complete patch.