#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"
*/
int spi_flash_probe_slave(struct spi_slave *spi, struct spi_flash *flash)
{
- u8 idcode[5];
int ret;
/* Setup spi_slave */
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;