summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dm/device.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index 3d8961f9ac6..e0f86f5df9f 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -192,6 +192,14 @@ struct udevice {
#endif
};
+static inline int dm_udevice_size(void)
+{
+ if (CONFIG_IS_ENABLED(OF_PLATDATA_RT))
+ return ALIGN(sizeof(struct udevice), CONFIG_LINKER_LIST_ALIGN);
+
+ return sizeof(struct udevice);
+}
+
/**
* struct udevice_rt - runtime information set up by U-Boot
*