@@ -616,6 +616,7 @@ static irqreturn_t pxa3xx_nand_irq(int irq, void *devid)
if (status & ready) {
info->state = STATE_READY;
is_ready = 1;
+ pr_debug("Status: ready\n");
}
if (status & NDSR_WRCMDREQ) {
@@ -631,6 +632,11 @@ static irqreturn_t pxa3xx_nand_irq(int irq, void *devid)
* Direct write access to NDCB1, NDCB2 and NDCB3 is ignored
* but each NDCBx register can be read.
*/
+ pr_debug("Command0 0x%x\n", info->ndcb0);
+ pr_debug("Command1 0x%x\n", info->ndcb1);
+ pr_debug("Command2 0x%x\n", info->ndcb2);
+ pr_debug("Command3 0x%x\n", info->ndcb3);
+
nand_writel(info, NDCB0, info->ndcb0);
nand_writel(info, NDCB0, info->ndcb1);
nand_writel(info, NDCB0, info->ndcb2);
@@ -1154,6 +1160,7 @@ static int pxa3xx_nand_waitfunc(struct mtd_info *mtd, struct nand_chip *this)
int ret;
if (info->need_wait) {
+ pr_debug("Waiting for device to be ready\n");
ret = wait_for_completion_timeout(&info->dev_ready,
CHIP_DELAY_TIMEOUT);
info->need_wait = 0;
@@ -1161,6 +1168,7 @@ static int pxa3xx_nand_waitfunc(struct mtd_info *mtd, struct nand_chip *this)
dev_err(&info->pdev->dev, "Ready time out!!!\n");
return NAND_STATUS_FAIL;
}
+ pr_debug("Device is ready\n");
}
/* pxa3xx_nand_send_command has waited for command complete */
@@ -1468,6 +1476,10 @@ KEEP_CONFIG:
if (nand_scan_ident(mtd, 1, def))
return -ENODEV;
+ pr_info("Control register dump 0x%x\n", info->reg_ndcr);
+ pr_info("Timing 0 register dump 0x%x\n", info->ndtr0cs0);
+ pr_info("Timing 1 register dump 0x%x\n", info->ndtr1cs0);
+
if (pdata->flash_bbt) {
/*
* We'll use a bad block table stored in-flash and don't