[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 21/25] tests/qtest/cmsdk-apb-watchdog-test: Test clock change
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 21/25] tests/qtest/cmsdk-apb-watchdog-test: Test clock changes |
Date: |
Thu, 21 Jan 2021 23:04:47 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 1/21/21 8:06 PM, Peter Maydell wrote:
> Now that the CMSDK APB watchdog uses its Clock input, it will
> correctly respond when the system clock frequency is changed using
> the RCC register on in the Stellaris board system registers. Test
> that when the RCC register is written it causes the watchdog timer to
> change speed.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> tests/qtest/cmsdk-apb-watchdog-test.c | 52 +++++++++++++++++++++++++++
> 1 file changed, 52 insertions(+)
...
> +static void test_clock_change(void)
> +{
> + uint32_t rcc;
> +
> + /*
> + * Test that writing to the stellaris board's RCC register to
> + * change the system clock frequency causes the watchdog
> + * to change the speed it counts at.
> + */
> + g_assert_cmpuint(readl(WDOG_BASE + WDOGRIS), ==, 0);
> +
> + writel(WDOG_BASE + WDOGCONTROL, 1);
> + writel(WDOG_BASE + WDOGLOAD, 1000);
> +
> + /* Step to just past the 500th tick */
> + clock_step(80 * 500 + 1);
I was wondering about asking you to change that 40000 in patch #3.
Since you use that clearer form here, it would be nice to have it
in #3 too.
Otherwise,
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
- Re: [PATCH 19/25] hw/timer/cmsdk-apb-dualtimer: Convert to use Clock input, (continued)
- [PATCH 20/25] hw/watchdog/cmsdk-apb-watchdog: Convert to use Clock input, Peter Maydell, 2021/01/21
- [PATCH 21/25] tests/qtest/cmsdk-apb-watchdog-test: Test clock changes, Peter Maydell, 2021/01/21
- [PATCH 22/25] hw/arm/armsse: Use Clock to set system_clock_scale, Peter Maydell, 2021/01/21
- [PATCH 25/25] hw/arm/stellaris: Remove board-creation reset of STELLARIS_SYS, Peter Maydell, 2021/01/21
- [PATCH 23/25] arm: Don't set freq properties on CMSDK timer, dualtimer, watchdog, ARMSSE, Peter Maydell, 2021/01/21