From nobody Thu Apr 25 14:28:25 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1602967187; cv=none; d=zohomail.com; s=zohoarc; b=GdszWLVbXXJYX1pUk3CjapcFatip8nMfBiGftu8abAL6mXVk6SqVbTB/3Tt90OflshCAqitv61grxo3OYwsLwovlUkOaLKCe4Ue0JY3AX2Qz5LOCDSumZnoXYfnFCcgZcAD3eK1rDuuVGTImUsbigzKSanIKiwqHQnOSTzo5QIc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602967187; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=P7ot6z14dvaXWKL6zew3+RK2IdtN/9GeFqEBAojrW0Q=; b=KfOdR/Mf37NIT1a1yzf2vCE8iIzaO9njKo1+A7jhWnWXzPU9BACxsIPx2Vq5AlXwehR+elH5g5wUkxmjToeP4UqCm1S8yE6xEBLj2O/5rGi/iOW34EhrKTYTzU6ub83JOm7qXnEpP8o0sTMJv3yxZd2sxXOnjEI7051LuDQdI44= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1602967187750221.83177867039808; Sat, 17 Oct 2020 13:39:47 -0700 (PDT) Received: from localhost ([::1]:57054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTszS-0006F4-GE for importer@patchew.org; Sat, 17 Oct 2020 16:39:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTsvj-0000iO-2Y; Sat, 17 Oct 2020 16:35:55 -0400 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:13763) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTsvf-0004ZO-M8; Sat, 17 Oct 2020 16:35:54 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id E310B747E09; Sat, 17 Oct 2020 22:35:46 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 5BACD74762C; Sat, 17 Oct 2020 22:35:46 +0200 (CEST) Message-Id: <540c1f05cdd1c01ce45f46355d2829aa494e2adb.1602965621.git.balaton@eik.bme.hu> In-Reply-To: References: Subject: [PATCH 1/6] m48t59-isa: remove legacy m48t59_init_isa() function Date: Sat, 17 Oct 2020 22:13:41 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org X-Spam-Probability: 10% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:738:2001:2001::2001; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Cave-Ayland , Herve Poussineau , Philippe Mathieu-Daude , Artyom Tarasenko , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via From: Mark Cave-Ayland This function is no longer used within the codebase. Signed-off-by: Mark Cave-Ayland Reviewed-by: Herv=C3=A9 Poussineau Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- hw/rtc/m48t59-isa.c | 25 ------------------------- include/hw/rtc/m48t59.h | 2 -- 2 files changed, 27 deletions(-) diff --git a/hw/rtc/m48t59-isa.c b/hw/rtc/m48t59-isa.c index cae315e488..dc21fb10a5 100644 --- a/hw/rtc/m48t59-isa.c +++ b/hw/rtc/m48t59-isa.c @@ -58,31 +58,6 @@ static M48txxInfo m48txx_isa_info[] =3D { } }; =20 -Nvram *m48t59_init_isa(ISABus *bus, uint32_t io_base, uint16_t size, - int base_year, int model) -{ - ISADevice *isa_dev; - DeviceState *dev; - int i; - - for (i =3D 0; i < ARRAY_SIZE(m48txx_isa_info); i++) { - if (m48txx_isa_info[i].size !=3D size || - m48txx_isa_info[i].model !=3D model) { - continue; - } - - isa_dev =3D isa_new(m48txx_isa_info[i].bus_name); - dev =3D DEVICE(isa_dev); - qdev_prop_set_uint32(dev, "iobase", io_base); - qdev_prop_set_int32(dev, "base-year", base_year); - isa_realize_and_unref(isa_dev, bus, &error_fatal); - return NVRAM(dev); - } - - assert(false); - return NULL; -} - static uint32_t m48txx_isa_read(Nvram *obj, uint32_t addr) { M48txxISAState *d =3D M48TXX_ISA(obj); diff --git a/include/hw/rtc/m48t59.h b/include/hw/rtc/m48t59.h index 04abedf3b2..9defe578d1 100644 --- a/include/hw/rtc/m48t59.h +++ b/include/hw/rtc/m48t59.h @@ -47,8 +47,6 @@ struct NvramClass { void (*toggle_lock)(Nvram *obj, int lock); }; =20 -Nvram *m48t59_init_isa(ISABus *bus, uint32_t io_base, uint16_t size, - int base_year, int type); Nvram *m48t59_init(qemu_irq IRQ, hwaddr mem_base, uint32_t io_base, uint16_t size, int base_year, int type); --=20 2.21.3 From nobody Thu Apr 25 14:28:25 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1602967052; cv=none; d=zohomail.com; s=zohoarc; b=iMXiBklP90gN/US+KacwbxLktN/bifCBg4IG6QQv6RsJ2iv7p8wCXmJT6qKv2WLFr0YDpcuqpuiIwoBKrzrBtZbpDeQIiywEpm4SRciVGZ76HmnuVZ6IrQd1DLnp820Ed/699QIJDjOBQ+s0zPODjypAWF85CKn8IEbuHkJkYsA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602967052; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=YpJYK9V32uMLYO4qv6J/HB4voOXVdrwOAaUJbL32aw0=; b=k22vXD+MiywriVZ/AcMeB1GD5z+YnDsa92KbN/gq9QiwRjS8yS65eKFfyIlo3q0Ap9GTVxk9fjutaScwtQEqGmoikJ51HVvc2ADw/rO/ijgAvPu6gOO1mTj79gXN1Y83B0Gef4ATdaubgfOunxniNGsCYlBf7FHvgR6dbYU3KMc= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1602967052906262.18859835250805; Sat, 17 Oct 2020 13:37:32 -0700 (PDT) Received: from localhost ([::1]:46894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTsxH-0001zF-PB for importer@patchew.org; Sat, 17 Oct 2020 16:37:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTsvj-0000je-VS; Sat, 17 Oct 2020 16:35:55 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]:13768) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTsvf-0004ZP-LE; Sat, 17 Oct 2020 16:35:55 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id D4D04747635; Sat, 17 Oct 2020 22:35:46 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 5FB28747630; Sat, 17 Oct 2020 22:35:46 +0200 (CEST) Message-Id: <403ddfbe83c6df7dfb0c3ae69202c5e2c4fae767.1602965621.git.balaton@eik.bme.hu> In-Reply-To: References: Subject: [PATCH 2/6] mt48t59: Set default value of base-year property to 1968 Date: Sat, 17 Oct 2020 22:13:41 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org X-Spam-Probability: 8% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/17 16:35:46 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Cave-Ayland , Herve Poussineau , Philippe Mathieu-Daude , Artyom Tarasenko , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Content-Type: text/plain; charset="utf-8" All instances set this value explicitely so make it the default to make it simpler to create instances without setting property. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/rtc/m48t59.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rtc/m48t59.c b/hw/rtc/m48t59.c index 6525206976..3108cf3d3f 100644 --- a/hw/rtc/m48t59.c +++ b/hw/rtc/m48t59.c @@ -655,7 +655,7 @@ static void m48txx_sysbus_toggle_lock(Nvram *obj, int l= ock) } =20 static Property m48t59_sysbus_properties[] =3D { - DEFINE_PROP_INT32("base-year", M48txxSysBusState, state.base_year, 0), + DEFINE_PROP_INT32("base-year", M48txxSysBusState, state.base_year, 196= 8), DEFINE_PROP_END_OF_LIST(), }; =20 --=20 2.21.3 From nobody Thu Apr 25 14:28:25 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1602967317; cv=none; d=zohomail.com; s=zohoarc; b=g9c409luG9wL+CbXCXwRu6EEdqH9A4Bj+2EMQJXj6GjV3gwJHf7uiiymmj7NYzCQ53IqLNpX+Z/Acz5GHOZNZJz/dCc1rRmzB5Jxtj2nU9GV+CjlORdymFMHG8EyqiCTivwwwYKOfN9pi4VgSGsTWkDmm1TdPnjWFwaYhFIa6P0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602967317; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=FuWM1hkrxRcRCEWHxGaTr6V35/BYd8D01UA3BAtj5Sk=; b=nF2Q/awNm4GEkDSmtgn6JqeFiGmJLZjOc3Wk9gfx1CbTWgMEng0XKmXFLdCef55mI5WAkC+s+mfPg9FMEVzi+wFjaquIW7PItg7FCBJ2ZAMM38Er8iw8vNMkhLkmoRV/jaRK/68Z6J57CrUzZlawEEmzofqsNNeF4tfP17YtfYg= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1602967317376589.6798187692609; Sat, 17 Oct 2020 13:41:57 -0700 (PDT) Received: from localhost ([::1]:34046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTt1Y-00006i-5o for importer@patchew.org; Sat, 17 Oct 2020 16:41:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTsvl-0000lw-Bm; Sat, 17 Oct 2020 16:35:57 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]:13781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTsvj-0004fL-Ne; Sat, 17 Oct 2020 16:35:57 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 0F179747F1F; Sat, 17 Oct 2020 22:35:54 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 63B9E747628; Sat, 17 Oct 2020 22:35:46 +0200 (CEST) Message-Id: <8dc32bfedf44c77f3229bb2359565a2ee65409d7.1602965621.git.balaton@eik.bme.hu> In-Reply-To: References: Subject: [PATCH 3/6] sun4m: use qdev instead of legacy m48t59_init() function Date: Sat, 17 Oct 2020 22:13:41 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org X-Spam-Probability: 8% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/17 16:35:46 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Cave-Ayland , Herve Poussineau , Philippe Mathieu-Daude , Artyom Tarasenko , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Content-Type: text/plain; charset="utf-8" Also declare nvram variable with the correct type. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/sparc/sun4m.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 54a2b2f9ef..7f1a48440c 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -837,7 +837,7 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwd= ef, { DeviceState *slavio_intctl; unsigned int i; - void *nvram; + Nvram *nvram; qemu_irq *cpu_irqs[MAX_CPUS], slavio_irq[32], slavio_cpu_irq[MAX_CPUS]; qemu_irq fdc_tc; unsigned long kernel_size; @@ -966,7 +966,8 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwd= ef, create_unimplemented_device("SUNW,sx", hwdef->sx_base, 0x2000); } =20 - nvram =3D m48t59_init(slavio_irq[0], hwdef->nvram_base, 0, 0x2000, 196= 8, 8); + nvram =3D NVRAM(sysbus_create_simple("sysbus-m48t08", hwdef->nvram_bas= e, + slavio_irq[0])); =20 slavio_timer_init_all(hwdef->counter_base, slavio_irq[19], slavio_cpu_= irq, smp_cpus); =20 --=20 2.21.3 From nobody Thu Apr 25 14:28:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1602967145; cv=none; d=zohomail.com; s=zohoarc; b=jSrJSFu0df1KZGlYh9vevwdEGfdhxUsVz7EbzL6SkLlSv5e/mI6O25RYtUbKzqPogLxtdUpRCBz3rTYZVvMwKHWbAPG+fc8ex9U47TbsTreg/bHxrWYD3Kz0evsTAp72d7+m4rnImEeO9BSe0nc08CklDVxT8nQFhNyjUo5+iN0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602967145; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=48NM7OYYNZB4GlOweD5sKlIJl7jUSuCiWk9y+WL9Z5o=; b=gUDLvpt1WQUWA3trrxnzVdg0zZC1T5qnJvNTo4fQJaKirr2ME+/6MDXdxckAfF5b+Usl7NxHqhGbJUkEc97D0qzlTlf2EoXg7bSKJAK//kweld4gIr2QzokqCJJ3u0D1JyIIrrOL7ixrmGrYWOmob3oSMd86ziXyIUpqjbzcce4= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1602967145168473.01948183748505; Sat, 17 Oct 2020 13:39:05 -0700 (PDT) Received: from localhost ([::1]:53050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTsyl-0004Z4-Q8 for importer@patchew.org; Sat, 17 Oct 2020 16:39:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTsvi-0000i2-RG; Sat, 17 Oct 2020 16:35:54 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]:13755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTsvf-0004ZM-LE; Sat, 17 Oct 2020 16:35:54 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id B5EEC747632; Sat, 17 Oct 2020 22:35:46 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 67C9A74762E; Sat, 17 Oct 2020 22:35:46 +0200 (CEST) Message-Id: <2b7a5594c8c41dcae0ade3354a13540f83570ab0.1602965621.git.balaton@eik.bme.hu> In-Reply-To: References: Subject: [PATCH 4/6] sun4u: use qdev instead of legacy m48t59_init() function Date: Sat, 17 Oct 2020 22:13:41 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org X-Spam-Probability: 8% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/17 16:35:46 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Cave-Ayland , Herve Poussineau , Philippe Mathieu-Daude , Artyom Tarasenko , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Content-Type: text/plain; charset="utf-8" Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/sparc64/sun4u.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index ad5ca2472a..a89ebed6f0 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -671,10 +671,12 @@ static void sun4uv_init(MemoryRegion *address_space_m= em, pci_ide_create_devs(pci_dev); =20 /* Map NVRAM into I/O (ebus) space */ - nvram =3D m48t59_init(NULL, 0, 0, NVRAM_SIZE, 1968, 59); - s =3D SYS_BUS_DEVICE(nvram); + dev =3D qdev_new("sysbus-m48t59"); + s =3D SYS_BUS_DEVICE(dev); + sysbus_realize_and_unref(s, &error_fatal); memory_region_add_subregion(pci_address_space_io(ebus), 0x2000, sysbus_mmio_get_region(s, 0)); + nvram =3D NVRAM(dev); =20 initrd_size =3D 0; initrd_addr =3D 0; --=20 2.21.3 From nobody Thu Apr 25 14:28:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1602967050; cv=none; d=zohomail.com; s=zohoarc; b=kK5ZJOIHjE+k/n0W80YkcrorWvZOe7cDt4l2edIY9pwB3Vhy5w6yVKFxDAMcPN21Cyks/XgKmND57UdNxOdTkYOvAPJQ1TsEMemzxz0NK3tGNq7UD+dDNmBOleAMn/gHa75vYpGgo8bS921JyyXb41IG026mRSbjqqyTYreq/Es= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602967050; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=l4C2c/8thzj7uPJa/kAIgko6DOowe5LtGQWld/bZxsQ=; b=KbSLtP15Eiy3+DO35RS2ToCGUSXhS2pM5rb9RJfUWPl9gCtZiqzeymBX/r8UxPfNdRPzc73llfgjIHJkcvAS/2YQfrLHX8LtfgEkog4OA1ddo9othP2nDNYapeDc1I+swB2gbmaBNXl55UDp0gDP/mRy9qewZfe5julCklG1GYk= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1602967050546374.28332032293497; Sat, 17 Oct 2020 13:37:30 -0700 (PDT) Received: from localhost ([::1]:46850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTsxF-0001yJ-9w for importer@patchew.org; Sat, 17 Oct 2020 16:37:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTsvi-0000h0-KU; Sat, 17 Oct 2020 16:35:54 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]:13773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTsvd-0004ZV-P5; Sat, 17 Oct 2020 16:35:53 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id E9B5E747F17; Sat, 17 Oct 2020 22:35:46 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 6B844747631; Sat, 17 Oct 2020 22:35:46 +0200 (CEST) Message-Id: In-Reply-To: References: Subject: [PATCH 5/6] ppc405_boards: use qdev instead of legacy m48t59_init() function Date: Sat, 17 Oct 2020 22:13:41 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org X-Spam-Probability: 8% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/17 16:35:46 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Cave-Ayland , Herve Poussineau , Philippe Mathieu-Daude , Artyom Tarasenko , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Content-Type: text/plain; charset="utf-8" Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/ppc/ppc405_boards.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c index 6198ec1035..7a11a38831 100644 --- a/hw/ppc/ppc405_boards.c +++ b/hw/ppc/ppc405_boards.c @@ -28,6 +28,7 @@ #include "qemu-common.h" #include "cpu.h" #include "hw/ppc/ppc.h" +#include "hw/sysbus.h" #include "ppc405.h" #include "hw/rtc/m48t59.h" #include "hw/block/flash.h" @@ -227,7 +228,7 @@ static void ref405ep_init(MachineState *machine) /* Register FPGA */ ref405ep_fpga_init(sysmem, 0xF0300000); /* Register NVRAM */ - m48t59_init(NULL, 0xF0000000, 0, 8192, 1968, 8); + sysbus_create_simple("sysbus-m48t08", 0xF0000000, NULL); /* Load kernel */ linux_boot =3D (kernel_filename !=3D NULL); if (linux_boot) { --=20 2.21.3 From nobody Thu Apr 25 14:28:26 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1602967167; cv=none; d=zohomail.com; s=zohoarc; b=QSjp8qX/1dUOsArySo5uX86oRSdkOhCd2FtCVaiOIUmZPbwnKyuENPqla0w95FI3cBNBGU92xedReTBQIqH+JBsvNJ235XUCEqgqyk3yLs2eT/qVFju+8PnYzUI2b5PvLYspyxEcou3eePrxYUWYWwjgre9ZVig0I9GS0+Tt/Lo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602967167; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=UczZdNmwkpooaRZcTwjiPm55JDbIoOoVnpAu/PgCMDo=; b=NWk8toFamvY3jJUq/6H44wVCL+2a3Ya6WLStBxsrjgltML5cbnGpORDl+VSultZX3Xcfzin4ShW+/EcwZP9CGqMz0KjgO6I1u07i5LBQRIiy8rPQ40lRbwzAcLvvvv2JTMOJosfV6ulFo8ytxIe9RKbIeXetqac81IxTaHEtueU= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1602967167226863.0688342230766; Sat, 17 Oct 2020 13:39:27 -0700 (PDT) Received: from localhost ([::1]:54800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTsz8-0005K2-2P for importer@patchew.org; Sat, 17 Oct 2020 16:39:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTsvk-0000kQ-Lc; Sat, 17 Oct 2020 16:35:56 -0400 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:13779) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTsvi-0004f4-US; Sat, 17 Oct 2020 16:35:56 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 11DD4747F1A; Sat, 17 Oct 2020 22:35:47 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 6FACC74762D; Sat, 17 Oct 2020 22:35:46 +0200 (CEST) Message-Id: <8b7f9f585a6d4e84e91d312093c80af544633eaf.1602965621.git.balaton@eik.bme.hu> In-Reply-To: References: Subject: [PATCH 6/6] m48t59: remove legacy m48t59_init() function Date: Sat, 17 Oct 2020 22:13:41 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org X-Spam-Probability: 8% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:738:2001:2001::2001; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Cave-Ayland , Herve Poussineau , Philippe Mathieu-Daude , Artyom Tarasenko , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via From: Mark Cave-Ayland Now that all of the callers of this function have been switched to use qdev properties, this legacy init function can now be removed. Signed-off-by: Mark Cave-Ayland Reviewed-by: Herv=C3=A9 Poussineau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/rtc/m48t59.c | 35 ----------------------------------- include/hw/rtc/m48t59.h | 4 ---- 2 files changed, 39 deletions(-) diff --git a/hw/rtc/m48t59.c b/hw/rtc/m48t59.c index 3108cf3d3f..e74716c491 100644 --- a/hw/rtc/m48t59.c +++ b/hw/rtc/m48t59.c @@ -564,41 +564,6 @@ const MemoryRegionOps m48t59_io_ops =3D { .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 -/* Initialisation routine */ -Nvram *m48t59_init(qemu_irq IRQ, hwaddr mem_base, - uint32_t io_base, uint16_t size, int base_year, - int model) -{ - DeviceState *dev; - SysBusDevice *s; - int i; - - for (i =3D 0; i < ARRAY_SIZE(m48txx_sysbus_info); i++) { - if (m48txx_sysbus_info[i].size !=3D size || - m48txx_sysbus_info[i].model !=3D model) { - continue; - } - - dev =3D qdev_new(m48txx_sysbus_info[i].bus_name); - qdev_prop_set_int32(dev, "base-year", base_year); - s =3D SYS_BUS_DEVICE(dev); - sysbus_realize_and_unref(s, &error_fatal); - sysbus_connect_irq(s, 0, IRQ); - if (io_base !=3D 0) { - memory_region_add_subregion(get_system_io(), io_base, - sysbus_mmio_get_region(s, 1)); - } - if (mem_base !=3D 0) { - sysbus_mmio_map(s, 0, mem_base); - } - - return NVRAM(s); - } - - assert(false); - return NULL; -} - void m48t59_realize_common(M48t59State *s, Error **errp) { s->buffer =3D g_malloc0(s->size); diff --git a/include/hw/rtc/m48t59.h b/include/hw/rtc/m48t59.h index 9defe578d1..d9b45eb161 100644 --- a/include/hw/rtc/m48t59.h +++ b/include/hw/rtc/m48t59.h @@ -47,8 +47,4 @@ struct NvramClass { void (*toggle_lock)(Nvram *obj, int lock); }; =20 -Nvram *m48t59_init(qemu_irq IRQ, hwaddr mem_base, - uint32_t io_base, uint16_t size, int base_year, - int type); - #endif /* HW_M48T59_H */ --=20 2.21.3