From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com,
afaerber@suse.de, pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH] Revert "nand: Don't inherit from Sysbus"
Date: Wed, 5 Feb 2014 09:39:22 +0100 [thread overview]
Message-ID: <1391589562-9010-1-git-send-email-armbru@redhat.com> (raw)
This reverts commit 7426aa72c36c908a7d0eae3e38568bb0a70de479.
The commit goes into a sensible direction, but it violates qdev design
assumptions. Symptom: "info qtree" crashes for all boards including
the device (akita, borzoi, spitz, terrier, tosa, axis-dev88).
Peter Crosthwaite is working on a fix, but it's not trivial. Revert
the flawed patch for now.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---
hw/block/nand.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/block/nand.c b/hw/block/nand.c
index a871ce0..a0232d1 100644
--- a/hw/block/nand.c
+++ b/hw/block/nand.c
@@ -21,7 +21,7 @@
# include "hw/hw.h"
# include "hw/block/flash.h"
# include "sysemu/blockdev.h"
-#include "hw/qdev.h"
+# include "hw/sysbus.h"
#include "qemu/error-report.h"
# define NAND_CMD_READ0 0x00
@@ -54,8 +54,7 @@
typedef struct NANDFlashState NANDFlashState;
struct NANDFlashState {
- DeviceState parent_obj;
-
+ SysBusDevice busdev;
uint8_t manf_id, chip_id;
uint8_t buswidth; /* in BYTES */
int size, pages;
@@ -441,7 +440,7 @@ static void nand_class_init(ObjectClass *klass, void *data)
static const TypeInfo nand_info = {
.name = TYPE_NAND,
- .parent = TYPE_DEVICE,
+ .parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(NANDFlashState),
.class_init = nand_class_init,
};
--
1.8.1.4
next reply other threads:[~2014-02-05 8:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-05 8:39 Markus Armbruster [this message]
2014-02-05 8:55 ` [Qemu-devel] [PATCH] Revert "nand: Don't inherit from Sysbus" Andreas Färber
2014-02-05 12:24 ` Markus Armbruster
2014-02-05 13:00 ` Peter Maydell
2014-02-05 14:28 ` Peter Maydell
2014-02-05 15:00 ` Markus Armbruster
2014-02-05 15:48 ` Paolo Bonzini
2014-02-05 23:06 ` Peter Crosthwaite
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=1391589562-9010-1-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=afaerber@suse.de \
--cc=pbonzini@redhat.com \
--cc=peter.crosthwaite@xilinx.com \
--cc=peter.maydell@linaro.org \
--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).