[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/20] hw/rx/rx62n: Use New SCI module.
From: |
Yoshinori Sato |
Subject: |
[PATCH 12/20] hw/rx/rx62n: Use New SCI module. |
Date: |
Thu, 27 Aug 2020 21:38:51 +0900 |
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
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;
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];
object_initialize_child(OBJECT(s), "sci[*]",
- &s->sci[unit], TYPE_RENESAS_SCI);
+ &s->sci[unit], TYPE_RENESAS_SCIA);
sci = 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);
irqbase = 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));
}
static void register_cpg(RX62NState *s)
--
2.20.1
- [PATCH 08/20] hw/timer: Renesas TMU/CMT module., (continued)
- [PATCH 08/20] hw/timer: Renesas TMU/CMT module., Yoshinori Sato, 2020/08/27
- [PATCH 04/20] hw/rx: New firmware loader., Yoshinori Sato, 2020/08/27
- [PATCH 05/20] hw/rx: Add RX62N Clock generator, Yoshinori Sato, 2020/08/27
- [PATCH 06/20] hw/timer: Renesas 8bit timer emulation., Yoshinori Sato, 2020/08/27
- [PATCH 19/20] hw/rx: Add CQ-FRK-RX62N target, Yoshinori Sato, 2020/08/27
- [PATCH 14/20] hw/rx/rx62n: RX62N Add MTU module, Yoshinori Sato, 2020/08/27
- [PATCH 13/20] hw/timer: Add Renesas MTU2, Yoshinori Sato, 2020/08/27
- [PATCH 16/20] hw/net: Add Renesas On-chip Ethernet MAC, Yoshinori Sato, 2020/08/27
- [PATCH 18/20] hw/rx: Add Tokudenkairo TKDN-RX62N-BRD, Yoshinori Sato, 2020/08/27
- [PATCH 11/20] hw/char: Renesas SCI module., Yoshinori Sato, 2020/08/27
- [PATCH 12/20] hw/rx/rx62n: Use New SCI module.,
Yoshinori Sato <=
- [PATCH 20/20] MAINTAINERS: Update RX entry, Yoshinori Sato, 2020/08/27
- [PATCH 15/20] hw/net: Add generic Bit-bang MDIO PHY., Yoshinori Sato, 2020/08/27
- Re: [PATCH 00/20] RX target update, Philippe Mathieu-Daudé, 2020/08/31