aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-01-23 02:44:10 -0500
committerDavid Woodhouse <dwmw2@infradead.org>2007-01-23 10:36:43 -0500
commitf7c37d7b8aaab1b023b0b239fc632585ec88d0bc (patch)
tree0ee494d3240eb353ef0551ddfa094f321ffd326a /drivers/mtd/nand
parent527a4f45ef8a4599a899c997e40dbf2feb0a47f8 (diff)
[MTD] [NAND] Remove debugging cruft from CAFÉ NAND driver.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/cafe.c41
1 files changed, 4 insertions, 37 deletions
diff --git a/drivers/mtd/nand/cafe.c b/drivers/mtd/nand/cafe.c
index 3346aab275c7..e1ee62a17fe0 100644
--- a/drivers/mtd/nand/cafe.c
+++ b/drivers/mtd/nand/cafe.c
@@ -618,7 +618,7 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
618 dev_warn(&pdev->dev, "Could not register IRQ %d\n", pdev->irq); 618 dev_warn(&pdev->dev, "Could not register IRQ %d\n", pdev->irq);
619 goto out_free_dma; 619 goto out_free_dma;
620 } 620 }
621#if 1 621
622 /* Disable master reset, enable NAND clock */ 622 /* Disable master reset, enable NAND clock */
623 ctrl = cafe_readl(cafe, GLOBAL_CTRL); 623 ctrl = cafe_readl(cafe, GLOBAL_CTRL);
624 ctrl &= 0xffffeff0; 624 ctrl &= 0xffffeff0;
@@ -645,32 +645,8 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
645 cafe_writel(cafe, 0x80000007, GLOBAL_IRQ_MASK); 645 cafe_writel(cafe, 0x80000007, GLOBAL_IRQ_MASK);
646 cafe_dev_dbg(&cafe->pdev->dev, "Control %x, IRQ mask %x\n", 646 cafe_dev_dbg(&cafe->pdev->dev, "Control %x, IRQ mask %x\n",
647 cafe_readl(cafe, GLOBAL_CTRL), cafe_readl(cafe, GLOBAL_IRQ_MASK)); 647 cafe_readl(cafe, GLOBAL_CTRL), cafe_readl(cafe, GLOBAL_IRQ_MASK));
648#endif 648
649#if 1 649 /* Scan to find existence of the device */
650 mtd->writesize=2048;
651 mtd->oobsize = 0x40;
652 memset(cafe->dmabuf, 0x5a, 2112);
653 cafe->nand.cmdfunc(mtd, NAND_CMD_READID, 0, -1);
654 cafe->nand.read_byte(mtd);
655 cafe->nand.read_byte(mtd);
656 cafe->nand.read_byte(mtd);
657 cafe->nand.read_byte(mtd);
658 cafe->nand.read_byte(mtd);
659#endif
660#if 0
661 cafe->nand.cmdfunc(mtd, NAND_CMD_READ0, 0, 0);
662 // nand_wait_ready(mtd);
663 cafe->nand.read_byte(mtd);
664 cafe->nand.read_byte(mtd);
665 cafe->nand.read_byte(mtd);
666 cafe->nand.read_byte(mtd);
667#endif
668#if 0
669 writel(0x84600070, cafe->mmio);
670 udelay(10);
671 cafe_dev_dbg(&cafe->pdev->dev, "Status %x\n", cafe_readl(cafe, NAND_NONMEM));
672#endif
673 /* Scan to find existance of the device */
674 if (nand_scan_ident(mtd, 1)) { 650 if (nand_scan_ident(mtd, 1)) {
675 err = -ENXIO; 651 err = -ENXIO;
676 goto out_irq; 652 goto out_irq;
@@ -774,13 +750,4 @@ module_exit(cafe_nand_exit);
774 750
775MODULE_LICENSE("GPL"); 751MODULE_LICENSE("GPL");
776MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>"); 752MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
777MODULE_DESCRIPTION("NAND flash driver for OLPC CAFE chip"); 753MODULE_DESCRIPTION("NAND flash driver for OLPC CAFÉ chip");
778
779/* Correct ECC for 2048 bytes of 0xff:
780 41 a0 71 65 54 27 f3 93 ec a9 be ed 0b a1 */
781
782/* dwmw2's B-test board, in case of completely screwing it:
783Bad eraseblock 2394 at 0x12b40000
784Bad eraseblock 2627 at 0x14860000
785Bad eraseblock 3349 at 0x1a2a0000
786*/