1 // SPDX-License-Identifier: GPL-2.0+
11 int board_get(struct udevice **devp)
13 return uclass_first_device_err(UCLASS_BOARD, devp);
16 int board_detect(struct udevice *dev)
18 struct board_ops *ops = board_get_ops(dev);
23 return ops->detect(dev);
26 int board_get_fit_loadable(struct udevice *dev, int index,
27 const char *type, const char **strp)
29 struct board_ops *ops = board_get_ops(dev);
31 if (!ops->get_fit_loadable)
34 return ops->get_fit_loadable(dev, index, type, strp);
37 int board_get_bool(struct udevice *dev, int id, bool *val)
39 struct board_ops *ops = board_get_ops(dev);
44 return ops->get_bool(dev, id, val);
47 int board_get_int(struct udevice *dev, int id, int *val)
49 struct board_ops *ops = board_get_ops(dev);
54 return ops->get_int(dev, id, val);
57 int board_get_str(struct udevice *dev, int id, size_t size, char *val)
59 struct board_ops *ops = board_get_ops(dev);
64 return ops->get_str(dev, id, size, val);
67 UCLASS_DRIVER(board) = {
70 .post_bind = dm_scan_fdt_dev,