You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge git://git.infradead.org/mtd-2.6
* 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.
This commit is contained in:
@@ -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 */
|
||||
|
||||
+7
-5
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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 *);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 *);
|
||||
|
||||
@@ -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 *);
|
||||
|
||||
@@ -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 *);
|
||||
|
||||
@@ -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 <dwmw2@infradead.org>
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -98,7 +98,6 @@
|
||||
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/pmc551.h>
|
||||
#include <linux/mtd/compatmac.h>
|
||||
|
||||
static struct mtd_info *pmc551list;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user