Title: [6057] trunk/drivers/mtd/nand/bf5xx_nand.c: bug[4833]The DMAs have different size on BF52x and BF54x
Revision
6057
Author
cliff
Date
2009-02-04 04:31:15 -0600 (Wed, 04 Feb 2009)

Log Message

bug[4833]The DMAs have different size on BF52x and BF54x

Modified Paths

Diff

Modified: trunk/drivers/mtd/nand/bf5xx_nand.c (6056 => 6057)


--- trunk/drivers/mtd/nand/bf5xx_nand.c	2009-02-04 10:21:43 UTC (rev 6056)
+++ trunk/drivers/mtd/nand/bf5xx_nand.c	2009-02-04 10:31:15 UTC (rev 6057)
@@ -496,11 +496,20 @@
 	/* setup DMA register with Blackfin DMA API */
 	set_dma_config(CH_NFC, 0x0);
 	set_dma_start_addr(CH_NFC, (unsigned long) buf);
+
+/* The DMAs have different size on BF52x and BF54x */
+#ifdef CONFIG_BF52x
+	set_dma_x_count(CH_NFC, (page_size >> 1));
+	set_dma_x_modify(CH_NFC, 2);
+	val = DI_EN | WDSIZE_16;
+#endif
+
+#ifdef CONFIG_BF54x
 	set_dma_x_count(CH_NFC, (page_size >> 2));
 	set_dma_x_modify(CH_NFC, 4);
-
+	val = DI_EN | WDSIZE_32;
+#endif
 	/* setup write or read operation */
-	val = DI_EN | WDSIZE_32;
 	if (is_read)
 		val |= WNR;
 	set_dma_config(CH_NFC, val);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to