Skip to content

Commit

Permalink
mtd: eLBC NAND: give more verbose output on error
Browse files Browse the repository at this point in the history
We want error information even if the kernel hasn't been built for verbose
debugging.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Scott Wood authored and David Woodhouse committed Nov 30, 2009
1 parent 476459a commit c1317f7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions drivers/mtd/nand/fsl_elbc_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,15 @@ static int fsl_elbc_run_command(struct mtd_info *mtd)

ctrl->use_mdr = 0;

dev_vdbg(ctrl->dev,
"fsl_elbc_run_command: stat=%08x mdr=%08x fmr=%08x\n",
ctrl->status, ctrl->mdr, in_be32(&lbc->fmr));
if (ctrl->status != LTESR_CC) {
dev_info(ctrl->dev,
"command failed: fir %x fcr %x status %x mdr %x\n",
in_be32(&lbc->fir), in_be32(&lbc->fcr),
ctrl->status, ctrl->mdr);
return -EIO;
}

/* returns 0 on success otherwise non-zero) */
return ctrl->status == LTESR_CC ? 0 : -EIO;
return 0;
}

static void fsl_elbc_do_read(struct nand_chip *chip, int oob)
Expand Down

0 comments on commit c1317f7

Please sign in to comment.