sf: Remove unneeded header includes
[platform/kernel/u-boot.git] / drivers / mtd / spi / sf_probe.c
index 994559d..f8aad56 100644 (file)
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
-#include <fdtdec.h>
 #include <malloc.h>
-#include <mapmem.h>
 #include <spi.h>
 #include <spi_flash.h>
-#include <asm/io.h>
 
 #include "sf_internal.h"
 
@@ -29,7 +26,6 @@
  */
 int spi_flash_probe_slave(struct spi_slave *spi, struct spi_flash *flash)
 {
-       u8 idcode[5];
        int ret;
 
        /* Setup spi_slave */
@@ -45,19 +41,7 @@ int spi_flash_probe_slave(struct spi_slave *spi, struct spi_flash *flash)
                return ret;
        }
 
-       /* Read the ID codes */
-       ret = spi_flash_cmd(spi, CMD_READ_ID, idcode, sizeof(idcode));
-       if (ret) {
-               printf("SF: Failed to get idcodes\n");
-               goto err_read_id;
-       }
-
-#ifdef DEBUG
-       printf("SF: Got idcodes\n");
-       print_buffer(0, idcode, 1, sizeof(idcode), 0);
-#endif
-
-       ret = spi_flash_scan(spi, idcode, flash);
+       ret = spi_flash_scan(spi, flash);
        if (ret) {
                ret = -EINVAL;
                goto err_read_id;