From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrXuZ-00053S-5U for qemu-devel@nongnu.org; Tue, 25 Jun 2013 14:24:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrXuW-0005Bd-Fn for qemu-devel@nongnu.org; Tue, 25 Jun 2013 14:24:15 -0400 Received: from 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:1d0::1]:58189 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrXuW-0005BU-7l for qemu-devel@nongnu.org; Tue, 25 Jun 2013 14:24:12 -0400 From: Peter Maydell Date: Tue, 25 Jun 2013 19:21:56 +0100 Message-Id: <1372184516-32397-9-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1372184516-32397-1-git-send-email-peter.maydell@linaro.org> References: <1372184516-32397-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PULL 8/8] nand: Don't inherit from Sysbus List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Paul Brook From: Peter Crosthwaite Nand chips are not sysbus devices - they do not have any sense of MMIO, nor interrupts. Re-parent to TYPE_DEVICE accordingly. Cc: afaerber@suse.de Signed-off-by: Peter Crosthwaite Reviewed-by: Andreas Färber Signed-off-by: Peter Maydell --- hw/block/nand.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/block/nand.c b/hw/block/nand.c index a0232d1..a871ce0 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/sysbus.h" +#include "hw/qdev.h" #include "qemu/error-report.h" # define NAND_CMD_READ0 0x00 @@ -54,7 +54,8 @@ typedef struct NANDFlashState NANDFlashState; struct NANDFlashState { - SysBusDevice busdev; + DeviceState parent_obj; + uint8_t manf_id, chip_id; uint8_t buswidth; /* in BYTES */ int size, pages; @@ -440,7 +441,7 @@ static void nand_class_init(ObjectClass *klass, void *data) static const TypeInfo nand_info = { .name = TYPE_NAND, - .parent = TYPE_SYS_BUS_DEVICE, + .parent = TYPE_DEVICE, .instance_size = sizeof(NANDFlashState), .class_init = nand_class_init, }; -- 1.7.9.5