[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] hw/rx: rx62n switch renesas_timer.
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 2/3] hw/rx: rx62n switch renesas_timer. |
Date: |
Thu, 24 Jun 2021 11:01:56 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
Hi Yoshinori,
On 6/23/21 2:34 PM, Yoshinori Sato wrote:
> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
> ---
> include/hw/rx/rx62n.h | 4 ++--
> hw/rx/Kconfig | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/hw/rx/rx62n.h b/include/hw/rx/rx62n.h
> index 3ed80dba0d..c35bf3998c 100644
> --- a/include/hw/rx/rx62n.h
> +++ b/include/hw/rx/rx62n.h
> @@ -27,7 +27,7 @@
> #include "target/rx/cpu.h"
> #include "hw/intc/rx_icu.h"
> #include "hw/timer/renesas_tmr.h"
> -#include "hw/timer/renesas_cmt.h"
> +#include "hw/timer/renesas_timer.h"
> #include "hw/char/renesas_sci.h"
> #include "qemu/units.h"
> #include "qom/object.h"
> @@ -56,7 +56,7 @@ struct RX62NState {
> RXCPU cpu;
> RXICUState icu;
> RTMRState tmr[RX62N_NR_TMR];
> - RCMTState cmt[RX62N_NR_CMT];
> + RenesasCMTState cmt[RX62N_NR_CMT];
> RSCIState sci[RX62N_NR_SCI];
>
> MemoryRegion *sysmem;
> diff --git a/hw/rx/Kconfig b/hw/rx/Kconfig
> index 2b297c5a6a..f9cb892633 100644
> --- a/hw/rx/Kconfig
> +++ b/hw/rx/Kconfig
> @@ -2,7 +2,7 @@ config RX62N_MCU
> bool
> select RX_ICU
> select RENESAS_TMR
> - select RENESAS_CMT
> + select RENESAS_TIMER
> select RENESAS_SCI
>
> config RX_GDBSIM
>
I am confused, your patch seems incomplete... missing:
-- >8 --
diff --git a/include/hw/rx/rx62n.h b/include/hw/rx/rx62n.h
index c35bf3998c7..a34b845e1e7 100644
--- a/include/hw/rx/rx62n.h
+++ b/include/hw/rx/rx62n.h
@@ -26,7 +26,6 @@
#include "target/rx/cpu.h"
#include "hw/intc/rx_icu.h"
-#include "hw/timer/renesas_tmr.h"
#include "hw/timer/renesas_timer.h"
#include "hw/char/renesas_sci.h"
#include "qemu/units.h"
@@ -55,7 +54,7 @@ struct RX62NState {
RXCPU cpu;
RXICUState icu;
- RTMRState tmr[RX62N_NR_TMR];
+ RenesasTMUState tmr[RX62N_NR_TMR];
RenesasCMTState cmt[RX62N_NR_CMT];
RSCIState sci[RX62N_NR_SCI];
diff --git a/include/hw/timer/renesas_timer.h
b/include/hw/timer/renesas_timer.h
index dc0711ba832..ccf2e64b702 100644
--- a/include/hw/timer/renesas_timer.h
+++ b/include/hw/timer/renesas_timer.h
@@ -30,6 +30,7 @@ enum {
enum {
CMT_NR_IRQ = 1 * TIMER_CH_CMT,
+ TMU_NR_IRQ = 1 * TIMER_CH_TMU,
};
enum {
diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c
index fa5add9f9db..626d027a2db 100644
--- a/hw/rx/rx62n.c
+++ b/hw/rx/rx62n.c
@@ -163,13 +163,13 @@ static void register_tmr(RX62NState *s, int unit)
int i, irqbase;
object_initialize_child(OBJECT(s), "tmr[*]",
- &s->tmr[unit], TYPE_RENESAS_TMR);
+ &s->tmr[unit], TYPE_RENESAS_TMU);
tmr = SYS_BUS_DEVICE(&s->tmr[unit]);
qdev_prop_set_uint64(DEVICE(tmr), "input-freq", s->pclk_freq_hz);
sysbus_realize(tmr, &error_abort);
- irqbase = RX62N_TMR_IRQ + TMR_NR_IRQ * unit;
- for (i = 0; i < TMR_NR_IRQ; i++) {
+ irqbase = RX62N_TMR_IRQ + TMU_NR_IRQ * unit;
+ for (i = 0; i < TMU_NR_IRQ; i++) {
sysbus_connect_irq(tmr, i, s->irq[irqbase + i]);
}
sysbus_mmio_map(tmr, 0, RX62N_TMR_BASE + unit * 0x10);
---
Have I misunderstood the point of your series?
Regards,
Phil.