blob: 0743fe7af9fd306c50fc2860f3f710e354535947 [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
Patrick Delaunayb953ec22021-04-27 11:02:19 +02006#define LOG_CATEGORY UCLASS_MTD
7
Thomas Choud8587992015-11-07 14:20:31 +08008#include <common.h>
9#include <dm.h>
Miquel Raynale9f62db2018-09-29 12:58:24 +020010#include <dm/device-internal.h>
Thomas Choud8587992015-11-07 14:20:31 +080011#include <errno.h>
12#include <mtd.h>
13
Thomas Choud8587992015-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 Glass41575d82020-12-03 16:55:17 -070022 .per_device_auto = sizeof(struct mtd_info),
Thomas Choud8587992015-11-07 14:20:31 +080023};