summaryrefslogtreecommitdiff
path: root/include/dt-structs.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-07-04 17:58:02 (GMT)
committerSimon Glass <sjg@chromium.org>2016-07-15 02:40:24 (GMT)
commitf24770d8124c097b7b57ccc22b67aaf02bb6e850 (patch)
treec563d27c102ae42092a613a85467fbc7e0824cc1 /include/dt-structs.h
parentbab8233a1d17de222e83e0cbf8eb1d9d691adaf3 (diff)
downloadu-boot-f24770d8124c097b7b57ccc22b67aaf02bb6e850.tar.xz
dm: Add a header that provides access to the of-platdata structs
This header can be included from anywhere, but will only pull in the of-platdata struct definitions when this feature is enabled (and only in SPL). Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dt-structs.h')
-rw-r--r--include/dt-structs.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/dt-structs.h b/include/dt-structs.h
new file mode 100644
index 0000000..e13afa6
--- /dev/null
+++ b/include/dt-structs.h
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2016 Google, Inc
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __DT_STTUCTS
+#define __DT_STTUCTS
+
+/* These structures may only be used in SPL */
+#if CONFIG_IS_ENABLED(OF_PLATDATA)
+struct phandle_2_cell {
+ const void *node;
+ int id;
+};
+#include <generated/dt-structs.h>
+#endif
+
+#endif