diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index 387d5ffdfd3aea4e9807349edb1a6d6852cbb221..5f5018a71a3db9c7bf6b57bcfbdcbb3bf1883d7a 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig @@ -14,7 +14,7 @@ config MICROBLAZE select HAVE_DMA_API_DEBUG select TRACING_SUPPORT select OF - select OF_FLATTREE + select OF_EARLY_FLATTREE config SWAP def_bool n diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 0a9b5b8b2a1935103ecf9d81a2367d0a0633f1e4..f489ec30e071aa1932c43d4149a1130b23ae0349 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -2218,7 +2218,7 @@ config SECCOMP config USE_OF bool "Flattened Device Tree support" select OF - select OF_FLATTREE + select OF_EARLY_FLATTREE help Include support for flattened device tree machine descriptions. diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index e625e9e034ae19abe973282a3d83952493e8b709..48fb4790bfec286f616e75a91129a185cc391162 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -116,7 +116,7 @@ config PPC bool default y select OF - select OF_FLATTREE + select OF_EARLY_FLATTREE select HAVE_FTRACE_MCOUNT_RECORD select HAVE_DYNAMIC_FTRACE select HAVE_FUNCTION_TRACER diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index e4b93a0a15d2c13d310bd1f831eb14985f6880fb..3c6e100a3ad042d998e9fcf3085ae476cf83443e 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@ -19,6 +19,10 @@ config OF_FLATTREE bool select DTC +config OF_EARLY_FLATTREE + bool + select OF_FLATTREE + config OF_PROMTREE bool diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index c1360e02f9212de87d1ce7680153d0058720a11b..2ebacf14e7de9903b0fdaa50018798d72a168207 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -27,6 +27,8 @@ int __initdata dt_root_size_cells; struct boot_param_header *initial_boot_params; +#ifdef CONFIG_OF_EARLY_FLATTREE + char *find_flat_dt_string(u32 offset) { return ((char *)initial_boot_params) + @@ -604,3 +606,5 @@ void __init unflatten_device_tree(void) pr_debug(" <- unflatten_device_tree()\n"); } + +#endif /* CONFIG_OF_EARLY_FLATTREE */