summaryrefslogtreecommitdiff
path: root/src/flash/nand/core.h
diff options
context:
space:
mode:
authorDean Glazeski <dnglaze@gmail.com>2009-12-17 21:02:40 -0600
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-12-18 01:33:19 -0800
commitef4fbd36d491b1c89cb13d43f6c03e26fd0d8a7d (patch)
treeb6f554e133e2544b4b3577cab67476c34c9a8d62 /src/flash/nand/core.h
parentb8b4bb0745b63e03eec745ce0eb97bfa6e0792a1 (diff)
downloadopenocd+libswd-ef4fbd36d491b1c89cb13d43f6c03e26fd0d8a7d.tar.gz
openocd+libswd-ef4fbd36d491b1c89cb13d43f6c03e26fd0d8a7d.tar.bz2
openocd+libswd-ef4fbd36d491b1c89cb13d43f6c03e26fd0d8a7d.tar.xz
openocd+libswd-ef4fbd36d491b1c89cb13d43f6c03e26fd0d8a7d.zip
NAND write data page refactoring.
Refactored the write page raw function into two new functions for writing data to a NAND device and then another function to finish up a write to a NAND device. This includes some new updates to introduce more error checking to existing code. [dbrownell@users.sourceforge.net: fix fault handling, whitespace] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/flash/nand/core.h')
-rw-r--r--src/flash/nand/core.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/flash/nand/core.h b/src/flash/nand/core.h
index 990114ad..d2d15715 100644
--- a/src/flash/nand/core.h
+++ b/src/flash/nand/core.h
@@ -212,6 +212,10 @@ int nand_page_command(struct nand_device *nand, uint32_t page,
uint8_t cmd, bool oob_only);
int nand_read_data_page(struct nand_device *nand, uint8_t *data, uint32_t size);
+int nand_write_data_page(struct nand_device *nand,
+ uint8_t *data, uint32_t size);
+
+int nand_write_finish(struct nand_device *nand);
int nand_read_page_raw(struct nand_device *nand, uint32_t page,
uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size);