Re: [PATCH 7/7] hw/watchdog/wdt_aspeed: Reduce timer precision to micro-second

2020-07-08 Thread Richard Henderson
On 6/16/20 12:51 AM, Philippe Mathieu-Daudé wrote: > -reload = muldiv64(s->regs[WDT_RELOAD_VALUE], NANOSECONDS_PER_SECOND, > +reload = muldiv64(s->regs[WDT_RELOAD_VALUE], > + NANOSECONDS_PER_SECOND / SCALE_US, >s->pclk_freq);

Re: [PATCH 7/7] hw/watchdog/wdt_aspeed: Reduce timer precision to micro-second

2020-06-22 Thread Andrew Jeffery
On Mon, 22 Jun 2020, at 18:13, Philippe Mathieu-Daudé wrote: > On 6/22/20 2:21 AM, Andrew Jeffery wrote: > > On Wed, 17 Jun 2020, at 13:11, Philippe Mathieu-Daudé wrote: > >> Hi Andrew, > >> > >> On 6/17/20 3:18 AM, Andrew Jeffery wrote: > >>> On Tue, 16 Jun 2020, at 17:21, Philippe

Re: [PATCH 7/7] hw/watchdog/wdt_aspeed: Reduce timer precision to micro-second

2020-06-22 Thread Philippe Mathieu-Daudé
On 6/22/20 2:21 AM, Andrew Jeffery wrote: > On Wed, 17 Jun 2020, at 13:11, Philippe Mathieu-Daudé wrote: >> Hi Andrew, >> >> On 6/17/20 3:18 AM, Andrew Jeffery wrote: >>> On Tue, 16 Jun 2020, at 17:21, Philippe Mathieu-Daudé wrote: The current implementation uses nano-second precision, while

Re: [PATCH 7/7] hw/watchdog/wdt_aspeed: Reduce timer precision to micro-second

2020-06-21 Thread Andrew Jeffery
On Wed, 17 Jun 2020, at 13:11, Philippe Mathieu-Daudé wrote: > Hi Andrew, > > On 6/17/20 3:18 AM, Andrew Jeffery wrote: > > On Tue, 16 Jun 2020, at 17:21, Philippe Mathieu-Daudé wrote: > >> The current implementation uses nano-second precision, while > >> the watchdog can not be more precise

Re: [PATCH 7/7] hw/watchdog/wdt_aspeed: Reduce timer precision to micro-second

2020-06-16 Thread Philippe Mathieu-Daudé
Hi Andrew, On 6/17/20 3:18 AM, Andrew Jeffery wrote: > On Tue, 16 Jun 2020, at 17:21, Philippe Mathieu-Daudé wrote: >> The current implementation uses nano-second precision, while >> the watchdog can not be more precise than a micro-second. > > What's the basis for this assertion? It's true for

Re: [PATCH 7/7] hw/watchdog/wdt_aspeed: Reduce timer precision to micro-second

2020-06-16 Thread Andrew Jeffery
On Tue, 16 Jun 2020, at 17:21, Philippe Mathieu-Daudé wrote: > The current implementation uses nano-second precision, while > the watchdog can not be more precise than a micro-second. What's the basis for this assertion? It's true for the AST2500 and AST2600, but the AST2400 can run the

[PATCH 7/7] hw/watchdog/wdt_aspeed: Reduce timer precision to micro-second

2020-06-16 Thread Philippe Mathieu-Daudé
The current implementation uses nano-second precision, while the watchdog can not be more precise than a micro-second. Simplify by using a micro-second based timer. Rename the timer 'timer_us' to have the unit explicit. Inspired-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daudé ---