Re: [PATCH 04/20] clocksource/drivers/vf_pit: Rework the base address usage

From: Daniel Lezcano
Date: Thu Jul 24 2025 - 13:29:36 EST


On 07/07/2025 14:03, Ghennadi Procopciuc wrote:
On 7/5/2025 7:01 PM, Daniel Lezcano wrote:
[...]

-static int __init pit_clockevent_init(struct pit_timer *pit, unsigned long rate, int irq)
+static int __init pit_clockevent_init(struct pit_timer *pit, void __iomem *base,
+ unsigned long rate, int irq)
{
+ /*
+ * PIT0 and PIT1 can be chained to build a 64-bit timer, so
+ * choose PIT3 as clockevent and leave PIT0 and PIT1 unused
+ * for anyone else who needs them.
+ */
+ pit->clkevt_base = base + PIT_CH(3);
+

This description is somewhat misleading, as it refers to PIT instances, whereas the code actually operates on PIT channels 0 and 1.

Actually it is what we have already in the driver, it is just moved around. I'll take the opportunity to change the content if it matters. What about:

"The channels 0 and 1 can be chained to build a 64-bit timer. Let's use the channel 3 as a clockevent and leave the channels 0 and 1 unused for anyone else who needs them."

?

--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog