diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/nand/nand.c | 17 | ||||
-rw-r--r-- | drivers/nand/nand_base.c | 2 |
2 files changed, 12 insertions, 7 deletions
diff --git a/drivers/nand/nand.c b/drivers/nand/nand.c index 3899045..9fef71d 100644 --- a/drivers/nand/nand.c +++ b/drivers/nand/nand.c @@ -39,7 +39,7 @@ static ulong base_address[CFG_MAX_NAND_DEVICE] = CFG_NAND_BASE_LIST; static const char default_nand_name[] = "nand"; -extern void board_nand_init(struct nand_chip *nand); +extern int board_nand_init(struct nand_chip *nand); static void nand_init_chip(struct mtd_info *mtd, struct nand_chip *nand, ulong base_addr) @@ -47,13 +47,16 @@ static void nand_init_chip(struct mtd_info *mtd, struct nand_chip *nand, mtd->priv = nand; nand->IO_ADDR_R = nand->IO_ADDR_W = (void __iomem *)base_addr; - board_nand_init(nand); - - if (nand_scan(mtd, 1) == 0) { - if (!mtd->name) - mtd->name = (char *)default_nand_name; - } else + if (board_nand_init(nand) == 0) { + if (nand_scan(mtd, 1) == 0) { + if (!mtd->name) + mtd->name = (char *)default_nand_name; + } else + mtd->name = NULL; + } else { mtd->name = NULL; + mtd->size = 0; + } } diff --git a/drivers/nand/nand_base.c b/drivers/nand/nand_base.c index b7a5d32..95d6e4e 100644 --- a/drivers/nand/nand_base.c +++ b/drivers/nand/nand_base.c @@ -2407,7 +2407,9 @@ int nand_scan (struct mtd_info *mtd, int maxchips) } if (!nand_flash_ids[i].name) { +#if !defined(CONFIG_TQM8272) printk (KERN_WARNING "No NAND device found!!!\n"); +#endif this->select_chip(mtd, -1); return 1; } |