summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nand_spl/nand_boot.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nand_spl/nand_boot.c b/nand_spl/nand_boot.c
index 76b8566fb2a..4a968784e75 100644
--- a/nand_spl/nand_boot.c
+++ b/nand_spl/nand_boot.c
@@ -90,6 +90,10 @@ static int nand_command(struct mtd_info *mtd, int block, int page, int offs, u8
cmd = NAND_CMD_READ0;
}
+ /* Shift the offset from byte addressing to word addressing. */
+ if (this->options & NAND_BUSWIDTH_16)
+ offs >>= 1;
+
/* Begin command latch cycle */
this->cmd_ctrl(mtd, cmd, NAND_CTRL_CLE | NAND_CTRL_CHANGE);
/* Set ALE and clear CLE to start address cycle */