Included the SPI header to resolve the no previous prototypes
for function. Removed unused mode variable.
sparse warnings
warning: no previous prototype for 'spi_get_env_dev'
[-Wmissing-prototypes]
warning: variable 'mode' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Link: https://lore.kernel.org/r/20240905115758.999936-1-prasad.kummari@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
#include <env_internal.h>
#include <log.h>
#include <malloc.h>
+#include <spi.h>
#include <time.h>
#include <asm/cache.h>
#include <asm/global_data.h>
int spi_get_env_dev(void)
{
struct udevice *dev;
- const char *mode = NULL;
int bootseq = -1;
switch (versal_net_get_bootmode()) {
debug("QSPI driver for QSPI device is not present\n");
break;
}
- mode = "xspi";
bootseq = dev_seq(dev);
break;
case QSPI_MODE_32BIT:
debug("QSPI driver for QSPI device is not present\n");
break;
}
- mode = "xspi";
bootseq = dev_seq(dev);
break;
case OSPI_MODE:
debug("OSPI driver for OSPI device is not present\n");
break;
}
- mode = "xspi";
bootseq = dev_seq(dev);
break;
default: