Commit d92dd359 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for-linus-20130204' of git://git.infradead.org/linux-mtd

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
parents 6edacf05 0ce82b7f
...@@ -272,6 +272,7 @@ config MTD_DOCG3 ...@@ -272,6 +272,7 @@ config MTD_DOCG3
tristate "M-Systems Disk-On-Chip G3" tristate "M-Systems Disk-On-Chip G3"
select BCH select BCH
select BCH_CONST_PARAMS select BCH_CONST_PARAMS
select BITREVERSE
---help--- ---help---
This provides an MTD device driver for the M-Systems DiskOnChip This provides an MTD device driver for the M-Systems DiskOnChip
G3 devices. G3 devices.
......
...@@ -170,7 +170,7 @@ static int of_flash_probe(struct platform_device *dev) ...@@ -170,7 +170,7 @@ static int of_flash_probe(struct platform_device *dev)
resource_size_t res_size; resource_size_t res_size;
struct mtd_part_parser_data ppdata; struct mtd_part_parser_data ppdata;
bool map_indirect; bool map_indirect;
const char *mtd_name; const char *mtd_name = NULL;
match = of_match_device(of_flash_match, &dev->dev); match = of_match_device(of_flash_match, &dev->dev);
if (!match) if (!match)
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#include "bcm47xxnflash.h" #include "bcm47xxnflash.h"
/* Broadcom uses 1'000'000 but it seems to be too many. Tests on WNDR4500 has /* Broadcom uses 1'000'000 but it seems to be too many. Tests on WNDR4500 has
* shown 164 retries as maxiumum. */ * shown ~1000 retries as maxiumum. */
#define NFLASH_READY_RETRIES 1000 #define NFLASH_READY_RETRIES 10000
#define NFLASH_SECTOR_SIZE 512 #define NFLASH_SECTOR_SIZE 512
......
...@@ -523,7 +523,7 @@ static struct nand_ecclayout hwecc4_2048 __initconst = { ...@@ -523,7 +523,7 @@ static struct nand_ecclayout hwecc4_2048 __initconst = {
static const struct of_device_id davinci_nand_of_match[] = { static const struct of_device_id davinci_nand_of_match[] = {
{.compatible = "ti,davinci-nand", }, {.compatible = "ti,davinci-nand", },
{}, {},
} };
MODULE_DEVICE_TABLE(of, davinci_nand_of_match); MODULE_DEVICE_TABLE(of, davinci_nand_of_match);
static struct davinci_nand_pdata static struct davinci_nand_pdata
......
...@@ -2857,8 +2857,11 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip, ...@@ -2857,8 +2857,11 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
int i; int i;
int val; int val;
/* ONFI need to be probed in 8 bits mode */ /* ONFI need to be probed in 8 bits mode, and 16 bits should be selected with NAND_BUSWIDTH_AUTO */
WARN_ON(chip->options & NAND_BUSWIDTH_16); 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 */ /* Try ONFI for unknown chip or LP */
chip->cmdfunc(mtd, NAND_CMD_READID, 0x20, -1); chip->cmdfunc(mtd, NAND_CMD_READID, 0x20, -1);
if (chip->read_byte(mtd) != 'O' || chip->read_byte(mtd) != 'N' || if (chip->read_byte(mtd) != 'O' || chip->read_byte(mtd) != 'N' ||
......
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