From nobody Sun Nov 16 05:40:23 2025 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 ARC-Seal: i=1; a=rsa-sha256; t=1598532251; cv=none; d=zohomail.com; s=zohoarc; b=oGMSSiMb6M1M0VuNKZbSa2tPYAnlD3GaZuO3PyWxeJnDtrS3pHjPHs+ICi+YBkazDnOJjW0Fz5ppgalAm2u/9vD8AfbZVBYRBUdI2MFZWw/hTkN7jrSFsUCXpx+a3VA6KRLq+5Syc/W+J8IDRSF23d0DsDAvk0/FHDn7qqBTjQw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598532251; h=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:References:Sender:Subject:To; bh=MKS+tVBEIp1GzHm9ibeb4HDSIAdTDVxmzhHnxlR2myk=; b=gKE6KjbqzyC63jYsWeAQBhfnY7uDGsjVKVuaV6vCYbZX7R6qi+XrDDng01qY2bg8/Nq85IPG7GMyMZlQlipwbDBPgZjNpMX6Gw9C/JflYz+mBUauHCHteb2+K/N5S02HjgCZz9QBilc8TojAmSZAAjTZN4cQjq8AphQhHVwWkQw= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598532251983453.38461202563735; Thu, 27 Aug 2020 05:44:11 -0700 (PDT) Received: from localhost ([::1]:58590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBHGE-0000mr-OL for importer@patchew.org; Thu, 27 Aug 2020 08:44:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBHBV-00087P-D0 for qemu-devel@nongnu.org; Thu, 27 Aug 2020 08:39:17 -0400 Received: from mail01.asahi-net.or.jp ([202.224.55.13]:47908) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBHBR-0005xg-F8 for qemu-devel@nongnu.org; Thu, 27 Aug 2020 08:39:16 -0400 Received: from sakura.ysato.name (ik1-413-38519.vs.sakura.ne.jp [153.127.30.23]) (Authenticated sender: PQ4Y-STU) by mail01.asahi-net.or.jp (Postfix) with ESMTPA id F28311086DC; Thu, 27 Aug 2020 21:39:07 +0900 (JST) Received: from yo-satoh-debian.localdomain (ZM005235.ppp.dion.ne.jp [222.8.5.235]) by sakura.ysato.name (Postfix) with ESMTPSA id B20451C0696; Thu, 27 Aug 2020 21:39:07 +0900 (JST) From: Yoshinori Sato To: qemu-devel@nongnu.org Subject: [PATCH 12/20] hw/rx/rx62n: Use New SCI module. Date: Thu, 27 Aug 2020 21:38:51 +0900 Message-Id: <20200827123859.81793-13-ysato@users.sourceforge.jp> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200827123859.81793-1-ysato@users.sourceforge.jp> References: <20200827123859.81793-1-ysato@users.sourceforge.jp> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: softfail client-ip=202.224.55.13; envelope-from=ysato@users.sourceforge.jp; helo=mail01.asahi-net.or.jp X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/27 08:39:06 X-ACL-Warn: Detected OS = ??? 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no 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: Yoshinori Sato Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Yoshinori Sato --- include/hw/rx/rx62n.h | 2 +- hw/rx/rx62n.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/hw/rx/rx62n.h b/include/hw/rx/rx62n.h index 1182ca24de..f463148799 100644 --- a/include/hw/rx/rx62n.h +++ b/include/hw/rx/rx62n.h @@ -70,7 +70,7 @@ typedef struct RX62NState { RXICUState icu; RenesasTMR8State tmr[RX62N_NR_TMR]; RenesasCMTState cmt[RX62N_NR_CMT]; - RSCIState sci[RX62N_NR_SCI]; + RSCIAState sci[RX62N_NR_SCI]; RX62NCPGState cpg; =20 MemoryRegion *sysmem; diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c index 0223396110..f61383a4c2 100644 --- a/hw/rx/rx62n.c +++ b/hw/rx/rx62n.c @@ -191,11 +191,13 @@ static void register_sci(RX62NState *s, int unit) { SysBusDevice *sci; int i, irqbase; + char ckname[16]; =20 object_initialize_child(OBJECT(s), "sci[*]", - &s->sci[unit], TYPE_RENESAS_SCI); + &s->sci[unit], TYPE_RENESAS_SCIA); sci =3D SYS_BUS_DEVICE(&s->sci[unit]); qdev_prop_set_chr(DEVICE(sci), "chardev", serial_hd(unit)); + qdev_prop_set_uint32(DEVICE(sci), "unit", unit); sysbus_realize(sci, &error_abort); =20 irqbase =3D RX62N_SCI_IRQ + SCI_NR_IRQ * unit; @@ -203,6 +205,9 @@ static void register_sci(RX62NState *s, int unit) sysbus_connect_irq(sci, i, s->irq[irqbase + i]); } sysbus_mmio_map(sci, 0, RX62N_SCI_BASE + unit * 0x08); + snprintf(ckname, sizeof(ckname), "pck_sci-%d", unit); + qdev_connect_clock_in(DEVICE(sci), "pck", + qdev_get_clock_out(DEVICE(&s->cpg), ckname)); } =20 static void register_cpg(RX62NState *s) --=20 2.20.1