To store a full 64-bit address we need two cells.
This matches Apple's OpenFirmware on my G5.
Note that an enlarged #size-cells is not strictly needed
and constitutes a difference between Apple and IBM firmware.
Cc: Alexander Graf <agraf(a)suse.de>
Signed-off-by: Andreas Färber <andreas.faerber(a)web.de>
---
arch/ppc/qemu/init.c | 4 +++-
arch/ppc/qemu/tree.fs | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/ppc/qemu/init.c b/arch/ppc/qemu/init.c
index d17c843..1a2d453 100644
--- a/arch/ppc/qemu/init.c
+++ b/arch/ppc/qemu/init.c
@@ -734,8 +734,10 @@ arch_of_init( void )
/* all memory */
- /* TODO Adjust this when #address-cells gets increased for ppc64. */
PUSH(0);
+#ifdef CONFIG_PPC64
+ PUSH(0);
+#endif
fword("encode-phys");
/* This needs adjusting if #size-cells gets increased.
Alternatively use multiple (address, size) tuples. */
diff --git a/arch/ppc/qemu/tree.fs b/arch/ppc/qemu/tree.fs
index 4d107a9..e4115ea 100644
--- a/arch/ppc/qemu/tree.fs
+++ b/arch/ppc/qemu/tree.fs
@@ -5,13 +5,15 @@
\ as published by the Free Software Foundation
\
+include config.fs
+
\ -------------------------------------------------------------
\ device-tree
\ -------------------------------------------------------------
" /" find-device
-1 encode-int " #address-cells" property
+[IFDEF] CONFIG_PPC64 2 [ELSE] 1 [THEN] encode-int " #address-cells" property
1 encode-int " #size-cells" property
h# 05f5e100 encode-int " clock-frequency" property
--
1.7.3