blob: 0743fe7af9fd306c50fc2860f3f710e354535947 [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
Patrick Delaunay81313352021-04-27 11:02:19 +02006#define LOG_CATEGORY UCLASS_MTD
7
Thomas Choue51b65e2015-11-07 14:20:31 +08008#include <common.h>
9#include <dm.h>
Miquel Raynalaa168ac2018-09-29 12:58:24 +020010#include <dm/device-internal.h>
Thomas Choue51b65e2015-11-07 14:20:31 +080011#include <errno.h>
12#include <mtd.h>
13
Thomas Choue51b65e2015-11-07 14:20:31 +080014/*
15 * Implement a MTD uclass which should include most flash drivers.
16 * The uclass private is pointed to mtd_info.
17 */
18
19UCLASS_DRIVER(mtd) = {
20 .id = UCLASS_MTD,
21 .name = "mtd",
Simon Glass8a2b47f2020-12-03 16:55:17 -070022 .per_device_auto = sizeof(struct mtd_info),
Thomas Choue51b65e2015-11-07 14:20:31 +080023};