diff options
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/bf5xx_nand.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/mtd/nand/bf5xx_nand.c b/drivers/mtd/nand/bf5xx_nand.c index 2ab42d2d4f91..8506e7e606fd 100644 --- a/drivers/mtd/nand/bf5xx_nand.c +++ b/drivers/mtd/nand/bf5xx_nand.c | |||
@@ -496,11 +496,20 @@ static void bf5xx_nand_dma_rw(struct mtd_info *mtd, | |||
496 | /* setup DMA register with Blackfin DMA API */ | 496 | /* setup DMA register with Blackfin DMA API */ |
497 | set_dma_config(CH_NFC, 0x0); | 497 | set_dma_config(CH_NFC, 0x0); |
498 | set_dma_start_addr(CH_NFC, (unsigned long) buf); | 498 | set_dma_start_addr(CH_NFC, (unsigned long) buf); |
499 | |||
500 | /* The DMAs have different size on BF52x and BF54x */ | ||
501 | #ifdef CONFIG_BF52x | ||
502 | set_dma_x_count(CH_NFC, (page_size >> 1)); | ||
503 | set_dma_x_modify(CH_NFC, 2); | ||
504 | val = DI_EN | WDSIZE_16; | ||
505 | #endif | ||
506 | |||
507 | #ifdef CONFIG_BF54x | ||
499 | set_dma_x_count(CH_NFC, (page_size >> 2)); | 508 | set_dma_x_count(CH_NFC, (page_size >> 2)); |
500 | set_dma_x_modify(CH_NFC, 4); | 509 | set_dma_x_modify(CH_NFC, 4); |
501 | |||
502 | /* setup write or read operation */ | ||
503 | val = DI_EN | WDSIZE_32; | 510 | val = DI_EN | WDSIZE_32; |
511 | #endif | ||
512 | /* setup write or read operation */ | ||
504 | if (is_read) | 513 | if (is_read) |
505 | val |= WNR; | 514 | val |= WNR; |
506 | set_dma_config(CH_NFC, val); | 515 | set_dma_config(CH_NFC, val); |