aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStephen Neuendorffer <stephen.neuendorffer@xilinx.com>2010-11-18 18:54:56 -0500
committerGrant Likely <grant.likely@secretlab.ca>2010-12-29 18:08:18 -0500
commite6ce1324e4f08b0d984340201a125806dae0e9a6 (patch)
treefe7e203f2e5d73b555a6fcb713948cf4fe5f7715 /drivers
parent55271024a735d0c3234e6ca7e0914b05aab7fbac (diff)
of/flattree: Add Kconfig for EARLY_FLATTREE
The device tree code is now in two pieces: some which can be used generically on any platform which selects CONFIG_OF_FLATTREE, and some early which is used at boot time on only a few architectures. This patch segregates the early code so that only those architectures which care about it need compile it. This also means that some of the requirements in the early code (such as a cmd_line variable) that most architectures (e.g. X86) don't provide can be ignored. Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> [grant.likely@secretlab.ca: remove extra blank line addition] [grant.likely@secretlab.ca: fixed incorrect #ifdef CONFIG_EARLY_FLATTREE check] [grant.likely@secretlab.ca: Made OF_EARLY_FLATTREE select instead of depend on OF_FLATTREE] Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/of/Kconfig4
-rw-r--r--drivers/of/fdt.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
index e4b93a0a15d2..3c6e100a3ad0 100644
--- a/drivers/of/Kconfig
+++ b/drivers/of/Kconfig
@@ -19,6 +19,10 @@ config OF_FLATTREE
19 bool 19 bool
20 select DTC 20 select DTC
21 21
22config OF_EARLY_FLATTREE
23 bool
24 select OF_FLATTREE
25
22config OF_PROMTREE 26config OF_PROMTREE
23 bool 27 bool
24 28
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index c1360e02f921..2ebacf14e7de 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -27,6 +27,8 @@ int __initdata dt_root_size_cells;
27 27
28struct boot_param_header *initial_boot_params; 28struct boot_param_header *initial_boot_params;
29 29
30#ifdef CONFIG_OF_EARLY_FLATTREE
31
30char *find_flat_dt_string(u32 offset) 32char *find_flat_dt_string(u32 offset)
31{ 33{
32 return ((char *)initial_boot_params) + 34 return ((char *)initial_boot_params) +
@@ -604,3 +606,5 @@ void __init unflatten_device_tree(void)
604 606
605 pr_debug(" <- unflatten_device_tree()\n"); 607 pr_debug(" <- unflatten_device_tree()\n");
606} 608}
609
610#endif /* CONFIG_OF_EARLY_FLATTREE */