aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/nand/bf5xx_nand.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/mtd/nand/bf5xx_nand.c b/drivers/mtd/nand/bf5xx_nand.c
index 9af2a2cc1153..5c6056e02426 100644
--- a/drivers/mtd/nand/bf5xx_nand.c
+++ b/drivers/mtd/nand/bf5xx_nand.c
@@ -552,7 +552,6 @@ static void bf5xx_nand_dma_write_buf(struct mtd_info *mtd,
552static int bf5xx_nand_dma_init(struct bf5xx_nand_info *info) 552static int bf5xx_nand_dma_init(struct bf5xx_nand_info *info)
553{ 553{
554 int ret; 554 int ret;
555 unsigned short val;
556 555
557 /* Do not use dma */ 556 /* Do not use dma */
558 if (!hardware_ecc) 557 if (!hardware_ecc)
@@ -560,13 +559,6 @@ static int bf5xx_nand_dma_init(struct bf5xx_nand_info *info)
560 559
561 init_completion(&info->dma_completion); 560 init_completion(&info->dma_completion);
562 561
563#ifdef CONFIG_BF54x
564 /* Setup DMAC1 channel mux for NFC which shared with SDH */
565 val = bfin_read_DMAC1_PERIMUX();
566 val &= 0xFFFE;
567 bfin_write_DMAC1_PERIMUX(val);
568 SSYNC();
569#endif
570 /* Request NFC DMA channel */ 562 /* Request NFC DMA channel */
571 ret = request_dma(CH_NFC, "BF5XX NFC driver"); 563 ret = request_dma(CH_NFC, "BF5XX NFC driver");
572 if (ret < 0) { 564 if (ret < 0) {
@@ -574,6 +566,12 @@ static int bf5xx_nand_dma_init(struct bf5xx_nand_info *info)
574 return ret; 566 return ret;
575 } 567 }
576 568
569#ifdef CONFIG_BF54x
570 /* Setup DMAC1 channel mux for NFC which shared with SDH */
571 bfin_write_DMAC1_PERIMUX(bfin_read_DMAC1_PERIMUX() & ~1);
572 SSYNC();
573#endif
574
577 set_dma_callback(CH_NFC, (void *) bf5xx_nand_dma_irq, (void *) info); 575 set_dma_callback(CH_NFC, (void *) bf5xx_nand_dma_irq, (void *) info);
578 576
579 /* Turn off the DMA channel first */ 577 /* Turn off the DMA channel first */