aboutsummaryrefslogtreecommitdiff
path: root/device_tree.h
AgeCommit message (Collapse)Author
2012-12-19softmmu: move include files to include/sysemu/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-05fdt: move dumpdtb interpretation code to device_tree.cAlexander Graf
The dumpdtb code can be useful in more places than just for e500. Move it to a generic place. Signed-off-by: Alexander Graf <agraf@suse.de>
2012-07-20device_tree: Add support for reading device tree propertiesPeter Maydell
Add support for reading device tree properties (both generic and single-cell ones) to QEMU's convenience wrapper layer. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
2012-06-24dt: make setprop argument staticAlexander Graf
Whatever we pass in to qemu_devtree_setprop to put into the device tree will not get modified by that function, so it can easily be declared const. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
2012-06-24dt: add helper for 64bit cell addsAlexander Graf
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 <agraf@suse.de> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
2012-06-24dt: add helper for phandle allocationAlexander Graf
Phandle references work by having 2 pieces: - a "phandle" 1-cell property in the device tree node - a reference to the same value in a property we want to point to the other node To generate the 1-cell property, we need an allocation mechanism that gives us a unique number space. This patch adds an allocator for these properties. Signed-off-by: Alexander Graf <agraf@suse.de>
2012-06-24dt: add helper for empty dt creationAlexander Graf
We want to get rid of the concept of loading an external device tree and instead generate our own. However, to do this we need to also create a device tree template programatically. This patch adds a helper to create an empty device tree in memory. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
2012-06-24dt: add helper for phandle enumerationAlexander Graf
This patch adds a helper to search for a node's phandle by its path. This is especially useful when the phandle is part of an array, not just a single cell in which case qemu_devtree_setprop_phandle would be the easy choice. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
2012-06-24dt: add helper for phandle referencesAlexander Graf
Phandles are the fancy device tree name for "pointer to another node". To create a phandle property, we most likely want to reference to the node we're pointing to by its path. So create a helper that allows us to do so. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
2012-06-24dt: add helpers for multi-cell addsAlexander Graf
We have device tree helpers that allow us to create single cell (u32) wide properties. However, when creating properties that contain an array of cells, we need to jump through hoops, manually passing in an array with converted endianness. To ease the pain of this, create a generic macro helper that allows us to pass the cells as arguments. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
2011-10-06device tree: add add_subnode commandAlexander Graf
We want to be able to create subnodes in our device tree, so export it through the qemu device tree abstraction framework. Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06device tree: add nop_nodeAlexander Graf
We have a qemu internal abstraction layer on FDT. While I'm not fully convinced we need it at all, it's missing the nop_node functionality that we now need on e500. So let's add it and think about the general future of that API later. Signed-off-by: Alexander Graf <agraf@suse.de>
2011-04-01Allow qemu_devtree_setprop() to take arbitrary valuesDavid Gibson
Currently qemu_devtree_setprop() expects the new property value to be given as a uint32_t *. While property values consisting of u32s are common, in general they can have any bytestring value. Therefore, this patch alters the function to take a void * instead, allowing callers to easily give anything as the property value. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2009-04-10Wean device tree code off phys_ram_base.pbrook
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7068 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-16Implement device tree support needed for Bamboo emulationaurel32
To implement the -kernel, -initrd, and -append options, 4xx board emulation must load the guest kernel as if firmware had loaded it. Where u-boot would be the firmware, we must load the flat device tree into memory and set key fields such as /chosen/bootargs. This patch introduces a dependency on libfdt for flat device tree support. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6064 c046a42c-6fe2-441c-8c8c-71466251a162