]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
sf: Remove spi_flash_cmd_poll_bit()
authorJagannadha Sutradharudu Teki <jaganna@xilinx.com>
Wed, 15 May 2013 16:47:20 +0000 (22:17 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 27 May 2013 11:21:19 +0000 (13:21 +0200)
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>
drivers/mtd/spi/spi_flash.c
drivers/mtd/spi/spi_flash_internal.h

index 2c62b54aa9200fcb8b0bf79ff6fb8cfa9d5f95d6..99e9f8e3cd251bab5d3f01b1325d41dfd6b6a02a 100644 (file)
@@ -232,12 +232,13 @@ 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)
 {
        unsigned long timebase;
        int ret;
        u8 status;
+       u8 poll_bit = STATUS_WIP;
+       u8 cmd = CMD_READ_STATUS;
 
        timebase = get_timer(0);
        do {
@@ -262,12 +263,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 start, end, erase_size;
index 2a5e74cefc7f5ecf88b3eabcf06efeb46e62d21d..021d00976a7c51c66cc3bf443047c46b15e5df2a 100644 (file)
@@ -101,10 +101,6 @@ int spi_flash_cmd_bankaddr_read(struct spi_flash *flash,
 int spi_flash_read_common(struct spi_flash *flash, const u8 *cmd,
                size_t cmd_len, void *data, size_t data_len);
 
-/* Send a command to the device and wait for some bit to clear itself. */
-int spi_flash_cmd_poll_bit(struct spi_flash *flash, unsigned long timeout,
-                          u8 cmd, u8 poll_bit);
-
 /*
  * Send the read status command to the device and wait for the wip
  * (write-in-progress) bit to clear itself.