diff options
Diffstat (limited to 'drivers/mtd/nand/atmel_nand.c')
-rw-r--r-- | drivers/mtd/nand/atmel_nand.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index c36e9b84487c..1955389c8fa6 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c | |||
@@ -1659,8 +1659,8 @@ static void nfc_select_chip(struct mtd_info *mtd, int chip) | |||
1659 | nfc_writel(host->nfc->hsmc_regs, CTRL, NFC_CTRL_ENABLE); | 1659 | nfc_writel(host->nfc->hsmc_regs, CTRL, NFC_CTRL_ENABLE); |
1660 | } | 1660 | } |
1661 | 1661 | ||
1662 | static int nfc_make_addr(struct mtd_info *mtd, int column, int page_addr, | 1662 | static int nfc_make_addr(struct mtd_info *mtd, int command, int column, |
1663 | unsigned int *addr1234, unsigned int *cycle0) | 1663 | int page_addr, unsigned int *addr1234, unsigned int *cycle0) |
1664 | { | 1664 | { |
1665 | struct nand_chip *chip = mtd->priv; | 1665 | struct nand_chip *chip = mtd->priv; |
1666 | 1666 | ||
@@ -1674,7 +1674,8 @@ static int nfc_make_addr(struct mtd_info *mtd, int column, int page_addr, | |||
1674 | *addr1234 = 0; | 1674 | *addr1234 = 0; |
1675 | 1675 | ||
1676 | if (column != -1) { | 1676 | if (column != -1) { |
1677 | if (chip->options & NAND_BUSWIDTH_16) | 1677 | if (chip->options & NAND_BUSWIDTH_16 && |
1678 | !nand_opcode_8bits(command)) | ||
1678 | column >>= 1; | 1679 | column >>= 1; |
1679 | addr_bytes[acycle++] = column & 0xff; | 1680 | addr_bytes[acycle++] = column & 0xff; |
1680 | if (mtd->writesize > 512) | 1681 | if (mtd->writesize > 512) |
@@ -1787,8 +1788,8 @@ static void nfc_nand_command(struct mtd_info *mtd, unsigned int command, | |||
1787 | } | 1788 | } |
1788 | 1789 | ||
1789 | if (do_addr) | 1790 | if (do_addr) |
1790 | acycle = nfc_make_addr(mtd, column, page_addr, &addr1234, | 1791 | acycle = nfc_make_addr(mtd, command, column, page_addr, |
1791 | &cycle0); | 1792 | &addr1234, &cycle0); |
1792 | 1793 | ||
1793 | nfc_addr_cmd = cmd1 | cmd2 | vcmd2 | acycle | csid | dataen | nfcwr; | 1794 | nfc_addr_cmd = cmd1 | cmd2 | vcmd2 | acycle | csid | dataen | nfcwr; |
1794 | nfc_send_command(host, nfc_addr_cmd, addr1234, cycle0); | 1795 | nfc_send_command(host, nfc_addr_cmd, addr1234, cycle0); |