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