Skip to content

Commit

Permalink
Merge tag 'for-linus-20130204' of git://git.infradead.org/linux-mtd
Browse files Browse the repository at this point in the history
Pull MTD fixes from David Woodhouse:
 "A small set of simple regression and build fixes for 3.8:
   - Fix a warning introduced in ONFI NAND probe
   - Fix commandline partition parsing
   - Require BITREVERSE for DiskOnChip G3 driver
   - Fix build failure for davinci_nand as module
   - Bump NFLASH_READY_RETRIES for bcm47xxnflash"

* tag 'for-linus-20130204' of git://git.infradead.org/linux-mtd:
  mtd: nand: onfi don't WARN if we are in 16 bits mode
  mtd: physmap_of: fix cmdline partition method w/o linux, mtd-name
  mtd: docg3 fix missing bitreverse lib
  mtd: davinci_nand: fix modular build with CONFIG_OF=y
  mtd: bcm47xxnflash: increase NFLASH_READY_RETRIES
  • Loading branch information
torvalds committed Feb 4, 2013
2 parents 6edacf0 + 0ce82b7 commit d92dd35
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions drivers/mtd/devices/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ config MTD_DOCG3
tristate "M-Systems Disk-On-Chip G3"
select BCH
select BCH_CONST_PARAMS
select BITREVERSE
---help---
This provides an MTD device driver for the M-Systems DiskOnChip
G3 devices.
Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/maps/physmap_of.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ static int of_flash_probe(struct platform_device *dev)
resource_size_t res_size;
struct mtd_part_parser_data ppdata;
bool map_indirect;
const char *mtd_name;
const char *mtd_name = NULL;

match = of_match_device(of_flash_match, &dev->dev);
if (!match)
Expand Down
4 changes: 2 additions & 2 deletions drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#include "bcm47xxnflash.h"

/* Broadcom uses 1'000'000 but it seems to be too many. Tests on WNDR4500 has
* shown 164 retries as maxiumum. */
#define NFLASH_READY_RETRIES 1000
* shown ~1000 retries as maxiumum. */
#define NFLASH_READY_RETRIES 10000

#define NFLASH_SECTOR_SIZE 512

Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/nand/davinci_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ static struct nand_ecclayout hwecc4_2048 __initconst = {
static const struct of_device_id davinci_nand_of_match[] = {
{.compatible = "ti,davinci-nand", },
{},
}
};
MODULE_DEVICE_TABLE(of, davinci_nand_of_match);

static struct davinci_nand_pdata
Expand Down
7 changes: 5 additions & 2 deletions drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2857,8 +2857,11 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
int i;
int val;

/* ONFI need to be probed in 8 bits mode */
WARN_ON(chip->options & NAND_BUSWIDTH_16);
/* ONFI need to be probed in 8 bits mode, and 16 bits should be selected with NAND_BUSWIDTH_AUTO */
if (chip->options & NAND_BUSWIDTH_16) {
pr_err("Trying ONFI probe in 16 bits mode, aborting !\n");
return 0;
}
/* Try ONFI for unknown chip or LP */
chip->cmdfunc(mtd, NAND_CMD_READID, 0x20, -1);
if (chip->read_byte(mtd) != 'O' || chip->read_byte(mtd) != 'N' ||
Expand Down

0 comments on commit d92dd35

Please sign in to comment.