Patchwork [02/22] PPC: Bamboo: Fix memory size DT property

login
register
mail settings
Submitter Alexander Graf
Date Oct. 29, 2012, 10:25 a.m.
Message ID <1351506371-23632-3-git-send-email-agraf@suse.de>
Download mbox | patch
Permalink /patch/194963/
State New
Headers show

Comments

Alexander Graf - Oct. 29, 2012, 10:25 a.m.
Device tree properties need to be specified in big endian. Fix the
bamboo memory size property accordingly.

Signed-off-by: Alexander Graf <agraf@suse.de>
CC: qemu-stable@nongnu.org
---
 hw/ppc440_bamboo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c
index a6b1d51..cc85607 100644
--- a/hw/ppc440_bamboo.c
+++ b/hw/ppc440_bamboo.c
@@ -59,7 +59,7 @@  static int bamboo_load_device_tree(hwaddr addr,
 {
     int ret = -1;
 #ifdef CONFIG_FDT
-    uint32_t mem_reg_property[] = { 0, 0, ramsize };
+    uint32_t mem_reg_property[] = { 0, 0, cpu_to_be32(ramsize) };
     char *filename;
     int fdt_size;
     void *fdt;