On Fri, Aug 08, 2008 at 10:06:03AM +0800, Hong Xu wrote: > Sometimes, board module needs to know some information about the NAND > chip e.g. page size to continue it's initialization. This short patch > give board module a chance to continue its initialization after the > NAND chip is scaned. [snip] > nand->IO_ADDR_R = nand->IO_ADDR_W = (void __iomem *)base_addr; > if (board_nand_init(nand) == 0) { > - if (nand_scan(mtd, 1) == 0) { > + if ((nand_scan(mtd, 1) == 0) && (board_nand_init_tail(nand) == > 0)) { > if (!mtd->name) > mtd->name = (char *)default_nand_name; > } else
This doesn't give the board driver a chance to run before the bad block scan, though. The MTD code itself does (nand_scan_ident and nand_scan_tail, around which nand_scan is a wrapper), but the u-boot glue code doesn't currently let board drivers take advantage of that. I'd like to transition away from having a centralized nand_init(), and instead have the board drivers call nand_scan*() themselves. -Scott _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot