Re: [RFC 1/1] Implement AVR watchdog timer

2021-05-15 Thread Philippe Mathieu-Daudé
+Pavel/Alex On 5/3/21 10:08 PM, Michael Rolnik wrote: > Hi all, > > I was about to make icount work. but, there is something I still don't > understand. I have this code  > > timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, avr_wdt_interrupt, s); > > and then > > void avr_wdt_interrupt(/* some

Re: [RFC 1/1] Implement AVR watchdog timer

2021-05-14 Thread Michael Rolnik
Ok, thanks. Sent from my cell phone, please ignore typos On Thu, May 13, 2021, 3:27 PM Pavel Dovgalyuk wrote: > On 06.05.2021 00:18, Michael Rolnik wrote: > > Signed-off-by: Michael Rolnik > > --- > > MAINTAINERS | 2 + > > hw/avr/Kconfig| 1 + > >

Re: [RFC 1/1] Implement AVR watchdog timer

2021-05-13 Thread Pavel Dovgalyuk
On 06.05.2021 00:18, Michael Rolnik wrote: Signed-off-by: Michael Rolnik --- MAINTAINERS | 2 + hw/avr/Kconfig| 1 + hw/avr/atmega.c | 15 +- hw/avr/atmega.h | 2 + hw/watchdog/Kconfig | 3 +

[RFC 1/1] Implement AVR watchdog timer

2021-05-05 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- MAINTAINERS | 2 + hw/avr/Kconfig| 1 + hw/avr/atmega.c | 15 +- hw/avr/atmega.h | 2 + hw/watchdog/Kconfig | 3 + hw/watchdog/avr_wdt.c | 274

Re: [RFC 1/1] Implement AVR watchdog timer

2021-05-03 Thread Michael Rolnik
Hi all, I was about to make icount work. but, there is something I still don't understand. I have this code timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, avr_wdt_interrupt, s); and then void avr_wdt_interrupt(/* some arguments */) { #define MS2NS(n)((n) * 100ull) timer_mod_ns(timer,

Re: [RFC 1/1] Implement AVR watchdog timer

2021-05-03 Thread Michael Rolnik
Hi Fred. 1. thanks 2. It seems I have forgotten to set those flags. 3. 15ms is easy to test 8s will take 533 times longer, so in my case 3200 instructions which is totally incorrect. I don't understand why as I program the timer in virtual nanoseconds and not host time. 4. I hope Richard could

Re: [RFC 1/1] Implement AVR watchdog timer

2021-05-03 Thread Fred Konrad
Le 5/2/21 à 10:10 PM, Michael Rolnik a écrit : Signed-off-by: Michael Rolnik --- hw/avr/Kconfig| 1 + hw/avr/atmega.c | 15 ++- hw/avr/atmega.h | 2 + hw/watchdog/Kconfig | 3 + hw/watchdog/avr_wdt.c | 190

[RFC 1/1] Implement AVR watchdog timer

2021-05-02 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- hw/avr/Kconfig| 1 + hw/avr/atmega.c | 15 ++- hw/avr/atmega.h | 2 + hw/watchdog/Kconfig | 3 + hw/watchdog/avr_wdt.c | 190 ++ hw/watchdog/meson.build |