]> git.sur5r.net Git - openocd/commitdiff
David Anders: fixes an issue with large block nand flash address where the beginning...
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Fri, 27 Jun 2008 06:13:34 +0000 (06:13 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Fri, 27 Jun 2008 06:13:34 +0000 (06:13 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@729 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/flash/nand.c

index 5cfc27662699ebbfe7d1228c1b9f1e022f889dc4..3e63335fcf4da594a66efa2d2aa115d7b16aa15c 100644 (file)
@@ -806,7 +806,10 @@ int nand_read_page_raw(struct nand_device_s *device, u32 page, u8 *data, u32 dat
                 * or 2048 for the beginning of OOB area)
                 */
                device->controller->address(device, 0x0);
-               device->controller->address(device, 0x8);
+               if (data)
+                       device->controller->address(device, 0x0);
+               else
+                       device->controller->address(device, 0x8);
                
                /* row */
                device->controller->address(device, page & 0xff);