On Monday 01 October 2018 07:13 PM, Miquel Raynal wrote:
There should not be a 'nand' command, a 'sf' command and certainly not
a new 'spi-nand' command. Write a 'mtd' command instead to manage all
MTD devices/partitions at once. This should be the preferred way to
access any MTD device.

Signed-off-by: Miquel Raynal <miquel.ray...@bootlin.com>
Acked-by: Jagan Teki <ja...@openedev.com>
Reviewed-by: Stefan Roese <s...@denx.de>
Reviewed-by: Boris Brezillon <boris.brezil...@bootlin.com>
---

[snip]

static int get_part(const char *partname, int *idx, loff_t *off, loff_t *size,
diff --git a/include/mtd.h b/include/mtd.h
index 6e6da3002f..011f26b3e1 100644
--- a/include/mtd.h
+++ b/include/mtd.h
@@ -8,6 +8,9 @@
#include <linux/mtd/mtd.h> +struct udevice;
+
+#if defined(CONFIG_DM)

it should be CONFIG_MTD.

  /*
   * Get mtd_info structure of the dev, which is stored as uclass private.
   *
@@ -20,5 +23,18 @@ static inline struct mtd_info *mtd_get_info(struct udevice 
*dev)
  }
int mtd_probe(struct udevice *dev);
+#else
+static inline struct mtd_info *mtd_get_info(struct udevice *dev)
+{
+       return NULL;
+}
+
+static inline int mtd_probe(struct udevice *dev)
+{
+       return 0;
+}

there is not caller for this in non-dm, better this block empty is it?

Let me know so-that I can do that and apply.
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to