From b2b0d3e7129d4e59be1a016ad4fb05db87b8c5b4 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 27 Feb 2015 22:06:41 -0700 Subject: dm: core: Select device tree control correctly for SPL Some boards will not use device tree for SPL even with driver model. Add the logic to support this. Signed-off-by: Simon Glass --- include/fdtdec.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/fdtdec.h') diff --git a/include/fdtdec.h b/include/fdtdec.h index 0d3e6d9..6590470 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -41,6 +41,16 @@ struct fdt_memory { fdt_addr_t end; }; +#ifdef CONFIG_OF_CONTROL +# if defined(CONFIG_SPL_BUILD) && defined(SPL_DISABLE_OF_CONTROL) +# define OF_CONTROL 0 +# else +# define OF_CONTROL 1 +# endif +#else +# define OF_CONTROL 0 +#endif + /* * Information about a resource. start is the first address of the resource * and end is the last address (inclusive). The length of the resource will -- cgit v1.1