[PATCH - Omapzoom][NAND] 32-bit read in prefetch for NAND

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changing 16-bit read access to 32-bit to improve the performance in prefetch
support.

Signed-off-by: Vimal Singh <vimalsingh@xxxxxx>
---
 drivers/mtd/nand/omap2.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

Index: omapkernel/drivers/mtd/nand/omap2.c
===================================================================
--- omapkernel.orig/drivers/mtd/nand/omap2.c	2008-11-06 18:33:49.000000000 +0530
+++ omapkernel/drivers/mtd/nand/omap2.c	2008-11-06 18:36:32.000000000 +0530
@@ -375,27 +375,27 @@
 	struct omap_nand_info *info = container_of(mtd,
 						struct omap_nand_info, mtd);
 	uint32_t prefetch_status = 0, read_count = 0;
-	u16 *p = (u16 *)buf;
+	u32 *p = (u32 *)buf;

 	if ((use_dma && len <= mtd->oobsize) || (!use_dma)) {

 		/* take care of subpage reads */
-		if (len % 2 != 0) {
+		for (; len % 4 != 0; ) {
 			*buf++ = __raw_readb(info->nand.IO_ADDR_R);
-			p = (u16 *) buf;
 			len--;
 		}
+		p = (u32 *) buf;

 		/* configure and start prefetch transfer */
 		gpmc_prefetch_start(info->gpmc_cs, 0x0, len, 0x0);

 		do {
 			prefetch_status = gpmc_prefetch_status();
-			read_count = ((prefetch_status >> 24) & 0x7F) >> 1;
-			__raw_readsw(info->nand_pref_fifo_add, p,
+			read_count = ((prefetch_status >> 24) & 0x7F) >> 2;
+			__raw_readsl(info->nand_pref_fifo_add, p,
 							read_count);
 			p += read_count;
-			len -= read_count << 1;
+			len -= read_count << 2;
 		} while (len);

 		/* disable and stop the PFPW engine */


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux