diff options
Diffstat (limited to 'drivers/mtd/nand/bf5xx_nand.c')
-rw-r--r-- | drivers/mtd/nand/bf5xx_nand.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/mtd/nand/bf5xx_nand.c b/drivers/mtd/nand/bf5xx_nand.c index 9af2a2cc1153..4c2a67ca801e 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, | |||
552 | static int bf5xx_nand_dma_init(struct bf5xx_nand_info *info) | 552 | static 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,7 +566,13 @@ static int bf5xx_nand_dma_init(struct bf5xx_nand_info *info) | |||
574 | return ret; | 566 | return ret; |
575 | } | 567 | } |
576 | 568 | ||
577 | set_dma_callback(CH_NFC, (void *) bf5xx_nand_dma_irq, (void *) info); | 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 | |||
575 | set_dma_callback(CH_NFC, bf5xx_nand_dma_irq, info); | ||
578 | 576 | ||
579 | /* Turn off the DMA channel first */ | 577 | /* Turn off the DMA channel first */ |
580 | disable_dma(CH_NFC); | 578 | disable_dma(CH_NFC); |
@@ -632,7 +630,7 @@ static int bf5xx_nand_hw_init(struct bf5xx_nand_info *info) | |||
632 | /* | 630 | /* |
633 | * Device management interface | 631 | * Device management interface |
634 | */ | 632 | */ |
635 | static int bf5xx_nand_add_partition(struct bf5xx_nand_info *info) | 633 | static int __devinit bf5xx_nand_add_partition(struct bf5xx_nand_info *info) |
636 | { | 634 | { |
637 | struct mtd_info *mtd = &info->mtd; | 635 | struct mtd_info *mtd = &info->mtd; |
638 | 636 | ||