From patchwork Mon Aug 6 02:16:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peter A. G. Crosthwaite" X-Patchwork-Id: 175243 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0C24B2C007E for ; Mon, 6 Aug 2012 12:44:57 +1000 (EST) Received: from localhost ([::1]:53268 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyCtQ-0008TL-RK for incoming@patchwork.ozlabs.org; Sun, 05 Aug 2012 22:18:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyCt3-0007Rk-J0 for qemu-devel@nongnu.org; Sun, 05 Aug 2012 22:17:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SyCt2-0001cz-85 for qemu-devel@nongnu.org; Sun, 05 Aug 2012 22:17:41 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:49361) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyCt2-0001ae-2D for qemu-devel@nongnu.org; Sun, 05 Aug 2012 22:17:40 -0400 Received: by mail-pb0-f45.google.com with SMTP id ro12so4514247pbb.4 for ; Sun, 05 Aug 2012 19:17:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references:x-gm-message-state; bh=Bh0GnAVXzZad4UKZJATX5guZAYPUnZdDlrXDT3zyMsk=; b=odGfMql+zxrBotNBXQKZIb9G/MXLutXP0itqRcJuVWXWwCu0Rpk6RpUA4c7vHms/Vs qbT+cMTxeUVvfw9Pw5qkDsuFv02W2mXPwri5mmNDI7MiEg2fxyCuut1lgxEHqNAkkJgJ wMLe35Fjh+NZ/m5WdrZZLNHBEEqC4opLqjM7YXxTLLFTQivx+ieY70kVY5Jer25NMxrc TkOgsnZQCSWwBomFXBhQ/lFmGbBLEZjgnU/pe8cJ/CoKE8hPVCeBhgtozIkuvislTU1/ Koa4YfX4KjrdjRhFt5V2sGLjDpfepfL16keMehjyzzokfXdI++KPamx/rr/z296HN3hV ErxA== Received: by 10.68.231.233 with SMTP id tj9mr15224204pbc.39.1344219459762; Sun, 05 Aug 2012 19:17:39 -0700 (PDT) Received: from localhost ([124.148.20.9]) by mx.google.com with ESMTPS id kh1sm7871336pbc.23.2012.08.05.19.17.36 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 05 Aug 2012 19:17:39 -0700 (PDT) From: "Peter A. G. Crosthwaite" To: qemu-devel@nongnu.org, paul@codesourcery.com, edgar.iglesias@gmail.com, peter.maydell@linaro.org, stefanha@gmail.com Date: Mon, 6 Aug 2012 12:16:18 +1000 Message-Id: <14d6a00223a609ba4ba0c15682d997519ede7864.1344218410.git.peter.crosthwaite@petalogix.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQlNYjaBKRiwaSmyJr9xkFXAOilrOaUhPczw2DFmlwfkaxqkLA5ihksdDtZC7L3qn9orOMkI X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.45 Cc: peter.crosthwaite@petalogix.com, i.mitsyanko@samsung.com, john.williams@petalogix.com Subject: [Qemu-devel] [PATCH v5 04/15] ssi: Added create_slave_no_init() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Slave creation function that can be used to create an SSI slave without qdev_init() being called. This give machine models a change to set properties. Signed-off-by: Peter A. G. Crosthwaite --- hw/ssi.c | 9 +++++++-- hw/ssi.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/ssi.c b/hw/ssi.c index 2e4f2fe..c47419d 100644 --- a/hw/ssi.c +++ b/hw/ssi.c @@ -86,10 +86,15 @@ static TypeInfo ssi_slave_info = { .abstract = true, }; +DeviceState *ssi_create_slave_no_init(SSIBus *bus, const char *name) +{ + return qdev_create(&bus->qbus, name); +} + DeviceState *ssi_create_slave(SSIBus *bus, const char *name) { - DeviceState *dev; - dev = qdev_create(&bus->qbus, name); + DeviceState *dev = ssi_create_slave_no_init(bus, name); + qdev_init_nofail(dev); return dev; } diff --git a/hw/ssi.h b/hw/ssi.h index 5b69a3b..80b9664 100644 --- a/hw/ssi.h +++ b/hw/ssi.h @@ -76,6 +76,7 @@ extern const VMStateDescription vmstate_ssi_slave; } DeviceState *ssi_create_slave(SSIBus *bus, const char *name); +DeviceState *ssi_create_slave_no_init(SSIBus *bus, const char *name); /* Master interface. */ SSIBus *ssi_create_bus(DeviceState *parent, const char *name);