From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: daniel.lezcano@linaro.org, tglx@linutronix.de
Cc: S32@nxp.com, linux-kernel@vger.kernel.org,
ghennadi.procopciuc@oss.nxp.com
Subject: [PATCH v2 00/20] Add support for the NXP automotive S32G PIT
Date: Wed, 30 Jul 2025 10:27:02 +0200 [thread overview]
Message-ID: <20250730082725.183133-1-daniel.lezcano@linaro.org> (raw)
The S32G platform has a couple of Programable Interrupt Timer
(PIT). This timer is the same IP as the one found on the Vybrid Family
platform. The main difference is there are multiple instances of this
timer on the S32G.
Before bringing the support for the S32G in the driver, a
pre-requesite must be accomplished to support multiple instances of
the timer in the driver. While at it, take also the opportunity to
clean up the code and make it consistent with the NXP STM timer which
looks similar to the PIT.
The two changes fix the raw_(readl|writel) usage where it is replaced
by readl|writel. In order to compile test the changes, the Kconfig
COMPILE_TEST option is added.
The other changes encapsulate more the codes into self-explanatory
functions, allow to pass the per instance information as parameters to
functions and use different names for the timers in order to be able
to distinguish them.
The last two changes provide the DT bindings and the S32G specific
changes to support multiple instances.
Changelog:
- v2:
- Added a cover letter (Ghennadi Procopciuc)
- Fixed typo in descriptions (Ghennadi Procopciuc)
- Clarified comment about channel usage (Ghennadi Procopciuc)
- Added a description for the bindings (Rob Herring)
- Initialized sched_clock global variable (Ghennadi Procopciuc)
- Changed type for the 'cpu' parameter s/int/unsigned int/ (Ghennadi Procopciuc)
- Fixed wrong bitwise negation when reading the counter (Ghennadi Procopciuc)
- Changed type s/int/u32/ for writel (Ghennadi Procopciuc)
- Clarified changelog with S32G support (Ghennadi Procopciuc)
- v1: Initial post
Daniel Lezcano (20):
clocksource/drivers/vf-pit: Replace raw_readl/writel to reald/writel
clocksource/drivers/vf-pit: Add COMPILE_TEST option
clocksource/drivers/vf-pit: Set the scene for multiple timers
clocksource/drivers/vf-pit: Rework the base address usage
clocksource/drivers/vf-pit: Pass the cpu number as parameter
clocksource/drivers/vf-pit: Encapsulate the initialization of the
cycles_per_jiffy
clocksource/drivers/vf-pit: Allocate the struct timer at init time
clocksource/drivers/vf-pit: Convert raw values to BIT macros
clocksource/drivers/vf-pit: Register the clocksource from the driver
clocksource/drivers/vf-pit: Encapsulate the macros
clocksource/drivers/vf-pit: Encapsulate the PTLCVAL macro
clocksource/drivers/vf-pit: Use the node name for the interrupt and
timer names
clocksource/drivers/vf-pit: Encapsulate clocksource enable / disable
clocksource/drivers/vf-pit: Enable and disable module on error
clocksource/drivers/vf-pit: Encapsulate set counter function
clocksource/drivers/vf-pit: Consolidate calls to pit_*_disable/enable
clocksource/drivers/vf-pit: Unify the function name for irq ack
clocksource/drivers/vf-pit: Rename the VF PIT to NXP PIT
dt: bindings: fsl,vf610-pit: Add compatible for s32g2 and s32g3
clocksource/drivers/nxp-pit: Add NXP Automotive s32g2 / s32g3 support
.../bindings/timer/fsl,vf610-pit.yaml | 8 +-
drivers/clocksource/Kconfig | 9 +-
drivers/clocksource/Makefile | 2 +-
drivers/clocksource/timer-nxp-pit.c | 371 ++++++++++++++++++
drivers/clocksource/timer-vf-pit.c | 194 ---------
5 files changed, 384 insertions(+), 200 deletions(-)
create mode 100644 drivers/clocksource/timer-nxp-pit.c
delete mode 100644 drivers/clocksource/timer-vf-pit.c
--
2.43.0
next reply other threads:[~2025-07-30 8:28 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-30 8:27 Daniel Lezcano [this message]
2025-07-30 8:27 ` [PATCH v2 01/20] clocksource/drivers/vf-pit: Replace raw_readl/writel to reald/writel Daniel Lezcano
2025-07-30 8:27 ` [PATCH v2 02/20] clocksource/drivers/vf-pit: Add COMPILE_TEST option Daniel Lezcano
2025-07-30 8:27 ` [PATCH v2 03/20] clocksource/drivers/vf-pit: Set the scene for multiple timers Daniel Lezcano
2025-07-30 8:27 ` [PATCH v2 04/20] clocksource/drivers/vf-pit: Rework the base address usage Daniel Lezcano
2025-07-30 8:27 ` [PATCH v2 05/20] clocksource/drivers/vf-pit: Pass the cpu number as parameter Daniel Lezcano
2025-07-30 8:27 ` [PATCH v2 06/20] clocksource/drivers/vf-pit: Encapsulate the initialization of the cycles_per_jiffy Daniel Lezcano
2025-07-30 8:27 ` [PATCH v2 07/20] clocksource/drivers/vf-pit: Allocate the struct timer at init time Daniel Lezcano
2025-08-01 7:33 ` Ghennadi Procopciuc
2025-08-04 9:12 ` Daniel Lezcano
2025-08-04 10:02 ` Ghennadi Procopciuc
2025-07-30 8:27 ` [PATCH v2 08/20] clocksource/drivers/vf-pit: Convert raw values to BIT macros Daniel Lezcano
2025-07-30 8:27 ` [PATCH v2 09/20] clocksource/drivers/vf-pit: Register the clocksource from the driver Daniel Lezcano
2025-07-30 8:27 ` [PATCH v2 10/20] clocksource/drivers/vf-pit: Encapsulate the macros Daniel Lezcano
2025-08-01 7:33 ` Ghennadi Procopciuc
2025-07-30 8:27 ` [PATCH v2 11/20] clocksource/drivers/vf-pit: Encapsulate the PTLCVAL macro Daniel Lezcano
2025-08-01 7:34 ` Ghennadi Procopciuc
2025-07-30 8:27 ` [PATCH v2 12/20] clocksource/drivers/vf-pit: Use the node name for the interrupt and timer names Daniel Lezcano
2025-07-30 8:27 ` [PATCH v2 13/20] clocksource/drivers/vf-pit: Encapsulate clocksource enable / disable Daniel Lezcano
2025-07-30 8:27 ` [PATCH v2 14/20] clocksource/drivers/vf-pit: Enable and disable module on error Daniel Lezcano
2025-07-30 8:27 ` [PATCH v2 15/20] clocksource/drivers/vf-pit: Encapsulate set counter function Daniel Lezcano
2025-07-30 8:27 ` [PATCH v2 16/20] clocksource/drivers/vf-pit: Consolidate calls to pit_*_disable/enable Daniel Lezcano
2025-07-30 8:27 ` [PATCH v2 17/20] clocksource/drivers/vf-pit: Unify the function name for irq ack Daniel Lezcano
2025-08-01 7:34 ` Ghennadi Procopciuc
2025-07-30 8:27 ` [PATCH v2 18/20] clocksource/drivers/vf-pit: Rename the VF PIT to NXP PIT Daniel Lezcano
2025-08-01 7:35 ` Ghennadi Procopciuc
2025-08-01 8:48 ` Daniel Lezcano
2025-07-30 8:27 ` [PATCH v2 19/20] dt: bindings: fsl,vf610-pit: Add compatible for s32g2 and s32g3 Daniel Lezcano
2025-07-30 23:36 ` Rob Herring
2025-07-31 7:41 ` Daniel Lezcano
2025-07-31 7:50 ` Krzysztof Kozlowski
2025-07-31 8:24 ` Daniel Lezcano
2025-07-30 8:27 ` [PATCH v2 20/20] clocksource/drivers/nxp-pit: Add NXP Automotive s32g2 / s32g3 support Daniel Lezcano
2025-08-01 7:36 ` Ghennadi Procopciuc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250730082725.183133-1-daniel.lezcano@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=S32@nxp.com \
--cc=ghennadi.procopciuc@oss.nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).