Skip to content

Commit

Permalink
Merge git://git.infradead.org/mtd-2.6
Browse files Browse the repository at this point in the history
* git://git.infradead.org/mtd-2.6:
  mtd/nand_ids: Fix buswidth
  mtd/m25p80: fix test for end of loop
  mtd/m25p80: retlen is never NULL
  MIPS: Fix gen_nand probe structures contents
  gen_nand: Test if nr_chips field is valid
  BFIN: Fix gen_nand probe structures contents
  nand/denali: move all hardware initialization work to denali_hw_init
  nand/denali: Add a page check in denali_read_page & denali_read_page_raw
  nand/denali: use cpu_relax() while waiting for hardware interrupt
  nand/denali: change read_status function method
  nand/denali: Fixed check patch warnings
  ARM: Fix gen_nand probe structures contents
  mtd/nand_base: fix kernel-doc warnings & typos
  nand/denali: use dev_xx debug function to replace nand_dbg_print and some printk
  nand/denali: Fixed handle ECC error bugs
  nand/denali: use iowrite32() to replace denali_write32()
  nand/denali: Fixed probe function bugs
  • Loading branch information
torvalds committed Aug 16, 2010
2 parents 7a1b29a + 84c4f46 commit 7355a5a
Show file tree
Hide file tree
Showing 11 changed files with 211 additions and 331 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-ixp4xx/ixdp425-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ ixdp425_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)

static struct platform_nand_data ixdp425_flash_nand_data = {
.chip = {
.nr_chips = 1,
.chip_delay = 30,
.options = NAND_NO_AUTOINCR,
#ifdef CONFIG_MTD_PARTITIONS
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-mx3/mach-qong.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ static void qong_nand_select_chip(struct mtd_info *mtd, int chip)

static struct platform_nand_data qong_nand_data = {
.chip = {
.nr_chips = 1,
.chip_delay = 20,
.options = 0,
},
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-orion5x/ts78xx-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ static struct mtd_partition ts78xx_ts_nand_parts[] = {

static struct platform_nand_data ts78xx_ts_nand_data = {
.chip = {
.nr_chips = 1,
.part_probe_types = ts_nand_part_probes,
.partitions = ts78xx_ts_nand_parts,
.nr_partitions = ARRAY_SIZE(ts78xx_ts_nand_parts),
Expand Down
1 change: 1 addition & 0 deletions arch/blackfin/mach-bf537/boards/stamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ static int bfin_plat_nand_dev_ready(struct mtd_info *mtd)

static struct platform_nand_data bfin_plat_nand_data = {
.chip = {
.nr_chips = 1,
.chip_delay = 30,
#ifdef CONFIG_MTD_PARTITIONS
.part_probe_types = part_probes,
Expand Down
1 change: 1 addition & 0 deletions arch/blackfin/mach-bf561/boards/acvilon.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ static int bfin_plat_nand_dev_ready(struct mtd_info *mtd)

static struct platform_nand_data bfin_plat_nand_data = {
.chip = {
.nr_chips = 1,
.chip_delay = 30,
#ifdef CONFIG_MTD_PARTITIONS
.part_probe_types = part_probes,
Expand Down
1 change: 1 addition & 0 deletions arch/mips/pnx833x/common/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ pnx833x_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)

static struct platform_nand_data pnx833x_flash_nand_data = {
.chip = {
.nr_chips = 1,
.chip_delay = 25,
.part_probe_types = part_probes,
},
Expand Down
14 changes: 5 additions & 9 deletions drivers/mtd/devices/m25p80.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,7 @@ static int m25p80_read(struct mtd_info *mtd, loff_t from, size_t len,
spi_message_add_tail(&t[1], &m);

/* Byte count starts at zero. */
if (retlen)
*retlen = 0;
*retlen = 0;

mutex_lock(&flash->lock);

Expand Down Expand Up @@ -394,8 +393,7 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len,
dev_name(&flash->spi->dev), __func__, "to",
(u32)to, len);

if (retlen)
*retlen = 0;
*retlen = 0;

/* sanity checks */
if (!len)
Expand Down Expand Up @@ -466,8 +464,7 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len,

spi_sync(flash->spi, &m);

if (retlen)
*retlen += m.actual_length - m25p_cmdsz(flash);
*retlen += m.actual_length - m25p_cmdsz(flash);
}
}

Expand All @@ -485,8 +482,7 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len,
size_t actual;
int cmd_sz, ret;

if (retlen)
*retlen = 0;
*retlen = 0;

/* sanity checks */
if (!len)
Expand Down Expand Up @@ -797,7 +793,7 @@ static int __devinit m25p_probe(struct spi_device *spi)
break;
}

if (plat_id)
if (i < ARRAY_SIZE(m25p_ids) - 1)
id = plat_id;
else
dev_warn(&spi->dev, "unrecognized id %s\n", data->type);
Expand Down
Loading

0 comments on commit 7355a5a

Please sign in to comment.