diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-03-01 20:54:22 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-03-01 20:54:22 +0000 |
commit | 857e9cb076a480108ea312ca00eaaac1d6fffb4d (patch) | |
tree | 14a9338fefd5d12f78cbe0586fc8d8238d43cca4 /src/flash | |
parent | 630af1be56282870fabf57ad174339de7bcc208a (diff) | |
download | openocd+libswd-857e9cb076a480108ea312ca00eaaac1d6fffb4d.tar.gz openocd+libswd-857e9cb076a480108ea312ca00eaaac1d6fffb4d.tar.bz2 openocd+libswd-857e9cb076a480108ea312ca00eaaac1d6fffb4d.tar.xz openocd+libswd-857e9cb076a480108ea312ca00eaaac1d6fffb4d.zip |
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
Diffstat (limited to 'src/flash')
-rw-r--r-- | src/flash/nand.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/flash/nand.c b/src/flash/nand.c index 2344ede7..c42291ba 100644 --- a/src/flash/nand.c +++ b/src/flash/nand.c @@ -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); |