colibri_t20: add update_uboot wrapper
[oweals/u-boot.git] / cmd / sf.c
index 738ef0e46dc14fde1ae1550b0873a2a818b7abb6..e993b3e5adcda20060057472a15b0085c1f11442 100644 (file)
--- a/cmd/sf.c
+++ b/cmd/sf.c
@@ -18,6 +18,8 @@
 #include <asm/io.h>
 #include <dm/device-internal.h>
 
+#include "legacy-mtd-utils.h"
+
 static struct spi_flash *flash;
 
 /*
@@ -81,14 +83,13 @@ static int do_spi_flash_probe(int argc, char * const argv[])
 {
        unsigned int bus = CONFIG_SF_DEFAULT_BUS;
        unsigned int cs = CONFIG_SF_DEFAULT_CS;
+       /* In DM mode, defaults speed and mode will be taken from DT */
        unsigned int speed = CONFIG_SF_DEFAULT_SPEED;
        unsigned int mode = CONFIG_SF_DEFAULT_MODE;
        char *endp;
 #ifdef CONFIG_DM_SPI_FLASH
        struct udevice *new, *bus_dev;
        int ret;
-       /* In DM mode defaults will be taken from DT */
-       speed = 0, mode = 0;
 #else
        struct spi_flash *new;
 #endif