blob: 720bd824c4d7406f444cb3f0f413ca8b0923f0b2 [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 <dm.h>
Miquel Raynalaa168ac2018-09-29 12:58:24 +02009#include <dm/device-internal.h>
Thomas Choue51b65e2015-11-07 14:20:31 +080010#include <errno.h>
11#include <mtd.h>
12
Thomas Choue51b65e2015-11-07 14:20:31 +080013/*
14 * Implement a MTD uclass which should include most flash drivers.
15 * The uclass private is pointed to mtd_info.
16 */
17
18UCLASS_DRIVER(mtd) = {
19 .id = UCLASS_MTD,
20 .name = "mtd",
Simon Glass8a2b47f2020-12-03 16:55:17 -070021 .per_device_auto = sizeof(struct mtd_info),
Thomas Choue51b65e2015-11-07 14:20:31 +080022};