mtd: pxa3xx_nand: Fix PIO data transfer
authorDavid Hunter <hunterd42@gmail.com>
Tue, 24 Nov 2009 05:02:35 +0000 (21:02 -0800)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 30 Nov 2009 11:42:04 +0000 (11:42 +0000)
The shift operator used here to convert from bytes to 32-bit words is
backwards.

Signed-off-by: David Hunter <hunterd42@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/pxa3xx_nand.c

index 6ea520ae2410a9113690641670d488321ac3da23..75aa8713abd1f15b8b375b7b11ef8a90da0b928f 100644 (file)
@@ -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__,