All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ppc32-8xx: Skip OF tree if present.
@ 2005-12-06 21:58 Pantelis Antoniou
  0 siblings, 0 replies; only message in thread
From: Pantelis Antoniou @ 2005-12-06 21:58 UTC (permalink / raw)
  To: Marcelo Tosatti, Dan Malek, linuxppc-embedded

Skip OF tree if present. We will deal with it properly soon.

---
commit 83f5e0be8db948f28442dd279f6472bd3367ea45
tree 493c111da8b8b210ea3987e29c0dfaff78129d76
parent e4f5c82a92c2a546a16af1614114eec19120e40a
author Pantelis Antoniou <pantelis.antoniou@gmail.com> Tue, 06 Dec 2005 23:15:29 +0200
committer Pantelis Antoniou <pantelis.antoniou@gmail.com> Tue, 06 Dec 2005 23:15:29 +0200

 arch/ppc/syslib/m8xx_setup.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -376,10 +376,17 @@ void __init
 platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
 		unsigned long r6, unsigned long r7)
 {
+	bd_t *bd;
+
 	parse_bootinfo(find_bootinfo());
 
-	if ( r3 )
-		memcpy( (void *)__res,(void *)(r3+KERNELBASE), sizeof(bd_t) );
+	if ( r3 ) {
+		bd = (bd_t *)(r3+KERNELBASE);
+		/* skip OF tree if present */
+		if (*(u32 *)bd == 0xd00dfeed)
+			bd = (bd_t *)((char *)bd + ((u32 *)bd)[1]);
+		memcpy(__res, bd, sizeof(bd_t));
+	}
 
 #ifdef CONFIG_PCI
 	m8xx_setup_pci_ptrs();

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-12-06 21:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-06 21:58 [PATCH] ppc32-8xx: Skip OF tree if present Pantelis Antoniou

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.