diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-15 20:32:47 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-15 20:32:47 -0400 |
| commit | 7355a5a654ccbbfd2fd11bb1e2389910f786ea92 (patch) | |
| tree | a1aa0b16bab51f8c5c505fe237d3ba6ba20b88aa | |
| parent | 7a1b29a82ba76427de791098c095ce31dab9333d (diff) | |
| parent | 84c4f46d9c0bd67b763b01a6b4c86dcfde6c818a (diff) | |
Merge git://git.infradead.org/mtd-2.6
* 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
| -rw-r--r-- | arch/arm/mach-ixp4xx/ixdp425-setup.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-mx3/mach-qong.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-orion5x/ts78xx-setup.c | 1 | ||||
| -rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 1 | ||||
| -rw-r--r-- | arch/blackfin/mach-bf561/boards/acvilon.c | 1 | ||||
| -rw-r--r-- | arch/mips/pnx833x/common/platform.c | 1 | ||||
| -rw-r--r-- | drivers/mtd/devices/m25p80.c | 14 | ||||
| -rw-r--r-- | drivers/mtd/nand/denali.c | 497 | ||||
| -rw-r--r-- | drivers/mtd/nand/denali.h | 18 | ||||
| -rw-r--r-- | drivers/mtd/nand/nand_ids.c | 2 | ||||
| -rw-r--r-- | drivers/mtd/nand/plat_nand.c | 5 |
11 files changed, 211 insertions, 331 deletions
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c index 827cbc4402f4..ea9ee4ed0a3e 100644 --- a/arch/arm/mach-ixp4xx/ixdp425-setup.c +++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c | |||
| @@ -100,6 +100,7 @@ ixdp425_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) | |||
| 100 | 100 | ||
| 101 | static struct platform_nand_data ixdp425_flash_nand_data = { | 101 | static struct platform_nand_data ixdp425_flash_nand_data = { |
| 102 | .chip = { | 102 | .chip = { |
| 103 | .nr_chips = 1, | ||
| 103 | .chip_delay = 30, | 104 | .chip_delay = 30, |
| 104 | .options = NAND_NO_AUTOINCR, | 105 | .options = NAND_NO_AUTOINCR, |
| 105 | #ifdef CONFIG_MTD_PARTITIONS | 106 | #ifdef CONFIG_MTD_PARTITIONS |
diff --git a/arch/arm/mach-mx3/mach-qong.c b/arch/arm/mach-mx3/mach-qong.c index d44ac70222a5..c8c380eef74c 100644 --- a/arch/arm/mach-mx3/mach-qong.c +++ b/arch/arm/mach-mx3/mach-qong.c | |||
| @@ -165,6 +165,7 @@ static void qong_nand_select_chip(struct mtd_info *mtd, int chip) | |||
| 165 | 165 | ||
| 166 | static struct platform_nand_data qong_nand_data = { | 166 | static struct platform_nand_data qong_nand_data = { |
| 167 | .chip = { | 167 | .chip = { |
| 168 | .nr_chips = 1, | ||
| 168 | .chip_delay = 20, | 169 | .chip_delay = 20, |
| 169 | .options = 0, | 170 | .options = 0, |
| 170 | }, | 171 | }, |
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c index 5041d1bc26b1..696b1a97f9e2 100644 --- a/arch/arm/mach-orion5x/ts78xx-setup.c +++ b/arch/arm/mach-orion5x/ts78xx-setup.c | |||
| @@ -216,6 +216,7 @@ static struct mtd_partition ts78xx_ts_nand_parts[] = { | |||
| 216 | 216 | ||
| 217 | static struct platform_nand_data ts78xx_ts_nand_data = { | 217 | static struct platform_nand_data ts78xx_ts_nand_data = { |
| 218 | .chip = { | 218 | .chip = { |
| 219 | .nr_chips = 1, | ||
| 219 | .part_probe_types = ts_nand_part_probes, | 220 | .part_probe_types = ts_nand_part_probes, |
| 220 | .partitions = ts78xx_ts_nand_parts, | 221 | .partitions = ts78xx_ts_nand_parts, |
| 221 | .nr_partitions = ARRAY_SIZE(ts78xx_ts_nand_parts), | 222 | .nr_partitions = ARRAY_SIZE(ts78xx_ts_nand_parts), |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 9eaf5b05c11e..68a27bccc7d4 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
| @@ -400,6 +400,7 @@ static int bfin_plat_nand_dev_ready(struct mtd_info *mtd) | |||
| 400 | 400 | ||
| 401 | static struct platform_nand_data bfin_plat_nand_data = { | 401 | static struct platform_nand_data bfin_plat_nand_data = { |
| 402 | .chip = { | 402 | .chip = { |
| 403 | .nr_chips = 1, | ||
| 403 | .chip_delay = 30, | 404 | .chip_delay = 30, |
| 404 | #ifdef CONFIG_MTD_PARTITIONS | 405 | #ifdef CONFIG_MTD_PARTITIONS |
| 405 | .part_probe_types = part_probes, | 406 | .part_probe_types = part_probes, |
diff --git a/arch/blackfin/mach-bf561/boards/acvilon.c b/arch/blackfin/mach-bf561/boards/acvilon.c index bfcfa86db2b5..35b6d124c1e3 100644 --- a/arch/blackfin/mach-bf561/boards/acvilon.c +++ b/arch/blackfin/mach-bf561/boards/acvilon.c | |||
| @@ -284,6 +284,7 @@ static int bfin_plat_nand_dev_ready(struct mtd_info *mtd) | |||
| 284 | 284 | ||
| 285 | static struct platform_nand_data bfin_plat_nand_data = { | 285 | static struct platform_nand_data bfin_plat_nand_data = { |
| 286 | .chip = { | 286 | .chip = { |
| 287 | .nr_chips = 1, | ||
| 287 | .chip_delay = 30, | 288 | .chip_delay = 30, |
| 288 | #ifdef CONFIG_MTD_PARTITIONS | 289 | #ifdef CONFIG_MTD_PARTITIONS |
| 289 | .part_probe_types = part_probes, | 290 | .part_probe_types = part_probes, |
diff --git a/arch/mips/pnx833x/common/platform.c b/arch/mips/pnx833x/common/platform.c index 01f8345a2069..ce45df17fd09 100644 --- a/arch/mips/pnx833x/common/platform.c +++ b/arch/mips/pnx833x/common/platform.c | |||
| @@ -266,6 +266,7 @@ pnx833x_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) | |||
| 266 | 266 | ||
| 267 | static struct platform_nand_data pnx833x_flash_nand_data = { | 267 | static struct platform_nand_data pnx833x_flash_nand_data = { |
| 268 | .chip = { | 268 | .chip = { |
| 269 | .nr_chips = 1, | ||
| 269 | .chip_delay = 25, | 270 | .chip_delay = 25, |
| 270 | .part_probe_types = part_probes, | 271 | .part_probe_types = part_probes, |
| 271 | }, | 272 | }, |
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index f90941a785e4..6f512b5c117b 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c | |||
| @@ -347,8 +347,7 @@ static int m25p80_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
| 347 | spi_message_add_tail(&t[1], &m); | 347 | spi_message_add_tail(&t[1], &m); |
| 348 | 348 | ||
| 349 | /* Byte count starts at zero. */ | 349 | /* Byte count starts at zero. */ |
| 350 | if (retlen) | 350 | *retlen = 0; |
| 351 | *retlen = 0; | ||
| 352 | 351 | ||
| 353 | mutex_lock(&flash->lock); | 352 | mutex_lock(&flash->lock); |
| 354 | 353 | ||
| @@ -394,8 +393,7 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
| 394 | dev_name(&flash->spi->dev), __func__, "to", | 393 | dev_name(&flash->spi->dev), __func__, "to", |
| 395 | (u32)to, len); | 394 | (u32)to, len); |
| 396 | 395 | ||
| 397 | if (retlen) | 396 | *retlen = 0; |
| 398 | *retlen = 0; | ||
| 399 | 397 | ||
| 400 | /* sanity checks */ | 398 | /* sanity checks */ |
| 401 | if (!len) | 399 | if (!len) |
| @@ -466,8 +464,7 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
| 466 | 464 | ||
| 467 | spi_sync(flash->spi, &m); | 465 | spi_sync(flash->spi, &m); |
| 468 | 466 | ||
| 469 | if (retlen) | 467 | *retlen += m.actual_length - m25p_cmdsz(flash); |
| 470 | *retlen += m.actual_length - m25p_cmdsz(flash); | ||
| 471 | } | 468 | } |
| 472 | } | 469 | } |
| 473 | 470 | ||
| @@ -485,8 +482,7 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
| 485 | size_t actual; | 482 | size_t actual; |
| 486 | int cmd_sz, ret; | 483 | int cmd_sz, ret; |
| 487 | 484 | ||
| 488 | if (retlen) | 485 | *retlen = 0; |
| 489 | *retlen = 0; | ||
| 490 | 486 | ||
| 491 | /* sanity checks */ | 487 | /* sanity checks */ |
| 492 | if (!len) | 488 | if (!len) |
| @@ -797,7 +793,7 @@ static int __devinit m25p_probe(struct spi_device *spi) | |||
| 797 | break; | 793 | break; |
| 798 | } | 794 | } |
| 799 | 795 | ||
| 800 | if (plat_id) | 796 | if (i < ARRAY_SIZE(m25p_ids) - 1) |
| 801 | id = plat_id; | 797 | id = plat_id; |
| 802 | else | 798 | else |
| 803 | dev_warn(&spi->dev, "unrecognized id %s\n", data->type); | 799 | dev_warn(&spi->dev, "unrecognized id %s\n", data->type); |
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index 618fb42b86b0..532fe07cf886 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c | |||
| @@ -56,7 +56,7 @@ MODULE_PARM_DESC(onfi_timing_mode, "Overrides default ONFI setting." | |||
| 56 | INTR_STATUS0__ERASE_COMP) | 56 | INTR_STATUS0__ERASE_COMP) |
| 57 | 57 | ||
| 58 | /* indicates whether or not the internal value for the flash bank is | 58 | /* indicates whether or not the internal value for the flash bank is |
| 59 | valid or not */ | 59 | * valid or not */ |
| 60 | #define CHIP_SELECT_INVALID -1 | 60 | #define CHIP_SELECT_INVALID -1 |
| 61 | 61 | ||
| 62 | #define SUPPORT_8BITECC 1 | 62 | #define SUPPORT_8BITECC 1 |
| @@ -71,7 +71,7 @@ MODULE_PARM_DESC(onfi_timing_mode, "Overrides default ONFI setting." | |||
| 71 | #define mtd_to_denali(m) container_of(m, struct denali_nand_info, mtd) | 71 | #define mtd_to_denali(m) container_of(m, struct denali_nand_info, mtd) |
| 72 | 72 | ||
| 73 | /* These constants are defined by the driver to enable common driver | 73 | /* These constants are defined by the driver to enable common driver |
| 74 | configuration options. */ | 74 | * configuration options. */ |
| 75 | #define SPARE_ACCESS 0x41 | 75 | #define SPARE_ACCESS 0x41 |
| 76 | #define MAIN_ACCESS 0x42 | 76 | #define MAIN_ACCESS 0x42 |
| 77 | #define MAIN_SPARE_ACCESS 0x43 | 77 | #define MAIN_SPARE_ACCESS 0x43 |
| @@ -97,7 +97,7 @@ static const struct pci_device_id denali_pci_ids[] = { | |||
| 97 | 97 | ||
| 98 | 98 | ||
| 99 | /* these are static lookup tables that give us easy access to | 99 | /* these are static lookup tables that give us easy access to |
| 100 | registers in the NAND controller. | 100 | * registers in the NAND controller. |
| 101 | |||
