summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/spi_flash.c
diff options
context:
space:
mode:
authorJagannadha Sutradharudu Teki <jaganna@xilinx.com>2013-05-26 23:37:11 +0530
committerJagannadha Sutradharudu Teki <jaganna@xilinx.com>2013-06-23 22:02:51 +0530
commitba549de6c53663e534a20741f9ec917fb6526830 (patch)
tree3ae1a106bed1902c09d3a60abf64defc1408de56 /drivers/mtd/spi/spi_flash.c
parent76e98d48179c60f2fc06ac90d41de060c9d5b42d (diff)
sf: Remove spi_flash_cmd_poll_bit()
There is no other call other than spi_flash_cmd_wait_ready(), hence removed spi_flash_cmd_poll_bit and use the poll status code spi_flash_cmd_wait_ready() itself. Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mtd/spi/spi_flash.c')
-rw-r--r--drivers/mtd/spi/spi_flash.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 0ed2295b6f6..cca02d13bc1 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -194,13 +194,14 @@ int spi_flash_cmd_read_fast(struct spi_flash *flash, u32 offset,
return ret;
}
-int spi_flash_cmd_poll_bit(struct spi_flash *flash, unsigned long timeout,
- u8 cmd, u8 poll_bit)
+int spi_flash_cmd_wait_ready(struct spi_flash *flash, unsigned long timeout)
{
struct spi_slave *spi = flash->spi;
unsigned long timebase;
int ret;
u8 status;
+ u8 poll_bit = STATUS_WIP;
+ u8 cmd = CMD_READ_STATUS;
ret = spi_xfer(spi, 8, &cmd, NULL, SPI_XFER_BEGIN);
if (ret) {
@@ -231,12 +232,6 @@ int spi_flash_cmd_poll_bit(struct spi_flash *flash, unsigned long timeout,
return -1;
}
-int spi_flash_cmd_wait_ready(struct spi_flash *flash, unsigned long timeout)
-{
- return spi_flash_cmd_poll_bit(flash, timeout,
- CMD_READ_STATUS, STATUS_WIP);
-}
-
int spi_flash_cmd_erase(struct spi_flash *flash, u32 offset, size_t len)
{
u32 erase_size;