From acc237544a0a6b5ebfd41fccf12a7731db209959 Mon Sep 17 00:00:00 2001 From: Jagannadha Sutradharudu Teki Date: Fri, 21 Jun 2013 19:19:00 +0530 Subject: sf: Unify spi_flash write code Move common flash write code into spi_flash_write_common(). Signed-off-by: Jagannadha Sutradharudu Teki Acked-by: Simon Glass --- drivers/mtd/spi/spi_flash_internal.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/mtd/spi/spi_flash_internal.h') diff --git a/drivers/mtd/spi/spi_flash_internal.h b/drivers/mtd/spi/spi_flash_internal.h index 8147f27c1e4..be3c768c347 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 -- cgit v1.2.3