Nicolas Pitre nico at cam.org The code unconditionally writes into the oob area all the time.

git-svn-id: svn://svn.berlios.de/openocd/trunk@1385 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
oharboe 2009-03-01 20:54:22 +00:00
parent 630af1be56
commit 857e9cb076
1 changed files with 4 additions and 1 deletions

View 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) * or 2048 for the beginning of OOB area)
*/ */
device->controller->address(device, 0x0); device->controller->address(device, 0x0);
device->controller->address(device, 0x8); if (data)
device->controller->address(device, 0x0);
else
device->controller->address(device, 0x8);
/* row */ /* row */
device->controller->address(device, page & 0xff); device->controller->address(device, page & 0xff);