blob: 3ea4d8230bddeb4d01073538e8aea32618354327 [file] [log] [blame]
Simon Glass599447c2014-10-04 11:29:37 -06001/*
2 * Copyright (c) 2014 Google, Inc
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <common.h>
8#include <dm.h>
9#include <dm/root.h>
10
11DECLARE_GLOBAL_DATA_PTR;
12
13static int simple_bus_post_bind(struct udevice *dev)
14{
15 return dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset, false);
16}
17
18UCLASS_DRIVER(simple_bus) = {
19 .id = UCLASS_SIMPLE_BUS,
20 .name = "simple_bus",
21 .post_bind = simple_bus_post_bind,
22};
23
24static const struct udevice_id generic_simple_bus_ids[] = {
25 { .compatible = "simple-bus" },
26 { }
27};
28
29U_BOOT_DRIVER(simple_bus_drv) = {
30 .name = "generic_simple_bus",
31 .id = UCLASS_SIMPLE_BUS,
32 .of_match = generic_simple_bus_ids,
33};