[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 38/72] dt: add helper for 64bit cell adds
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 38/72] dt: add helper for 64bit cell adds |
Date: |
Sun, 24 Jun 2012 01:07:02 +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>
---
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-devel] [PATCH 23/72] PPC: mpc8544ds: Span initial TLB entry over as much RAM as we need, (continued)
- [Qemu-devel] [PATCH 23/72] PPC: mpc8544ds: Span initial TLB entry over as much RAM as we need, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 28/72] spapr_vscsi: Error handling fixes, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 30/72] raw-posix: Fix build without is_allocated support, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 31/72] dt: allow add_subnode to create root subnodes, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 33/72] dt: add helper for phandle references, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 29/72] spapr: Add "memop" hypercall, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 32/72] dt: add helpers for multi-cell adds, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 01/72] ppc: Fix coding style in op_helper.c, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 08/72] ppc: Split integer and vector ops, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 37/72] dt: add helper for phandle allocation, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 38/72] dt: add helper for 64bit cell adds,
Alexander Graf <=
- [Qemu-devel] [PATCH 34/72] dt: temporarily disable subtree creation failure check, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 40/72] PPC: e500: dt: create memory node dynamically, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 41/72] PPC: e500: dt: create /cpus node dynamically, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 35/72] dt: add helper for phandle enumeration, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 42/72] PPC: e500: dt: create /hypervisor node dynamically, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 39/72] PPC: e500: require libfdt, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 47/72] PPC: e500: dt: create mpic node dynamically, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 46/72] PPC: e500: dt: create serial nodes dynamically, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 45/72] PPC: e500: dt: create /soc8544 node dynamically, Alexander Graf, 2012/06/23
- [Qemu-devel] [PATCH 44/72] PPC: e500: dt: create /chosen node dynamically, Alexander Graf, 2012/06/23