blob: f9e5082446a08e17d16400bc7d6e8f0e93dd7834 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Thomas Choue51b65e2015-11-07 14:20:31 +08002/*
3 * Copyright (C) 2015 Thomas Chou <thomas@wytron.com.tw>
Thomas Choue51b65e2015-11-07 14:20:31 +08004 */
5
6#ifndef _MTD_H_
7#define _MTD_H_
8
Patrick Delaunay98385382021-09-22 18:29:08 +02009#include <dm/device.h>
10#include <jffs2/load_kernel.h>
Thomas Choue51b65e2015-11-07 14:20:31 +080011#include <linux/mtd/mtd.h>
12
Miquel Raynal741f4c72018-09-29 12:58:28 +020013int mtd_probe_devices(void);
Miquel Raynalaa168ac2018-09-29 12:58:24 +020014
Patrick Delaunay4a10f562020-01-24 13:45:56 +010015void board_mtdparts_default(const char **mtdids, const char **mtdparts);
16
Patrick Delaunay98385382021-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 Choue51b65e2015-11-07 14:20:31 +080020#endif /* _MTD_H_ */