diff options
Diffstat (limited to 'drivers/mtd/nand/diskonchip.c')
-rw-r--r-- | drivers/mtd/nand/diskonchip.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c index e4bb6b429f87..2ec9080e2b14 100644 --- a/drivers/mtd/nand/diskonchip.c +++ b/drivers/mtd/nand/diskonchip.c | |||
@@ -717,8 +717,12 @@ static void doc200x_hwcontrol(struct mtd_info *mtd, int cmd, | |||
717 | /* 11.4.3 -- 4 NOPs after CSDNControl write */ | 717 | /* 11.4.3 -- 4 NOPs after CSDNControl write */ |
718 | DoC_Delay(doc, 4); | 718 | DoC_Delay(doc, 4); |
719 | } | 719 | } |
720 | if (cmd != NAND_CMD_NONE) | 720 | if (cmd != NAND_CMD_NONE) { |
721 | this->write_byte(mtd, cmd); | 721 | if (DoC_is_2000(doc)) |
722 | doc2000_write_byte(mtd, cmd); | ||
723 | else | ||
724 | doc2001_write_byte(mtd, cmd); | ||
725 | } | ||
722 | } | 726 | } |
723 | 727 | ||
724 | static void doc2001plus_command(struct mtd_info *mtd, unsigned command, int column, int page_addr) | 728 | static void doc2001plus_command(struct mtd_info *mtd, unsigned command, int column, int page_addr) |
@@ -1435,7 +1439,6 @@ static inline int __init doc2000_init(struct mtd_info *mtd) | |||
1435 | struct nand_chip *this = mtd->priv; | 1439 | struct nand_chip *this = mtd->priv; |
1436 | struct doc_priv *doc = this->priv; | 1440 | struct doc_priv *doc = this->priv; |
1437 | 1441 | ||
1438 | this->write_byte = doc2000_write_byte; | ||
1439 | this->read_byte = doc2000_read_byte; | 1442 | this->read_byte = doc2000_read_byte; |
1440 | this->write_buf = doc2000_writebuf; | 1443 | this->write_buf = doc2000_writebuf; |
1441 | this->read_buf = doc2000_readbuf; | 1444 | this->read_buf = doc2000_readbuf; |
@@ -1453,7 +1456,6 @@ static inline int __init doc2001_init(struct mtd_info *mtd) | |||
1453 | struct nand_chip *this = mtd->priv; | 1456 | struct nand_chip *this = mtd->priv; |
1454 | struct doc_priv *doc = this->priv; | 1457 | struct doc_priv *doc = this->priv; |
1455 | 1458 | ||
1456 | this->write_byte = doc2001_write_byte; | ||
1457 | this->read_byte = doc2001_read_byte; | 1459 | this->read_byte = doc2001_read_byte; |
1458 | this->write_buf = doc2001_writebuf; | 1460 | this->write_buf = doc2001_writebuf; |
1459 | this->read_buf = doc2001_readbuf; | 1461 | this->read_buf = doc2001_readbuf; |
@@ -1485,7 +1487,6 @@ static inline int __init doc2001plus_init(struct mtd_info *mtd) | |||
1485 | struct nand_chip *this = mtd->priv; | 1487 | struct nand_chip *this = mtd->priv; |
1486 | struct doc_priv *doc = this->priv; | 1488 | struct doc_priv *doc = this->priv; |
1487 | 1489 | ||
1488 | this->write_byte = NULL; | ||
1489 | this->read_byte = doc2001plus_read_byte; | 1490 | this->read_byte = doc2001plus_read_byte; |
1490 | this->write_buf = doc2001plus_writebuf; | 1491 | this->write_buf = doc2001plus_writebuf; |
1491 | this->read_buf = doc2001plus_readbuf; | 1492 | this->read_buf = doc2001plus_readbuf; |