]> git.sur5r.net Git - openocd/commitdiff
Nicolas Pitre nico at cam.org The code unconditionally writes into the oob area all...
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 1 Mar 2009 20:54:22 +0000 (20:54 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 1 Mar 2009 20:54:22 +0000 (20:54 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1385 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/flash/nand.c

index 2344ede7b9925e21929087d7d1d5a1d524702544..c42291ba000c5e897bb0cb3b8e2fc39c8b046d6c 100644 (file)
@@ -911,7 +911,10 @@ int nand_write_page_raw(struct nand_device_s *device, u32 page, u8 *data, u32 da
                 * 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);