Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Thomas Chou | e51b65e | 2015-11-07 14:20:31 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2015 Thomas Chou <thomas@wytron.com.tw> |
Thomas Chou | e51b65e | 2015-11-07 14:20:31 +0800 | [diff] [blame] | 4 | */ |
| 5 | |
Patrick Delaunay | 8131335 | 2021-04-27 11:02:19 +0200 | [diff] [blame] | 6 | #define LOG_CATEGORY UCLASS_MTD |
| 7 | |
Thomas Chou | e51b65e | 2015-11-07 14:20:31 +0800 | [diff] [blame] | 8 | #include <dm.h> |
Miquel Raynal | aa168ac | 2018-09-29 12:58:24 +0200 | [diff] [blame] | 9 | #include <dm/device-internal.h> |
Thomas Chou | e51b65e | 2015-11-07 14:20:31 +0800 | [diff] [blame] | 10 | #include <errno.h> |
| 11 | #include <mtd.h> |
| 12 | |
Thomas Chou | e51b65e | 2015-11-07 14:20:31 +0800 | [diff] [blame] | 13 | /* |
| 14 | * Implement a MTD uclass which should include most flash drivers. |
| 15 | * The uclass private is pointed to mtd_info. |
| 16 | */ |
| 17 | |
| 18 | UCLASS_DRIVER(mtd) = { |
| 19 | .id = UCLASS_MTD, |
| 20 | .name = "mtd", |
Simon Glass | 8a2b47f | 2020-12-03 16:55:17 -0700 | [diff] [blame] | 21 | .per_device_auto = sizeof(struct mtd_info), |
Thomas Chou | e51b65e | 2015-11-07 14:20:31 +0800 | [diff] [blame] | 22 | }; |