Skip to content

Commit

Permalink
[MTD] NAND: ndfc fix address offset thinko
Browse files Browse the repository at this point in the history
The rework of the command handling in the nand driver
led to wrong address setting in the command control
function. Use the correct address again.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Thomas Gleixner committed Jun 22, 2006
1 parent 99974c6 commit 1794c13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/mtd/nand/ndfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ static void ndfc_select_chip(struct mtd_info *mtd, int chip)

static void ndfc_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
{
struct nand_chip *chip = mtd->priv;
struct ndfc_controller *ndfc = &ndfc_ctrl;

if (cmd == NAND_CMD_NONE)
return;

if (ctrl & NAND_CLE)
writel(cmd & 0xFF, chip->IO_ADDR_W + NDFC_CMD);
writel(cmd & 0xFF, ndfc->ndfcbase + NDFC_CMD);
else
writel(cmd & 0xFF, chip->IO_ADDR_W + NDFC_ALE);
writel(cmd & 0xFF, ndfc->ndfcbase + NDFC_ALE);
}

static int ndfc_ready(struct mtd_info *mtd)
Expand Down

0 comments on commit 1794c13

Please sign in to comment.