Add support for the NXP automotive S32G PIT
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest20 patches 4 repliesIn review
- v220 patches 13 repliesSuperseded
- v120 patches 16 repliesSuperseded
Changelog from the cover letter
- v3:
- Fixed checkpatch warnings (two false positives for 18/20) (Ghennadi Procopciuc)
- Call irq_dispose_mapping on failure (Ghennadi Procopciuc)
- Free irq when the init fails (Ghennadi Procopciuc)
- 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
Patches in v3 No applies recorded yet
Reviews trailers per patch
2 of 20 patches have a Reviewed-by or Acked-by.
| Patch | Arnd Bergmann | Rob Herring (Arm) |
|---|---|---|
| 1/20 | A-b | |
| 2/20 | ||
| 3/20 | ||
| 4/20 | ||
| 5/20 | ||
| 6/20 | ||
| 7/20 | ||
| 8/20 | ||
| 9/20 | ||
| 10/20 | ||
| 11/20 | ||
| 12/20 | ||
| 13/20 | ||
| 14/20 | ||
| 15/20 | ||
| 16/20 | ||
| 17/20 | ||
| 18/20 | ||
| 19/20 | A-b | |
| 20/20 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 00/20] Add support for the NXP automotive S32G PIT
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:
- v3:
- Fixed checkpatch warnings (two false positives for 18/20) (Ghennadi Procopciuc)
- Call irq_dispose_mapping on failure (Ghennadi Procopciuc)
- Free irq when the init fails (Ghennadi Procopciuc)
- 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 | 9 +- drivers/clocksource/Kconfig | 9 +- drivers/clocksource/Makefile | 2 +- drivers/clocksource/timer-nxp-pit.c | 382 ++++++++++++++++++ drivers/clocksource/timer-vf-pit.c | 194 --------- 5 files changed, 396 insertions(+), 200 deletions(-) create mode 100644 drivers/clocksource/timer-nxp-pit.c delete mode 100644 drivers/clocksource/timer-vf-pit.c
Signature · 1 line
2.43.0