summaryrefslogtreecommitdiff
path: root/drivers/core/simple-bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/core/simple-bus.c')
-rw-r--r--drivers/core/simple-bus.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/core/simple-bus.c b/drivers/core/simple-bus.c
index c45212a0d3..b0c2c20958 100644
--- a/drivers/core/simple-bus.c
+++ b/drivers/core/simple-bus.c
@@ -5,12 +5,7 @@
#include <common.h>
#include <dm.h>
-
-struct simple_bus_plat {
- u32 base;
- u32 size;
- u32 target;
-};
+#include <dm/simple_bus.h>
fdt_addr_t simple_bus_translate(struct udevice *dev, fdt_addr_t addr)
{
@@ -50,15 +45,17 @@ UCLASS_DRIVER(simple_bus) = {
.per_device_plat_auto = sizeof(struct simple_bus_plat),
};
+#if !CONFIG_IS_ENABLED(OF_PLATDATA)
static const struct udevice_id generic_simple_bus_ids[] = {
{ .compatible = "simple-bus" },
{ .compatible = "simple-mfd" },
{ }
};
+#endif
U_BOOT_DRIVER(simple_bus) = {
.name = "simple_bus",
.id = UCLASS_SIMPLE_BUS,
- .of_match = generic_simple_bus_ids,
+ .of_match = of_match_ptr(generic_simple_bus_ids),
.flags = DM_FLAG_PRE_RELOC,
};