diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-04-23 23:05:55 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-07-26 16:28:21 +0200 |
commit | 2744a4e688851fc3b5e2937bf047100c85daeb43 (patch) | |
tree | 23b2d7598a0601ed7097883cc71a14b58d9bb1ae /drivers/mtd/spi/spi_flash_internal.h | |
parent | d8e392d95f20cb21767b99d92a9a7f852b0fec63 (diff) | |
download | u-boot-imx-2744a4e688851fc3b5e2937bf047100c85daeb43.zip u-boot-imx-2744a4e688851fc3b5e2937bf047100c85daeb43.tar.gz u-boot-imx-2744a4e688851fc3b5e2937bf047100c85daeb43.tar.bz2 |
sf: unify write enable commands
Every spi flash uses the same write enable command, so unify this in
the common code.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'drivers/mtd/spi/spi_flash_internal.h')
-rw-r--r-- | drivers/mtd/spi/spi_flash_internal.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mtd/spi/spi_flash_internal.h b/drivers/mtd/spi/spi_flash_internal.h index fc109ce..6665bed 100644 --- a/drivers/mtd/spi/spi_flash_internal.h +++ b/drivers/mtd/spi/spi_flash_internal.h @@ -46,6 +46,14 @@ int spi_flash_cmd_write(struct spi_slave *spi, const u8 *cmd, size_t cmd_len, const void *data, size_t data_len); /* + * Enable writing on the SPI flash. + */ +static inline int spi_flash_cmd_write_enable(struct spi_flash *flash) +{ + return spi_flash_cmd(flash->spi, CMD_WRITE_ENABLE, NULL, 0); +} + +/* * Same as spi_flash_cmd_read() except it also claims/releases the SPI * bus. Used as common part of the ->read() operation. */ |