qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Peter Crosthwaite <peter.crosthwaite@petalogix.com>,
	David Gibson <david@gibson.dropbear.id.au>,
	Alexander Graf <agraf@suse.de>,
	patches@linaro.org
Subject: [Qemu-devel] [PATCH 0/2] device_tree: add qemu_devtree_setprop_sized_cells()
Date: Mon, 24 Jun 2013 11:22:54 +0100	[thread overview]
Message-ID: <1372069376-30640-1-git-send-email-peter.maydell@linaro.org> (raw)

These patches add a new function qemu_devtree_setprop_sized_cells()
to device_tree.c and use it in arm/boot.c.

We already have a qemu_devtree_setprop_cells() which sets a dtb
property to an array of cells whose values are specified by varargs.
However for the fairly common case of setting a property to a list
of addresses or of address,size pairs the number of cells used by
each element in the list depends on the parent's #address-cells
and #size-cells properties. To make this easier we provide an analogous
qemu_devtree_setprop_sized_cells() function which allows the number
of cells used by each element to be specified.

The arm/boot.c use is fairly straightforward; I also have some
virtio related patches brewing which are going to need to use this
to set their 'regs' property values. I figured it was probably better
to send this out for review now rather than wait for those, though.

The arm/boot bit of the patch depends (textually at least) on
http://patchwork.ozlabs.org/patch/251377/
  (arm/boot: Free dtb blob memory after use); it will apply cleanly
to git://git.linaro.org/people/pmaydell/qemu-arm.git arm-devs.next.

Peter Maydell (2):
  device_tree: Add qemu_devtree_setprop_sized_cells() utility function
  arm/boot: Use qemu_devtree_setprop_sized_cells()

 device_tree.c                |   48 ++++++++++++++++++++++++++++++++++++++++++
 hw/arm/boot.c                |   28 ++++++------------------
 include/sysemu/device_tree.h |   29 +++++++++++++++++++++++++
 3 files changed, 84 insertions(+), 21 deletions(-)

-- 
1.7.9.5

             reply	other threads:[~2013-06-24 10:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-24 10:22 Peter Maydell [this message]
2013-06-24 10:22 ` [Qemu-devel] [PATCH 1/2] device_tree: Add qemu_devtree_setprop_sized_cells() utility function Peter Maydell
2013-06-24 10:56   ` Alexander Graf
2013-06-24 11:02     ` Peter Maydell
2013-06-25 23:38       ` David Gibson
2013-06-26  8:49         ` Peter Maydell
2013-06-26 10:31           ` Alexander Graf
2013-06-26 10:50             ` Peter Maydell
2013-06-26 11:42               ` Alexander Graf
2013-06-26 12:38               ` Peter Crosthwaite
2013-06-26 12:44                 ` Alexander Graf
2013-06-27  0:17                   ` David Gibson
2013-06-27  0:27                     ` Anthony Liguori
2013-06-26 13:13                 ` Peter Maydell
2013-06-26 13:31                 ` Peter Maydell
2013-06-27  0:15               ` David Gibson
2013-06-27  0:10           ` David Gibson
2013-06-24 10:22 ` [Qemu-devel] [PATCH 2/2] arm/boot: Use qemu_devtree_setprop_sized_cells() Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1372069376-30640-1-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=agraf@suse.de \
    --cc=david@gibson.dropbear.id.au \
    --cc=patches@linaro.org \
    --cc=peter.crosthwaite@petalogix.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).