]> git.sur5r.net Git - u-boot/commitdiff
dm: Add a header that provides access to the of-platdata structs
authorSimon Glass <sjg@chromium.org>
Mon, 4 Jul 2016 17:58:02 +0000 (11:58 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 15 Jul 2016 02:40:24 +0000 (20:40 -0600)
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>
include/dt-structs.h [new file with mode: 0644]

diff --git a/include/dt-structs.h b/include/dt-structs.h
new file mode 100644 (file)
index 0000000..e13afa6
--- /dev/null
@@ -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