[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 08/31] dt: add helper for 64bit cell adds
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 08/31] dt: add helper for 64bit cell adds |
Date: |
Tue, 19 Jun 2012 21:15:01 +0200 |
Some times in the device tree, we find an array of 2 u32 cells that
really are a single u64 value. This patch adds a helper to make the
creation of these easy.
Signed-off-by: Alexander Graf <address@hidden>
Reviewed-by: Peter Crosthwaite <address@hidden>
---
v1 -> v2:
- rename cell64 -> u64
---
device_tree.c | 7 +++++++
device_tree.h | 2 ++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/device_tree.c b/device_tree.c
index 7541274..c8d68c2 100644
--- a/device_tree.c
+++ b/device_tree.c
@@ -154,6 +154,13 @@ int qemu_devtree_setprop_cell(void *fdt, const char
*node_path,
return r;
}
+int qemu_devtree_setprop_u64(void *fdt, const char *node_path,
+ const char *property, uint64_t val)
+{
+ val = cpu_to_be64(val);
+ return qemu_devtree_setprop(fdt, node_path, property, &val, sizeof(val));
+}
+
int qemu_devtree_setprop_string(void *fdt, const char *node_path,
const char *property, const char *string)
{
diff --git a/device_tree.h b/device_tree.h
index 97af345..4898d95 100644
--- a/device_tree.h
+++ b/device_tree.h
@@ -21,6 +21,8 @@ int qemu_devtree_setprop(void *fdt, const char *node_path,
const char *property, void *val_array, int size);
int qemu_devtree_setprop_cell(void *fdt, const char *node_path,
const char *property, uint32_t val);
+int qemu_devtree_setprop_u64(void *fdt, const char *node_path,
+ const char *property, uint64_t val);
int qemu_devtree_setprop_string(void *fdt, const char *node_path,
const char *property, const char *string);
int qemu_devtree_setprop_phandle(void *fdt, const char *node_path,
--
1.6.0.2
- [Qemu-ppc] [PATCH 13/31] PPC: e500: dt: create / node dynamically, (continued)
- [Qemu-ppc] [PATCH 13/31] PPC: e500: dt: create / node dynamically, Alexander Graf, 2012/06/19
- [Qemu-ppc] [PATCH 11/31] PPC: e500: dt: create /cpus node dynamically, Alexander Graf, 2012/06/19
- [Qemu-ppc] [PATCH 23/31] PPC: e500: dt: use target_phys_addr_t for ramsize, Alexander Graf, 2012/06/19
- [Qemu-ppc] [PATCH 20/31] PPC: e500: dt: start with empty device tree, Alexander Graf, 2012/06/19
- [Qemu-ppc] [PATCH 25/31] Revert "dt: temporarily disable subtree creation failure check", Alexander Graf, 2012/06/19
- [Qemu-ppc] [PATCH 29/31] PPC: e500: Extend address/size of / to 64bit, Alexander Graf, 2012/06/19
- [Qemu-ppc] [PATCH 16/31] PPC: e500: dt: create serial nodes dynamically, Alexander Graf, 2012/06/19
- [Qemu-ppc] [PATCH 10/31] PPC: e500: dt: create memory node dynamically, Alexander Graf, 2012/06/19
- [Qemu-ppc] [PATCH 26/31] PPC: e500: Use new MPIC dt format, Alexander Graf, 2012/06/19
- [Qemu-ppc] [PATCH 24/31] PPC: e500: enable manual loading of dtb blob, Alexander Graf, 2012/06/19
- [Qemu-ppc] [PATCH 08/31] dt: add helper for 64bit cell adds,
Alexander Graf <=
- [Qemu-ppc] [PATCH 30/31] dt: Add global option to set phandle start offset, Alexander Graf, 2012/06/19
- [Qemu-ppc] [PATCH 27/31] PPC: e500: Use new SOC dt format, Alexander Graf, 2012/06/19
- [Qemu-ppc] [PATCH 14/31] PPC: e500: dt: create /chosen node dynamically, Alexander Graf, 2012/06/19
- [Qemu-ppc] [PATCH 19/31] PPC: e500: dt: create pci node dynamically, Alexander Graf, 2012/06/19
- [Qemu-ppc] [PATCH 28/31] PPC: e500: Define addresses as always 64bit, Alexander Graf, 2012/06/19
- [Qemu-ppc] [PATCH 31/31] PPC: e500: Refactor serial dt generation, Alexander Graf, 2012/06/19
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 00/31] PPC: mpc8544ds: Create device tree dynamically, Andreas Färber, 2012/06/19