summaryrefslogtreecommitdiff
path: root/src/flash/nand.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-06-27 06:13:34 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-06-27 06:13:34 +0000
commit83fc7fcf9b3ad4df227d4febae8e0b5f2778019c (patch)
tree41fd8a2129ec69f2ad2ee8e39ae615a9d860679d /src/flash/nand.c
parentc5df3ce144d27babd555da1a3bedded474de7bd0 (diff)
downloadopenocd+libswd-83fc7fcf9b3ad4df227d4febae8e0b5f2778019c.tar.gz
openocd+libswd-83fc7fcf9b3ad4df227d4febae8e0b5f2778019c.tar.bz2
openocd+libswd-83fc7fcf9b3ad4df227d4febae8e0b5f2778019c.tar.xz
openocd+libswd-83fc7fcf9b3ad4df227d4febae8e0b5f2778019c.zip
David Anders: fixes an issue with large block nand flash address where the beginning of the OOB area is always selected instead of the beginning of a page when needed
git-svn-id: svn://svn.berlios.de/openocd/trunk@729 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash/nand.c')
-rw-r--r--src/flash/nand.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/flash/nand.c b/src/flash/nand.c
index 5cfc2766..3e63335f 100644
--- a/src/flash/nand.c
+++ b/src/flash/nand.c
@@ -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);