Skip to contentSkip to conversation

pxa3xx_nand: Fix PIO data transfer

PATCH New David Hunter 1 participant 1 message Nov 24, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pxa3xx_nand: Fix PIO data transfer

The shift operator used here to convert from bytes to 32-bit words is backwards.

---
 drivers/mtd/nand/pxa3xx_nand.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/nand/pxa3xx_nand.c +2 -2
index 6ea520a..75aa871 100644
@@ -489,7 +489,7 @@ static int handle_data_pio(struct pxa3xx_nand_info *info)
 	switch (info->state) {
 	case STATE_PIO_WRITING:
 		__raw_writesl(info->mmio_base + NDDB, info->data_buff,
-				info->data_size << 2);
+				info->data_size >> 2);
 
 		enable_int(info, NDSR_CS0_BBD | NDSR_CS0_CMDD);
 
@@ -501,7 +501,7 @@ static int handle_data_pio(struct pxa3xx_nand_info *info)
 		break;
 	case STATE_PIO_READING:
 		__raw_readsl(info->mmio_base + NDDB, info->data_buff,
-				info->data_size << 2);
+				info->data_size >> 2);
 		break;
 	default:
 		printk(KERN_ERR "%s: invalid state %d\n", __func__,
Signature · 1 line
1.6.0.4