@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <dm/device-internal.h>
#include <errno.h>
#include <mtd.h>
@@ -13,6 +14,14 @@
* The uclass private is pointed to mtd_info.
*/
+int mtd_probe(struct udevice *dev)
+{
+ if (device_active(dev))
+ return 0;
+
+ return device_probe(dev);
+}
+
UCLASS_DRIVER(mtd) = {
.id = UCLASS_MTD,
.name = "mtd",
@@ -549,5 +549,8 @@ int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off,
void mtd_get_len_incl_bad(struct mtd_info *mtd, uint64_t offset,
const uint64_t length, uint64_t *len_incl_bad,
int *truncated);
+
+int mtd_probe(struct udevice *dev);
+
#endif
#endif /* __MTD_MTD_H__ */