qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Efimov Vasily <real@ispras.ru>
To: qemu-devel@nongnu.org
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	qemu-ppc@nongnu.org, Efimov Vasily <real@ispras.ru>,
	Alexander Graf <agraf@suse.de>
Subject: [Qemu-devel] [PATCH] ppc: virtex_ml507: QEMU_OPTION_dtb support for this machine.
Date: Tue, 13 Aug 2013 15:09:41 +0400	[thread overview]
Message-ID: <1376392181-30110-1-git-send-email-real@ispras.ru> (raw)


Signed-off-by: Efimov Vasily <real@ispras.ru>
---
 hw/ppc/virtex_ml507.c |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index 08e77fb..a00f709 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -141,11 +141,18 @@ static int xilinx_load_device_tree(hwaddr addr,
 {
     char *path;
     int fdt_size;
-    void *fdt;
+    void *fdt = 0;
     int r;
+    const char *dtb_filename;
 
-    /* Try the local "ppc.dtb" override.  */
-    fdt = load_device_tree("ppc.dtb", &fdt_size);
+    dtb_filename = qemu_opt_get(qemu_get_machine_opts(), "dtb");
+    if (dtb_filename) {
+        fdt = load_device_tree(dtb_filename, &fdt_size);
+    }
+    if (!fdt) {
+        /* Try the local "ppc.dtb" override.  */
+        fdt = load_device_tree("ppc.dtb", &fdt_size);
+    }
     if (!fdt) {
         path = qemu_find_file(QEMU_FILE_TYPE_BIOS, BINARY_DEVICE_TREE_FILE);
         if (path) {
-- 
1.7.10.4

             reply	other threads:[~2013-08-13 11:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-13 11:09 Efimov Vasily [this message]
2013-08-14  9:51 ` [Qemu-devel] [PATCH] ppc: virtex_ml507: QEMU_OPTION_dtb support for this machine Alexander Graf
2013-08-14  9:56   ` Edgar E. Iglesias
2013-08-14 10:03     ` Alexander Graf
2013-08-14 11:03       ` Edgar E. Iglesias
2013-08-14 11:11         ` Alexander Graf
2013-08-14 11:12         ` Andreas Färber
2013-08-14 10:34   ` Felix Deichmann
2013-08-14 10:38     ` Alexander Graf

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=1376392181-30110-1-git-send-email-real@ispras.ru \
    --to=real@ispras.ru \
    --cc=agraf@suse.de \
    --cc=edgar.iglesias@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).