[PATCH qemu 32/38] wdt: aspeed: Fix failed reboot due to timer miscalculation

Joel Stanley joel at jms.id.au
Mon Nov 21 18:26:10 AEDT 2016


On Sat, Nov 19, 2016 at 12:52 AM, Cédric Le Goater <clg at kaod.org> wrote:
> From: Andrew Jeffery <andrew at aj.id.au>
>
> The implementation was incorrectly scaling the reload value by
> nanoseconds per second. In reality the span represented by the reload
> value is determined by the selected clock, either APB or 1MHz.
>
> Test the selected clock and apply the appropriate scaling, then
> convert to nanoseconds for the timer infrastructure. Note that the APB
> rate is hard-coded and reflects the value used by the timer
> controller, and isn't necessarily an accurate representation of the
> clock configuration programmed in the SCU.
>
> Signed-off-by: Andrew Jeffery <andrew at aj.id.au>
> Signed-off-by: Cédric Le Goater <clg at kaod.org>

Reviewed-by: Joel Stanley <joel at jms.id.au>

> ---
>  hw/watchdog/wdt_aspeed.c | 28 +++++++++++++++++++++++-----
>  1 file changed, 23 insertions(+), 5 deletions(-)


More information about the openbmc mailing list