summaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-10-30 15:24:30 -0400
committerTom Rini <trini@konsulko.com>2020-10-30 15:24:30 -0400
commit63d4607e03e5f1f7ab9a18bc640e31f7d28874b4 (patch)
treebdea1f28ad176fcd44f209bf943d25c8bddbe8d2 /include/asm-generic
parent096912b5fe9bb2fd90599d86a714001df6924198 (diff)
parent2424057b2ad0eacdd2d81e35e7bea5df97802b8f (diff)
downloadu-boot-63d4607e03e5f1f7ab9a18bc640e31f7d28874b4.tar.gz
u-boot-63d4607e03e5f1f7ab9a18bc640e31f7d28874b4.tar.xz
u-boot-63d4607e03e5f1f7ab9a18bc640e31f7d28874b4.zip
Merge tag 'dm-pull-30oct20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
of-platdata and dtoc improvements sandbox SPL tests binman support for compressed sections
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/global_data.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 0e8843b478..f392043796 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -24,6 +24,8 @@
#include <membuff.h>
#include <linux/list.h>
+struct driver_rt;
+
typedef struct global_data gd_t;
/**
@@ -192,6 +194,10 @@ struct global_data {
* @uclass_root: head of core tree
*/
struct list_head uclass_root;
+# if CONFIG_IS_ENABLED(OF_PLATDATA)
+ /** Dynamic info about the driver */
+ struct driver_rt *dm_driver_rt;
+# endif
#endif
#ifdef CONFIG_TIMER
/**
@@ -211,7 +217,7 @@ struct global_data {
* @fdt_size: space reserved for relocated device space
*/
unsigned long fdt_size;
-#ifdef CONFIG_OF_LIVE
+#if CONFIG_IS_ENABLED(OF_LIVE)
/**
* @of_root: root node of the live tree
*/
@@ -427,6 +433,25 @@ struct global_data {
#define gd_board_type() 0
#endif
+/* These macros help avoid #ifdefs in the code */
+#if CONFIG_IS_ENABLED(OF_LIVE)
+#define gd_of_root() gd->of_root
+#define gd_of_root_ptr() &gd->of_root
+#define gd_set_of_root(_root) gd->of_root = (_root)
+#else
+#define gd_of_root() NULL
+#define gd_of_root_ptr() NULL
+#define gd_set_of_root(_root)
+#endif
+
+#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#define gd_set_dm_driver_rt(dyn) gd->dm_driver_rt = dyn
+#define gd_dm_driver_rt() gd->dm_driver_rt
+#else
+#define gd_set_dm_driver_rt(dyn)
+#define gd_dm_driver_rt() NULL
+#endif
+
/**
* enum gd_flags - global data flags
*