blob: f9e5082446a08e17d16400bc7d6e8f0e93dd7834 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Thomas Choud8587992015-11-07 14:20:31 +08002/*
3 * Copyright (C) 2015 Thomas Chou <thomas@wytron.com.tw>
Thomas Choud8587992015-11-07 14:20:31 +08004 */
5
6#ifndef _MTD_H_
7#define _MTD_H_
8
Patrick Delaunaya4f2d832021-09-22 18:29:08 +02009#include <dm/device.h>
10#include <jffs2/load_kernel.h>
Thomas Choud8587992015-11-07 14:20:31 +080011#include <linux/mtd/mtd.h>
12
Miquel Raynal5db66b32018-09-29 12:58:28 +020013int mtd_probe_devices(void);
Miquel Raynale9f62db2018-09-29 12:58:24 +020014
Patrick Delaunay683b7c22020-01-24 13:45:56 +010015void board_mtdparts_default(const char **mtdids, const char **mtdparts);
16
Patrick Delaunaya4f2d832021-09-22 18:29:08 +020017/* compute the max size for the string associated to a dev type */
18#define MTD_NAME_SIZE(type) (sizeof(MTD_DEV_TYPE(type)) + DM_MAX_SEQ_STR)
19
Thomas Choud8587992015-11-07 14:20:31 +080020#endif /* _MTD_H_ */