forked from luck/tmp_suning_uos_patched
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
This commit is contained in:
commit
7355a5a654
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -635,24 +635,6 @@
|
|||
#define CLK_X 5
|
||||
#define CLK_MULTI 4
|
||||
|
||||
/* ffsport.h */
|
||||
#define VERBOSE 1
|
||||
|
||||
#define NAND_DBG_WARN 1
|
||||
#define NAND_DBG_DEBUG 2
|
||||
#define NAND_DBG_TRACE 3
|
||||
|
||||
#ifdef VERBOSE
|
||||
#define nand_dbg_print(level, args...) \
|
||||
do { \
|
||||
if (level <= nand_debug_level) \
|
||||
printk(KERN_ALERT args); \
|
||||
} while (0)
|
||||
#else
|
||||
#define nand_dbg_print(level, args...)
|
||||
#endif
|
||||
|
||||
|
||||
/* spectraswconfig.h */
|
||||
#define CMD_DMA 0
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ struct nand_flash_dev nand_flash_ids[] = {
|
|||
{"NAND 2GiB 3,3V 16-bit", 0xC5, 0, 2048, 0, LP_OPTIONS16},
|
||||
|
||||
/* 32 Gigabit */
|
||||
{"NAND 4GiB 3,3V 8-bit", 0xD7, 0, 4096, 0, LP_OPTIONS16},
|
||||
{"NAND 4GiB 3,3V 8-bit", 0xD7, 0, 4096, 0, LP_OPTIONS},
|
||||
|
||||
/*
|
||||
* Renesas AND 1 Gigabit. Those chips do not support extended id and
|
||||
|
|
|
@ -37,6 +37,11 @@ static int __devinit plat_nand_probe(struct platform_device *pdev)
|
|||
struct resource *res;
|
||||
int err = 0;
|
||||
|
||||
if (pdata->chip.nr_chips < 1) {
|
||||
dev_err(&pdev->dev, "invalid number of chips specified\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!res)
|
||||
return -ENXIO;
|
||||
|
|
Loading…
Reference in New Issue
Block a user