dm: Avoid using #ifdef for CONFIG_OF_LIVE
authorSimon Glass <sjg@chromium.org>
Sat, 3 Oct 2020 15:25:22 +0000 (09:25 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 29 Oct 2020 20:42:17 +0000 (14:42 -0600)
commita652d9c73a6eea1fdfb901c66178a4d804fac95d
tree85eaeea9428ceb50ce9579f87edf49e442447a22
parent08c3b88dd145d3f7f06e7ad8458905bde7a286ef
dm: Avoid using #ifdef for CONFIG_OF_LIVE

At present this option results in a number of #ifdefs due to the presence
or absence of the global_data of_root member.

Add a few macros to global_data.h to work around this. Update the code
accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/board_r.c
drivers/core/Makefile
drivers/core/root.c
include/asm-generic/global_data.h
include/dm/of.h
test/dm/test-main.c