1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2015 Thomas Chou <thomas@wytron.com.tw>
8 #include <dm/device-internal.h>
13 * mtd_probe - Probe the device @dev if not already done
15 * @dev: U-Boot device to probe
17 * @return 0 on success, an error otherwise.
19 int mtd_probe(struct udevice *dev)
21 if (device_active(dev))
24 return device_probe(dev);
28 * Implement a MTD uclass which should include most flash drivers.
29 * The uclass private is pointed to mtd_info.
32 UCLASS_DRIVER(mtd) = {
35 .per_device_auto_alloc_size = sizeof(struct mtd_info),