From nobody Wed Nov 5 22:36:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538376224648575.4314895680554; Sun, 30 Sep 2018 23:43:44 -0700 (PDT) Received: from localhost ([::1]:59691 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rvj-0005Ce-Fp for importer@patchew.org; Mon, 01 Oct 2018 02:43:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rqj-0000th-GF for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6rqe-0005Rf-Ug for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:33 -0400 Received: from 5.mo179.mail-out.ovh.net ([46.105.43.140]:43920) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6rqe-0005Fa-MI for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:28 -0400 Received: from player699.ha.ovh.net (unknown [10.109.159.154]) by mo179.mail-out.ovh.net (Postfix) with ESMTP id 3438B100A7D for ; Mon, 1 Oct 2018 08:38:19 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player699.ha.ovh.net (Postfix) with ESMTPSA id BFE8B2400A0; Mon, 1 Oct 2018 08:38:12 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Jason Wang , qemu-devel@nongnu.org Date: Mon, 1 Oct 2018 08:37:53 +0200 Message-Id: <20181001063803.22330-2-clg@kaod.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181001063803.22330-1-clg@kaod.org> References: <20181001063803.22330-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 13896419603239570431 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtjedruddugedgjeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 46.105.43.140 Subject: [Qemu-devel] [PATCH v2 01/11] net: etraxfs_eth: convert SysBus init method to a realize method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Edgar E . Iglesias" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Edgar E. Iglesias Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/net/etraxfs_eth.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/net/etraxfs_eth.c b/hw/net/etraxfs_eth.c index a6932432b164..64ab3df1ae38 100644 --- a/hw/net/etraxfs_eth.c +++ b/hw/net/etraxfs_eth.c @@ -23,6 +23,7 @@ */ =20 #include "qemu/osdep.h" +#include "qapi/error.h" #include "hw/sysbus.h" #include "net/net.h" #include "hw/cris/etraxfs.h" @@ -584,14 +585,14 @@ static NetClientInfo net_etraxfs_info =3D { .link_status_changed =3D eth_set_link, }; =20 -static int fs_eth_init(SysBusDevice *sbd) +static void etraxfs_eth_realize(DeviceState *dev, Error **errp) { - DeviceState *dev =3D DEVICE(sbd); + SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); ETRAXFSEthState *s =3D ETRAX_FS_ETH(dev); =20 if (!s->dma_out || !s->dma_in) { - error_report("Unconnected ETRAX-FS Ethernet MAC"); - return -1; + error_setg(errp, "Unconnected ETRAX-FS Ethernet MAC"); + return; } =20 s->dma_out->client.push =3D eth_tx_push; @@ -611,7 +612,6 @@ static int fs_eth_init(SysBusDevice *sbd) =20 tdk_init(&s->phy); mdio_attach(&s->mdio_bus, &s->phy, s->phyaddr); - return 0; } =20 static Property etraxfs_eth_properties[] =3D { @@ -625,9 +625,8 @@ static Property etraxfs_eth_properties[] =3D { static void etraxfs_eth_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); - SysBusDeviceClass *k =3D SYS_BUS_DEVICE_CLASS(klass); =20 - k->init =3D fs_eth_init; + dc->realize =3D etraxfs_eth_realize; dc->props =3D etraxfs_eth_properties; /* Reason: pointer properties "dma_out", "dma_in" */ dc->user_creatable =3D false; --=20 2.17.1 From nobody Wed Nov 5 22:36:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538376035914198.45760902156871; Sun, 30 Sep 2018 23:40:35 -0700 (PDT) Received: from localhost ([::1]:59674 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rsg-0001vb-5q for importer@patchew.org; Mon, 01 Oct 2018 02:40:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rqh-0000tf-NG for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6rqc-0005OL-SN for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:31 -0400 Received: from 8.mo68.mail-out.ovh.net ([46.105.74.219]:48821) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6rqc-0005Mh-JU for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:26 -0400 Received: from player699.ha.ovh.net (unknown [10.109.146.5]) by mo68.mail-out.ovh.net (Postfix) with ESMTP id 536A6FBFC1 for ; Mon, 1 Oct 2018 08:38:25 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player699.ha.ovh.net (Postfix) with ESMTPSA id 0A8152400A0; Mon, 1 Oct 2018 08:38:19 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Jason Wang , qemu-devel@nongnu.org Date: Mon, 1 Oct 2018 08:37:54 +0200 Message-Id: <20181001063803.22330-3-clg@kaod.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181001063803.22330-1-clg@kaod.org> References: <20181001063803.22330-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 13898389927092587519 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtjedruddugedgjeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 46.105.74.219 Subject: [Qemu-devel] [PATCH v2 02/11] net: etraxfs_eth: add a reset method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Edgar E . Iglesias" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Edgar E. Iglesias Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/net/etraxfs_eth.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/hw/net/etraxfs_eth.c b/hw/net/etraxfs_eth.c index 64ab3df1ae38..36855804dba0 100644 --- a/hw/net/etraxfs_eth.c +++ b/hw/net/etraxfs_eth.c @@ -127,7 +127,7 @@ tdk_write(struct qemu_phy *phy, unsigned int req, unsig= ned int data) } =20 static void -tdk_init(struct qemu_phy *phy) +tdk_reset(struct qemu_phy *phy) { phy->regs[0] =3D 0x3100; /* PHY Id. */ @@ -136,9 +136,6 @@ tdk_init(struct qemu_phy *phy) /* Autonegotiation advertisement reg. */ phy->regs[4] =3D 0x01E1; phy->link =3D 1; - - phy->read =3D tdk_read; - phy->write =3D tdk_write; } =20 struct qemu_mdio @@ -585,6 +582,27 @@ static NetClientInfo net_etraxfs_info =3D { .link_status_changed =3D eth_set_link, }; =20 +static void etraxfs_eth_reset(DeviceState *dev) +{ + ETRAXFSEthState *s =3D ETRAX_FS_ETH(dev); + + memset(s->regs, 0, sizeof(s->regs)); + memset(s->macaddr, 0, sizeof(s->macaddr)); + s->duplex_mismatch =3D 0; + + s->mdio_bus.mdc =3D 0; + s->mdio_bus.mdio =3D 0; + s->mdio_bus.state =3D 0; + s->mdio_bus.drive =3D 0; + s->mdio_bus.cnt =3D 0; + s->mdio_bus.addr =3D 0; + s->mdio_bus.opc =3D 0; + s->mdio_bus.req =3D 0; + s->mdio_bus.data =3D 0; + + tdk_reset(&s->phy); +} + static void etraxfs_eth_realize(DeviceState *dev, Error **errp) { SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); @@ -609,8 +627,8 @@ static void etraxfs_eth_realize(DeviceState *dev, Error= **errp) object_get_typename(OBJECT(s)), dev->id, s); qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a); =20 - - tdk_init(&s->phy); + s->phy.read =3D tdk_read; + s->phy.write =3D tdk_write; mdio_attach(&s->mdio_bus, &s->phy, s->phyaddr); } =20 @@ -627,6 +645,7 @@ static void etraxfs_eth_class_init(ObjectClass *klass, = void *data) DeviceClass *dc =3D DEVICE_CLASS(klass); =20 dc->realize =3D etraxfs_eth_realize; + dc->reset =3D etraxfs_eth_reset; dc->props =3D etraxfs_eth_properties; /* Reason: pointer properties "dma_out", "dma_in" */ dc->user_creatable =3D false; --=20 2.17.1 From nobody Wed Nov 5 22:36:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538376404570963.4553476061577; Sun, 30 Sep 2018 23:46:44 -0700 (PDT) Received: from localhost ([::1]:59712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6ryU-0007b0-F2 for importer@patchew.org; Mon, 01 Oct 2018 02:46:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rqo-0000w7-9I for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6rqi-0005Yd-Jw for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:38 -0400 Received: from 8.mo1.mail-out.ovh.net ([178.33.110.239]:34884) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6rqi-0005Ws-Bt for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:32 -0400 Received: from player699.ha.ovh.net (unknown [10.109.146.137]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id AC178138DC7 for ; Mon, 1 Oct 2018 08:38:30 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player699.ha.ovh.net (Postfix) with ESMTPSA id 4C687240092; Mon, 1 Oct 2018 08:38:25 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Jason Wang , qemu-devel@nongnu.org Date: Mon, 1 Oct 2018 08:37:55 +0200 Message-Id: <20181001063803.22330-4-clg@kaod.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181001063803.22330-1-clg@kaod.org> References: <20181001063803.22330-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 13899797301933804543 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtjedruddugedgjeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 178.33.110.239 Subject: [Qemu-devel] [PATCH v2 03/11] net: lan9118: convert SysBus init method to a realize method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/net/lan9118.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c index b9032dac595f..a6269d9463b1 100644 --- a/hw/net/lan9118.c +++ b/hw/net/lan9118.c @@ -1320,9 +1320,9 @@ static NetClientInfo net_lan9118_info =3D { .link_status_changed =3D lan9118_set_link, }; =20 -static int lan9118_init1(SysBusDevice *sbd) +static void lan9118_realize(DeviceState *dev, Error **errp) { - DeviceState *dev =3D DEVICE(sbd); + SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); lan9118_state *s =3D LAN9118(dev); QEMUBH *bh; int i; @@ -1349,8 +1349,6 @@ static int lan9118_init1(SysBusDevice *sbd) s->timer =3D ptimer_init(bh, PTIMER_POLICY_DEFAULT); ptimer_set_freq(s->timer, 10000); ptimer_set_limit(s->timer, 0xffff, 1); - - return 0; } =20 static Property lan9118_properties[] =3D { @@ -1362,12 +1360,11 @@ static Property lan9118_properties[] =3D { static void lan9118_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); - SysBusDeviceClass *k =3D SYS_BUS_DEVICE_CLASS(klass); =20 - k->init =3D lan9118_init1; dc->reset =3D lan9118_reset; dc->props =3D lan9118_properties; dc->vmsd =3D &vmstate_lan9118; + dc->realize =3D lan9118_realize; } =20 static const TypeInfo lan9118_info =3D { --=20 2.17.1 From nobody Wed Nov 5 22:36:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 153837611472069.69211604157704; Sun, 30 Sep 2018 23:41:54 -0700 (PDT) Received: from localhost ([::1]:59681 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rtt-0002u3-7Y for importer@patchew.org; Mon, 01 Oct 2018 02:41:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rqu-0000z5-Ez for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6rqn-0005lq-UY for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:42 -0400 Received: from 3.mo3.mail-out.ovh.net ([46.105.44.175]:51919) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6rqn-0005et-OD for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:37 -0400 Received: from player699.ha.ovh.net (unknown [10.109.160.153]) by mo3.mail-out.ovh.net (Postfix) with ESMTP id E02571D8DB4 for ; Mon, 1 Oct 2018 08:38:35 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player699.ha.ovh.net (Postfix) with ESMTPSA id 8558F240092; Mon, 1 Oct 2018 08:38:30 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Jason Wang , qemu-devel@nongnu.org Date: Mon, 1 Oct 2018 08:37:56 +0200 Message-Id: <20181001063803.22330-5-clg@kaod.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181001063803.22330-1-clg@kaod.org> References: <20181001063803.22330-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 13901204678664424447 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtjedruddugedgjeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 46.105.44.175 Subject: [Qemu-devel] [PATCH v2 04/11] net: lance: convert SysBus init method to a realize method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/net/lance.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/net/lance.c b/hw/net/lance.c index a08d5ac6a848..f987b2fd180f 100644 --- a/hw/net/lance.c +++ b/hw/net/lance.c @@ -97,9 +97,9 @@ static const VMStateDescription vmstate_lance =3D { } }; =20 -static int lance_init(SysBusDevice *sbd) +static void lance_realize(DeviceState *dev, Error **errp) { - DeviceState *dev =3D DEVICE(sbd); + SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); SysBusPCNetState *d =3D SYSBUS_PCNET(dev); PCNetState *s =3D &d->state; =20 @@ -115,7 +115,6 @@ static int lance_init(SysBusDevice *sbd) s->phys_mem_read =3D ledma_memory_read; s->phys_mem_write =3D ledma_memory_write; pcnet_common_init(dev, s, &net_lance_info); - return 0; } =20 static void lance_reset(DeviceState *dev) @@ -144,9 +143,8 @@ static Property lance_properties[] =3D { static void lance_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); - SysBusDeviceClass *k =3D SYS_BUS_DEVICE_CLASS(klass); =20 - k->init =3D lance_init; + dc->realize =3D lance_realize; set_bit(DEVICE_CATEGORY_NETWORK, dc->categories); dc->fw_name =3D "ethernet"; dc->reset =3D lance_reset; --=20 2.17.1 From nobody Wed Nov 5 22:36:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538376230709133.83115766674416; Sun, 30 Sep 2018 23:43:50 -0700 (PDT) Received: from localhost ([::1]:59692 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rvk-0005E2-J3 for importer@patchew.org; Mon, 01 Oct 2018 02:43:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rqy-00015T-OQ for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6rqu-0005v6-Fj for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:48 -0400 Received: from 2.mo69.mail-out.ovh.net ([178.33.251.80]:34894) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6rqu-0005sP-8v for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:44 -0400 Received: from player699.ha.ovh.net (unknown [10.109.159.152]) by mo69.mail-out.ovh.net (Postfix) with ESMTP id 87EF42DE11 for ; Mon, 1 Oct 2018 08:38:42 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player699.ha.ovh.net (Postfix) with ESMTPSA id BCBE82400A2; Mon, 1 Oct 2018 08:38:35 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Jason Wang , qemu-devel@nongnu.org Date: Mon, 1 Oct 2018 08:37:57 +0200 Message-Id: <20181001063803.22330-6-clg@kaod.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181001063803.22330-1-clg@kaod.org> References: <20181001063803.22330-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 13903175003208518655 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtjedruddugedgjeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 178.33.251.80 Subject: [Qemu-devel] [PATCH v2 05/11] net: milkymist_minimac2: convert SysBus init method to a realize method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Michael Walle , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Michael Walle Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Michael Walle --- hw/net/milkymist-minimac2.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/net/milkymist-minimac2.c b/hw/net/milkymist-minimac2.c index 3eaa19dfde92..7ef1daee41ec 100644 --- a/hw/net/milkymist-minimac2.c +++ b/hw/net/milkymist-minimac2.c @@ -452,9 +452,9 @@ static NetClientInfo net_milkymist_minimac2_info =3D { .receive =3D minimac2_rx, }; =20 -static int milkymist_minimac2_init(SysBusDevice *sbd) +static void milkymist_minimac2_realize(DeviceState *dev, Error **errp) { - DeviceState *dev =3D DEVICE(sbd); + SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); MilkymistMinimac2State *s =3D MILKYMIST_MINIMAC2(dev); size_t buffers_size =3D TARGET_PAGE_ALIGN(3 * MINIMAC2_BUFFER_SIZE); =20 @@ -479,8 +479,6 @@ static int milkymist_minimac2_init(SysBusDevice *sbd) s->nic =3D qemu_new_nic(&net_milkymist_minimac2_info, &s->conf, object_get_typename(OBJECT(dev)), dev->id, s); qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a); - - return 0; } =20 static const VMStateDescription vmstate_milkymist_minimac2_mdio =3D { @@ -521,9 +519,8 @@ static Property milkymist_minimac2_properties[] =3D { static void milkymist_minimac2_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); - SysBusDeviceClass *k =3D SYS_BUS_DEVICE_CLASS(klass); =20 - k->init =3D milkymist_minimac2_init; + dc->realize =3D milkymist_minimac2_realize; dc->reset =3D milkymist_minimac2_reset; dc->vmsd =3D &vmstate_milkymist_minimac2; dc->props =3D milkymist_minimac2_properties; --=20 2.17.1 From nobody Wed Nov 5 22:36:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538376291875993.9007825710969; Sun, 30 Sep 2018 23:44:51 -0700 (PDT) Received: from localhost ([::1]:59694 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rwo-00066Y-Oi for importer@patchew.org; Mon, 01 Oct 2018 02:44:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rr5-0001BQ-CA for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6rr0-00061q-6j for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:55 -0400 Received: from 15.mo5.mail-out.ovh.net ([178.33.107.29]:48729) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6rqz-000607-Vs for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:50 -0400 Received: from player699.ha.ovh.net (unknown [10.109.159.73]) by mo5.mail-out.ovh.net (Postfix) with ESMTP id A64A71F2F16 for ; Mon, 1 Oct 2018 08:38:48 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player699.ha.ovh.net (Postfix) with ESMTPSA id 2FE3224009E; Mon, 1 Oct 2018 08:38:42 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Jason Wang , qemu-devel@nongnu.org Date: Mon, 1 Oct 2018 08:37:58 +0200 Message-Id: <20181001063803.22330-7-clg@kaod.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181001063803.22330-1-clg@kaod.org> References: <20181001063803.22330-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 13904863852957174783 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtjedruddugedgjeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 178.33.107.29 Subject: [Qemu-devel] [PATCH v2 06/11] net: mipsnet: convert SysBus init method to a realize method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Aleksandar Markovic Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/net/mipsnet.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/net/mipsnet.c b/hw/net/mipsnet.c index 5a63df7ccb91..03b310427860 100644 --- a/hw/net/mipsnet.c +++ b/hw/net/mipsnet.c @@ -236,9 +236,9 @@ static const MemoryRegionOps mipsnet_ioport_ops =3D { .impl.max_access_size =3D 4, }; =20 -static int mipsnet_sysbus_init(SysBusDevice *sbd) +static void mipsnet_realize(DeviceState *dev, Error **errp) { - DeviceState *dev =3D DEVICE(sbd); + SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); MIPSnetState *s =3D MIPS_NET(dev); =20 memory_region_init_io(&s->io, OBJECT(dev), &mipsnet_ioport_ops, s, @@ -249,8 +249,6 @@ static int mipsnet_sysbus_init(SysBusDevice *sbd) s->nic =3D qemu_new_nic(&net_mipsnet_info, &s->conf, object_get_typename(OBJECT(dev)), dev->id, s); qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a); - - return 0; } =20 static void mipsnet_sysbus_reset(DeviceState *dev) @@ -267,9 +265,8 @@ static Property mipsnet_properties[] =3D { static void mipsnet_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); - SysBusDeviceClass *k =3D SYS_BUS_DEVICE_CLASS(klass); =20 - k->init =3D mipsnet_sysbus_init; + dc->realize =3D mipsnet_realize; set_bit(DEVICE_CATEGORY_NETWORK, dc->categories); dc->desc =3D "MIPS Simulator network device"; dc->reset =3D mipsnet_sysbus_reset; --=20 2.17.1 From nobody Wed Nov 5 22:36:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538376459155326.7792680417841; Sun, 30 Sep 2018 23:47:39 -0700 (PDT) Received: from localhost ([::1]:59714 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rzW-0008GC-1P for importer@patchew.org; Mon, 01 Oct 2018 02:47:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rrB-0001Eg-CQ for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:39:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6rr7-0006A9-2O for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:39:01 -0400 Received: from 8.mo179.mail-out.ovh.net ([46.105.75.26]:59458) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6rr6-00068D-52 for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:38:56 -0400 Received: from player699.ha.ovh.net (unknown [10.109.160.239]) by mo179.mail-out.ovh.net (Postfix) with ESMTP id D69061019A0 for ; Mon, 1 Oct 2018 08:38:54 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player699.ha.ovh.net (Postfix) with ESMTPSA id 972A0240092; Mon, 1 Oct 2018 08:38:48 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Jason Wang , qemu-devel@nongnu.org Date: Mon, 1 Oct 2018 08:37:59 +0200 Message-Id: <20181001063803.22330-8-clg@kaod.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181001063803.22330-1-clg@kaod.org> References: <20181001063803.22330-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 13906552702643309567 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtjedruddugedgjeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 46.105.75.26 Subject: [Qemu-devel] [PATCH v2 07/11] net: opencores_eth: convert SysBus init method to a realize method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Max Filippov , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Max Filippov Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Max Filippov --- hw/net/opencores_eth.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/net/opencores_eth.c b/hw/net/opencores_eth.c index d42b79c08c6a..d6f54f8d8208 100644 --- a/hw/net/opencores_eth.c +++ b/hw/net/opencores_eth.c @@ -715,9 +715,9 @@ static const MemoryRegionOps open_eth_desc_ops =3D { .write =3D open_eth_desc_write, }; =20 -static int sysbus_open_eth_init(SysBusDevice *sbd) +static void sysbus_open_eth_realize(DeviceState *dev, Error **errp) { - DeviceState *dev =3D DEVICE(sbd); + SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); OpenEthState *s =3D OPEN_ETH(dev); =20 memory_region_init_io(&s->reg_io, OBJECT(dev), &open_eth_reg_ops, s, @@ -732,7 +732,6 @@ static int sysbus_open_eth_init(SysBusDevice *sbd) =20 s->nic =3D qemu_new_nic(&net_open_eth_info, &s->conf, object_get_typename(OBJECT(s)), dev->id, s); - return 0; } =20 static void qdev_open_eth_reset(DeviceState *dev) @@ -750,9 +749,8 @@ static Property open_eth_properties[] =3D { static void open_eth_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); - SysBusDeviceClass *k =3D SYS_BUS_DEVICE_CLASS(klass); =20 - k->init =3D sysbus_open_eth_init; + dc->realize =3D sysbus_open_eth_realize; set_bit(DEVICE_CATEGORY_NETWORK, dc->categories); dc->desc =3D "Opencores 10/100 Mbit Ethernet"; dc->reset =3D qdev_open_eth_reset; --=20 2.17.1 From nobody Wed Nov 5 22:36:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538376540035308.11100844342695; Sun, 30 Sep 2018 23:49:00 -0700 (PDT) Received: from localhost ([::1]:59728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6s0l-0001cA-PB for importer@patchew.org; Mon, 01 Oct 2018 02:48:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rrG-0001Hf-EH for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:39:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6rrB-0006IP-Ej for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:39:06 -0400 Received: from 9.mo1.mail-out.ovh.net ([178.32.108.172]:56382) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6rrB-0006Gk-7S for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:39:01 -0400 Received: from player699.ha.ovh.net (unknown [10.109.159.132]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id 1C21F136149 for ; Mon, 1 Oct 2018 08:39:00 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player699.ha.ovh.net (Postfix) with ESMTPSA id D89E2240092; Mon, 1 Oct 2018 08:38:54 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Jason Wang , qemu-devel@nongnu.org Date: Mon, 1 Oct 2018 08:38:00 +0200 Message-Id: <20181001063803.22330-9-clg@kaod.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181001063803.22330-1-clg@kaod.org> References: <20181001063803.22330-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 13908241553475800063 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtjedruddugedgjeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 178.32.108.172 Subject: [Qemu-devel] [PATCH v2 08/11] net: smc91c111: convert SysBus init method to a realize method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/net/smc91c111.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c index d2fd2040e81c..99da2d92973e 100644 --- a/hw/net/smc91c111.c +++ b/hw/net/smc91c111.c @@ -766,9 +766,9 @@ static NetClientInfo net_smc91c111_info =3D { .receive =3D smc91c111_receive, }; =20 -static int smc91c111_init1(SysBusDevice *sbd) +static void smc91c111_realize(DeviceState *dev, Error **errp) { - DeviceState *dev =3D DEVICE(sbd); + SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); smc91c111_state *s =3D SMC91C111(dev); =20 memory_region_init_io(&s->mmio, OBJECT(s), &smc91c111_mem_ops, s, @@ -780,7 +780,6 @@ static int smc91c111_init1(SysBusDevice *sbd) object_get_typename(OBJECT(dev)), dev->id, s); qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a); /* ??? Save/restore. */ - return 0; } =20 static Property smc91c111_properties[] =3D { @@ -791,9 +790,8 @@ static Property smc91c111_properties[] =3D { static void smc91c111_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); - SysBusDeviceClass *k =3D SYS_BUS_DEVICE_CLASS(klass); =20 - k->init =3D smc91c111_init1; + dc->realize =3D smc91c111_realize; dc->reset =3D smc91c111_reset; dc->vmsd =3D &vmstate_smc91c111; dc->props =3D smc91c111_properties; --=20 2.17.1 From nobody Wed Nov 5 22:36:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538376400384956.4368164091387; Sun, 30 Sep 2018 23:46:40 -0700 (PDT) Received: from localhost ([::1]:59711 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6ryT-0007a8-R8 for importer@patchew.org; Mon, 01 Oct 2018 02:46:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rrM-0001LU-KU for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:39:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6rrH-0006Rn-OG for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:39:12 -0400 Received: from 18.mo1.mail-out.ovh.net ([46.105.35.72]:41663) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6rrH-0006QE-GZ for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:39:07 -0400 Received: from player699.ha.ovh.net (unknown [10.109.160.239]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id 685C2138DD8 for ; Mon, 1 Oct 2018 08:39:06 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player699.ha.ovh.net (Postfix) with ESMTPSA id 1DDD7240092; Mon, 1 Oct 2018 08:39:00 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Jason Wang , qemu-devel@nongnu.org Date: Mon, 1 Oct 2018 08:38:01 +0200 Message-Id: <20181001063803.22330-10-clg@kaod.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181001063803.22330-1-clg@kaod.org> References: <20181001063803.22330-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 13909930401194413055 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtjedruddugedgjeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 46.105.35.72 Subject: [Qemu-devel] [PATCH v2 09/11] net: stellaris_enet: convert SysBus init method to a realize method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Peter Maydell Cc: qemu-arm@nongnu.org Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/net/stellaris_enet.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/net/stellaris_enet.c b/hw/net/stellaris_enet.c index 165562d7886a..3ee1e0f8a43f 100644 --- a/hw/net/stellaris_enet.c +++ b/hw/net/stellaris_enet.c @@ -473,9 +473,9 @@ static NetClientInfo net_stellaris_enet_info =3D { .receive =3D stellaris_enet_receive, }; =20 -static int stellaris_enet_init(SysBusDevice *sbd) +static void stellaris_enet_realize(DeviceState *dev, Error **errp) { - DeviceState *dev =3D DEVICE(sbd); + SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); stellaris_enet_state *s =3D STELLARIS_ENET(dev); =20 memory_region_init_io(&s->mmio, OBJECT(s), &stellaris_enet_ops, s, @@ -489,7 +489,6 @@ static int stellaris_enet_init(SysBusDevice *sbd) qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a); =20 stellaris_enet_reset(s); - return 0; } =20 static Property stellaris_enet_properties[] =3D { @@ -500,9 +499,8 @@ static Property stellaris_enet_properties[] =3D { static void stellaris_enet_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); - SysBusDeviceClass *k =3D SYS_BUS_DEVICE_CLASS(klass); =20 - k->init =3D stellaris_enet_init; + dc->realize =3D stellaris_enet_realize; dc->props =3D stellaris_enet_properties; dc->vmsd =3D &vmstate_stellaris_enet; } --=20 2.17.1 From nobody Wed Nov 5 22:36:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538376091982465.4647300626091; Sun, 30 Sep 2018 23:41:31 -0700 (PDT) Received: from localhost ([::1]:59680 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rta-0002i1-PV for importer@patchew.org; Mon, 01 Oct 2018 02:41:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rrS-0001Qb-DO for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:39:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6rrO-0006Yb-40 for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:39:18 -0400 Received: from 2.mo6.mail-out.ovh.net ([46.105.76.65]:51269) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6rrN-0006XT-SG for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:39:13 -0400 Received: from player699.ha.ovh.net (unknown [10.109.160.62]) by mo6.mail-out.ovh.net (Postfix) with ESMTP id B7EE61843CB for ; Mon, 1 Oct 2018 08:39:12 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player699.ha.ovh.net (Postfix) with ESMTPSA id 6AB2B240097; Mon, 1 Oct 2018 08:39:06 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Jason Wang , qemu-devel@nongnu.org Date: Mon, 1 Oct 2018 08:38:02 +0200 Message-Id: <20181001063803.22330-11-clg@kaod.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181001063803.22330-1-clg@kaod.org> References: <20181001063803.22330-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 13911619252160859135 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtjedruddugedgjeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 46.105.76.65 Subject: [Qemu-devel] [PATCH v2 10/11] net: stellaris_enet: add a reset method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Peter Maydell Cc: qemu-arm@nongnu.org Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/net/stellaris_enet.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/net/stellaris_enet.c b/hw/net/stellaris_enet.c index 3ee1e0f8a43f..b3375ebb459c 100644 --- a/hw/net/stellaris_enet.c +++ b/hw/net/stellaris_enet.c @@ -457,8 +457,10 @@ static const MemoryRegionOps stellaris_enet_ops =3D { .endianness =3D DEVICE_NATIVE_ENDIAN, }; =20 -static void stellaris_enet_reset(stellaris_enet_state *s) +static void stellaris_enet_reset(DeviceState *dev) { + stellaris_enet_state *s =3D STELLARIS_ENET(dev); + s->mdv =3D 0x80; s->rctl =3D SE_RCTL_BADCRC; s->im =3D SE_INT_PHY | SE_INT_MD | SE_INT_RXER | SE_INT_FOV | SE_INT_T= XEMP @@ -487,8 +489,6 @@ static void stellaris_enet_realize(DeviceState *dev, Er= ror **errp) s->nic =3D qemu_new_nic(&net_stellaris_enet_info, &s->conf, object_get_typename(OBJECT(dev)), dev->id, s); qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a); - - stellaris_enet_reset(s); } =20 static Property stellaris_enet_properties[] =3D { @@ -501,6 +501,7 @@ static void stellaris_enet_class_init(ObjectClass *klas= s, void *data) DeviceClass *dc =3D DEVICE_CLASS(klass); =20 dc->realize =3D stellaris_enet_realize; + dc->reset =3D stellaris_enet_reset; dc->props =3D stellaris_enet_properties; dc->vmsd =3D &vmstate_stellaris_enet; } --=20 2.17.1 From nobody Wed Nov 5 22:36:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538376276954938.9524019486016; Sun, 30 Sep 2018 23:44:36 -0700 (PDT) Received: from localhost ([::1]:59693 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rwZ-0005uK-NK for importer@patchew.org; Mon, 01 Oct 2018 02:44:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rrg-0001b8-BO for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:39:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6rra-0006nw-Gf for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:39:32 -0400 Received: from 4.mo2.mail-out.ovh.net ([87.98.172.75]:57869) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6rrX-0006gF-DR for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:39:24 -0400 Received: from player699.ha.ovh.net (unknown [10.109.146.19]) by mo2.mail-out.ovh.net (Postfix) with ESMTP id 1645016323C for ; Mon, 1 Oct 2018 08:39:19 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player699.ha.ovh.net (Postfix) with ESMTPSA id AA077240097; Mon, 1 Oct 2018 08:39:12 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Jason Wang , qemu-devel@nongnu.org Date: Mon, 1 Oct 2018 08:38:03 +0200 Message-Id: <20181001063803.22330-12-clg@kaod.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181001063803.22330-1-clg@kaod.org> References: <20181001063803.22330-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 13913589577721482239 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtjedruddugedgjeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 87.98.172.75 Subject: [Qemu-devel] [PATCH v2 11/11] net: xgmac: convert SysBus init method to a realize method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Peter Maydell , qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Peter Maydell Cc: qemu-arm@nongnu.org Cc: Rob Herring Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/net/xgmac.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/net/xgmac.c b/hw/net/xgmac.c index fa001563d3de..63f5a62ebf1b 100644 --- a/hw/net/xgmac.c +++ b/hw/net/xgmac.c @@ -374,9 +374,9 @@ static NetClientInfo net_xgmac_enet_info =3D { .receive =3D eth_rx, }; =20 -static int xgmac_enet_init(SysBusDevice *sbd) +static void xgmac_enet_realize(DeviceState *dev, Error **errp) { - DeviceState *dev =3D DEVICE(sbd); + SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); XgmacState *s =3D XGMAC(dev); =20 memory_region_init_io(&s->iomem, OBJECT(s), &enet_mem_ops, s, @@ -397,8 +397,6 @@ static int xgmac_enet_init(SysBusDevice *sbd) (s->conf.macaddr.a[2] << 16) | (s->conf.macaddr.a[1] << 8) | s->conf.macaddr.a[0]; - - return 0; } =20 static Property xgmac_properties[] =3D { @@ -408,10 +406,9 @@ static Property xgmac_properties[] =3D { =20 static void xgmac_enet_class_init(ObjectClass *klass, void *data) { - SysBusDeviceClass *sbc =3D SYS_BUS_DEVICE_CLASS(klass); DeviceClass *dc =3D DEVICE_CLASS(klass); =20 - sbc->init =3D xgmac_enet_init; + dc->realize =3D xgmac_enet_realize; dc->vmsd =3D &vmstate_xgmac; dc->props =3D xgmac_properties; } --=20 2.17.1