Revisão | 419876eb272357c21fc4bf22bf0c8232acb1fdfb (tree) |
---|---|
Hora | 2019-01-03 00:18:12 |
Autor | Yoshinori Sato <ysato@user...> |
Commiter | Yoshinori Sato |
New SCI support
@@ -111,12 +111,12 @@ static RXTMRState *register_tmr(RX62NState *s, int unit) | ||
111 | 111 | return RXTMR(tmr); |
112 | 112 | } |
113 | 113 | |
114 | -static RXCMTState *register_cmt(RX62NState *s, int unit) | |
114 | +static RCMTState *register_cmt(RX62NState *s, int unit) | |
115 | 115 | { |
116 | 116 | SysBusDevice *cmt; |
117 | 117 | int i, irqbase; |
118 | 118 | |
119 | - cmt = SYS_BUS_DEVICE(qdev_create(NULL, TYPE_RXCMT)); | |
119 | + cmt = SYS_BUS_DEVICE(qdev_create(NULL, TYPE_RCMT)); | |
120 | 120 | sysbus_mmio_map(cmt, 0, 0x00088000 + unit * 0x10); |
121 | 121 | qdev_prop_set_uint64(DEVICE(cmt), "input-freq", 48000000); |
122 | 122 |
@@ -125,23 +125,25 @@ static RXCMTState *register_cmt(RX62NState *s, int unit) | ||
125 | 125 | for (i = 0; i < 1; i++) |
126 | 126 | sysbus_connect_irq(cmt, i, s->irq[irqbase + i]); |
127 | 127 | |
128 | - return RXCMT(cmt); | |
128 | + return RCMT(cmt); | |
129 | 129 | } |
130 | 130 | |
131 | -static RenesasSCIState *register_sci(RX62NState *s, int unit) | |
131 | +static RSCIState *register_sci(RX62NState *s, int unit) | |
132 | 132 | { |
133 | 133 | SysBusDevice *sci; |
134 | 134 | int i, irqbase; |
135 | 135 | |
136 | - sci = SYS_BUS_DEVICE(qdev_create(NULL, TYPE_RENESASSCI)); | |
136 | + sci = SYS_BUS_DEVICE(qdev_create(NULL, TYPE_RSCI)); | |
137 | 137 | qdev_prop_set_chr(DEVICE(sci), "chardev", serial_hd(unit)); |
138 | + qdev_prop_set_uint64(DEVICE(sci), "input-freq", 48000000); | |
138 | 139 | qdev_init_nofail(DEVICE(sci)); |
139 | 140 | sysbus_mmio_map(sci, 0, 0x00088240 + unit * 0x08); |
140 | 141 | irqbase = 214 + 4 * unit; |
141 | 142 | for (i = 0; i < 4; i++) |
142 | 143 | sysbus_connect_irq(sci, i, s->irq[irqbase + i]); |
143 | 144 | |
144 | - return RenesasSCI(sci); | |
145 | + object_property_set_bool(OBJECT(sci), true, "realized", NULL); | |
146 | + return RSCI(sci); | |
145 | 147 | } |
146 | 148 | |
147 | 149 | static void rx62n_realize(DeviceState *dev, Error **errp) |
@@ -14,7 +14,7 @@ | ||
14 | 14 | #include "hw/rx/rx.h" |
15 | 15 | #include "hw/intc/rx_icu.h" |
16 | 16 | #include "hw/timer/rx_tmr.h" |
17 | -#include "hw/timer/rx_cmt.h" | |
17 | +#include "hw/timer/renesas_cmt.h" | |
18 | 18 | #include "hw/char/renesas_sci.h" |
19 | 19 | |
20 | 20 | #define TYPE_RX62N "rx62n" |
@@ -27,8 +27,8 @@ typedef struct RX62NState { | ||
27 | 27 | RXCPU *cpu; |
28 | 28 | RXICUState *icu; |
29 | 29 | RXTMRState *tmr[2]; |
30 | - RXCMTState *cmt[2]; | |
31 | - RenesasSCIState *sci[6]; | |
30 | + RCMTState *cmt[2]; | |
31 | + RSCIState *sci[6]; | |
32 | 32 | |
33 | 33 | MemoryRegion *sysmem; |
34 | 34 | bool kernel; |