aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dm/device.h3
-rw-r--r--include/linux/mtd/spi-nor.h2
-rw-r--r--include/mtd.h5
3 files changed, 9 insertions, 1 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index 0a9718a..9d0ca6a 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -207,8 +207,9 @@ struct udevice_rt {
u32 flags_;
};
-/* Maximum sequence number supported */
+/* Maximum sequence number supported and associated string length */
#define DM_MAX_SEQ 999
+#define DM_MAX_SEQ_STR 3
/* Returns the operations for a device */
#define device_get_ops(dev) (dev->driver->ops)
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index 7ddc4ba..4ceeae6 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -7,6 +7,7 @@
#ifndef __LINUX_MTD_SPI_NOR_H
#define __LINUX_MTD_SPI_NOR_H
+#include <mtd.h>
#include <linux/bitops.h>
#include <linux/mtd/cfi.h>
#include <linux/mtd/mtd.h>
@@ -561,6 +562,7 @@ struct spi_nor {
int (*ready)(struct spi_nor *nor);
void *priv;
+ char mtd_name[MTD_NAME_SIZE(MTD_DEV_TYPE_NOR)];
/* Compatibility for spi_flash, remove once sf layer is merged with mtd */
const char *name;
u32 size;
diff --git a/include/mtd.h b/include/mtd.h
index b569331..f9e5082 100644
--- a/include/mtd.h
+++ b/include/mtd.h
@@ -6,10 +6,15 @@
#ifndef _MTD_H_
#define _MTD_H_
+#include <dm/device.h>
+#include <jffs2/load_kernel.h>
#include <linux/mtd/mtd.h>
int mtd_probe_devices(void);
void board_mtdparts_default(const char **mtdids, const char **mtdparts);
+/* compute the max size for the string associated to a dev type */
+#define MTD_NAME_SIZE(type) (sizeof(MTD_DEV_TYPE(type)) + DM_MAX_SEQ_STR)
+
#endif /* _MTD_H_ */