LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
To: <grant.likely@secretlab.ca>, <dirk.brandewie@gmail.com>,
	<devicetree-discuss@lists.ozlabs.org>,
	<linuxppc-dev@lists.ozlabs.org>,
	<microblaze-uclinux@itee.uq.edu.au>
Subject: [PATCH 1/7] fdt: Add Kconfig for EARLY_FLATTREE
Date: Thu, 18 Nov 2010 15:54:56 -0800	[thread overview]
Message-ID: <d43cf8d1-8821-4400-9c58-692846dd37ac@SG2EHSMHS005.ehs.local> (raw)
In-Reply-To: <1290124502-13125-1-git-send-email-stephen.neuendorffer@xilinx.com>

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,
We had discussed doing something like this a loooong time ago.  This (or at
least some other way of dealing with cmd_line) is
actually necessary to compile on X86.  Do you still want to do it this way?
Looking at my old email, you suggested only powerpc and microblaze need this.
Is that still the case?

Conflicts:

	drivers/of/fdt.c
---
 arch/microblaze/Kconfig |    1 +
 arch/powerpc/Kconfig    |    1 +
 drivers/of/Kconfig      |    5 +++++
 drivers/of/fdt.c        |    4 ++++
 4 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 692fdfc..384375c 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -20,6 +20,7 @@ config MICROBLAZE
 	select TRACING_SUPPORT
 	select OF
 	select OF_FLATTREE
+	select OF_EARLY_FLATTREE
 
 config SWAP
 	def_bool n
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 631e5a0..2cd7b32 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -119,6 +119,7 @@ config PPC
 	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 aa675eb..0199157 100644
--- a/drivers/of/Kconfig
+++ b/drivers/of/Kconfig
@@ -19,6 +19,10 @@ config OF_FLATTREE
 	bool
 	select DTC
 
+config OF_EARLY_FLATTREE
+	bool
+	depends on OF_FLATTREE
+
 config OF_PROMTREE
 	bool
 
@@ -62,3 +66,4 @@ config OF_MDIO
 	  OpenFirmware MDIO bus (Ethernet PHY) accessors
 
 endmenu # OF
+
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index c1360e0..4d71b29 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_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_EARLY_FLATTREE */
-- 
1.5.6.6



This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

  parent reply	other threads:[~2010-11-19  0:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1290021345-4303-1-git-send-email-stephen.neuendorffer@xilinx.com>
2010-11-18 23:54 ` [PATCH 0/7] add of_fdt_unflatten_tree Stephen Neuendorffer
     [not found] ` <1290124502-13125-1-git-send-email-stephen.neuendorffer@xilinx.com>
2010-11-18 23:54   ` Stephen Neuendorffer [this message]
2010-12-30  0:15     ` [PATCH 1/7] fdt: Add Kconfig for EARLY_FLATTREE Grant Likely
     [not found]   ` <1290124502-13125-2-git-send-email-stephen.neuendorffer@xilinx.com>
2010-11-18 23:54     ` [PATCH 2/7] arch/x86: Add support for device tree code Stephen Neuendorffer
2010-12-30  0:17       ` Grant Likely
     [not found]     ` <1290124502-13125-3-git-send-email-stephen.neuendorffer@xilinx.com>
2010-11-18 23:54       ` [PATCH 3/7] arch/x86: select OF and OF_FLATTREE Stephen Neuendorffer
2010-12-30  0:17         ` Grant Likely
     [not found]       ` <1290124502-13125-4-git-send-email-stephen.neuendorffer@xilinx.com>
2010-11-18 23:54         ` [PATCH 4/7] fdt.c: Add non-boottime device tree functions Stephen Neuendorffer
2010-12-30  0:34           ` Grant Likely
     [not found]         ` <1290124502-13125-5-git-send-email-stephen.neuendorffer@xilinx.com>
2010-11-18 23:55           ` [PATCH 5/7] fdt.c: Refactor unflatten_dt_node Stephen Neuendorffer
2010-12-30  0:35             ` Grant Likely
     [not found]           ` <1290124502-13125-6-git-send-email-stephen.neuendorffer@xilinx.com>
2010-11-18 23:55             ` [PATCH 6/7] fdt.c: Reorder unflatten_dt_node Stephen Neuendorffer
2010-12-30  0:36               ` Grant Likely
     [not found]             ` <1290124502-13125-7-git-send-email-stephen.neuendorffer@xilinx.com>
2010-11-18 23:55               ` [PATCH 7/7] fdt.c: Refactor unflatten_device_tree and add fdt_unflatten_tree Stephen Neuendorffer
2010-12-30  0:43                 ` Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d43cf8d1-8821-4400-9c58-692846dd37ac@SG2EHSMHS005.ehs.local \
    --to=stephen.neuendorffer@xilinx.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dirk.brandewie@gmail.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=microblaze-uclinux@itee.uq.edu.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox