return lists_bind_fdt(parent, node, NULL, false);
}
#endif
+
+#if CONFIG_IS_ENABLED(OF_PLATDATA_RT)
+static struct udevice_rt *dev_get_rt(const struct udevice *dev)
+{
+ struct udevice *base = ll_entry_start(struct udevice, udevice);
+ int idx = dev - base;
+
+ struct udevice_rt *urt = gd_dm_udevice_rt() + idx;
+
+ return urt;
+}
+
+u32 dev_get_flags(const struct udevice *dev)
+{
+ const struct udevice_rt *urt = dev_get_rt(dev);
+
+ return urt->flags_;
+}
+
+void dev_or_flags(const struct udevice *dev, u32 or)
+{
+ struct udevice_rt *urt = dev_get_rt(dev);
+
+ urt->flags_ |= or;
+}
+
+void dev_bic_flags(const struct udevice *dev, u32 bic)
+{
+ struct udevice_rt *urt = dev_get_rt(dev);
+
+ urt->flags_ &= ~bic;
+}
+#endif /* OF_PLATDATA_RT */
struct list_head uclass_node;
struct list_head child_head;
struct list_head sibling_node;
+#if !CONFIG_IS_ENABLED(OF_PLATDATA_RT)
u32 flags_;
+#endif
int seq_;
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
ofnode node_;
/* Returns the operations for a device */
#define device_get_ops(dev) (dev->driver->ops)
+#if CONFIG_IS_ENABLED(OF_PLATDATA_RT)
+u32 dev_get_flags(const struct udevice *dev);
+void dev_or_flags(const struct udevice *dev, u32 or);
+void dev_bic_flags(const struct udevice *dev, u32 bic);
+#else
static inline u32 dev_get_flags(const struct udevice *dev)
{
return dev->flags_;
{
dev->flags_ &= ~bic;
}
+#endif /* OF_PLATDATA_RT */
/**
* dev_ofnode() - get the DT node reference associated with a udevice