summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/spi_flash_internal.h
diff options
context:
space:
mode:
authorJagannadha Sutradharudu Teki <jagannadha.sutradharudu-teki@xilinx.com>2013-06-21 19:19:00 +0530
committerJagannadha Sutradharudu Teki <jaganna@xilinx.com>2013-06-23 22:10:35 +0530
commitacc237544a0a6b5ebfd41fccf12a7731db209959 (patch)
tree686f283868019c72d1a1f3fdd5d34d7d3c8f8f2e /drivers/mtd/spi/spi_flash_internal.h
parent615a1561673a9a1b863f905d40f084f36edb9022 (diff)
sf: Unify spi_flash write code
Move common flash write code into spi_flash_write_common(). Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mtd/spi/spi_flash_internal.h')
-rw-r--r--drivers/mtd/spi/spi_flash_internal.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/mtd/spi/spi_flash_internal.h b/drivers/mtd/spi/spi_flash_internal.h
index 8147f27c1e..be3c768c34 100644
--- a/drivers/mtd/spi/spi_flash_internal.h
+++ b/drivers/mtd/spi/spi_flash_internal.h
@@ -108,6 +108,16 @@ int spi_flash_bank_config(struct spi_flash *flash, u8 idcode0);
*/
int spi_flash_read_common(struct spi_flash *flash, const u8 *cmd,
size_t cmd_len, void *data, size_t data_len);
+/*
+ * Used for spi_flash write operation
+ * - SPI claim
+ * - spi_flash_cmd_write_enable
+ * - spi_flash_cmd_write
+ * - spi_flash_cmd_wait_ready
+ * - SPI release
+ */
+int spi_flash_write_common(struct spi_flash *flash, const u8 *cmd,
+ size_t cmd_len, const void *buf, size_t buf_len);
/*
* Send the read status command to the device and wait for the wip