diff options
-rw-r--r-- | drivers/mtd/nand/sh_flctl.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c index 93b1f74321c2..9291066419e1 100644 --- a/drivers/mtd/nand/sh_flctl.c +++ b/drivers/mtd/nand/sh_flctl.c | |||
@@ -525,7 +525,6 @@ static void flctl_cmdfunc(struct mtd_info *mtd, unsigned int command, | |||
525 | execmd_read_page_sector(mtd, page_addr); | 525 | execmd_read_page_sector(mtd, page_addr); |
526 | break; | 526 | break; |
527 | } | 527 | } |
528 | empty_fifo(flctl); | ||
529 | if (flctl->page_size) | 528 | if (flctl->page_size) |
530 | set_cmd_regs(mtd, command, (NAND_CMD_READSTART << 8) | 529 | set_cmd_regs(mtd, command, (NAND_CMD_READSTART << 8) |
531 | | command); | 530 | | command); |
@@ -547,7 +546,6 @@ static void flctl_cmdfunc(struct mtd_info *mtd, unsigned int command, | |||
547 | break; | 546 | break; |
548 | } | 547 | } |
549 | 548 | ||
550 | empty_fifo(flctl); | ||
551 | if (flctl->page_size) { | 549 | if (flctl->page_size) { |
552 | set_cmd_regs(mtd, command, (NAND_CMD_READSTART << 8) | 550 | set_cmd_regs(mtd, command, (NAND_CMD_READSTART << 8) |
553 | | NAND_CMD_READ0); | 551 | | NAND_CMD_READ0); |
@@ -560,12 +558,12 @@ static void flctl_cmdfunc(struct mtd_info *mtd, unsigned int command, | |||
560 | goto read_normal_exit; | 558 | goto read_normal_exit; |
561 | 559 | ||
562 | case NAND_CMD_READID: | 560 | case NAND_CMD_READID: |
563 | empty_fifo(flctl); | ||
564 | set_cmd_regs(mtd, command, command); | 561 | set_cmd_regs(mtd, command, command); |
565 | set_addr(mtd, 0, 0); | 562 | set_addr(mtd, 0, 0); |
566 | 563 | ||
567 | flctl->read_bytes = 4; | 564 | flctl->read_bytes = 4; |
568 | writel(flctl->read_bytes, FLDTCNTR(flctl)); /* set read size */ | 565 | writel(flctl->read_bytes, FLDTCNTR(flctl)); /* set read size */ |
566 | empty_fifo(flctl); | ||
569 | start_translation(flctl); | 567 | start_translation(flctl); |
570 | read_datareg(flctl, 0); /* read and end */ | 568 | read_datareg(flctl, 0); /* read and end */ |
571 | break; | 569 | break; |
@@ -654,6 +652,7 @@ static void flctl_cmdfunc(struct mtd_info *mtd, unsigned int command, | |||
654 | 652 | ||
655 | read_normal_exit: | 653 | read_normal_exit: |
656 | writel(flctl->read_bytes, FLDTCNTR(flctl)); /* set read size */ | 654 | writel(flctl->read_bytes, FLDTCNTR(flctl)); /* set read size */ |
655 | empty_fifo(flctl); | ||
657 | start_translation(flctl); | 656 | start_translation(flctl); |
658 | read_fiforeg(flctl, flctl->read_bytes, 0); | 657 | read_fiforeg(flctl, flctl->read_bytes, 0); |
659 | wait_completion(flctl); | 658 | wait_completion(flctl); |