Repository navigation
arch/tricore: Program the system timer without the iLLD (3/n) - #21518
Merged
Merged
Conversation
Contributor
Author
|
Apart from top 3 commits, all the rest is from dependency PR's. |
ssekar15
force-pushed
the
native-2.3-stm
branch
from
November 6, 2026 16:09
d280e7f to
d8b775a
Compare
casaroli
reviewed
Nov 7, 2026
casaroli
left a comment
Contributor
There was a problem hiding this comment.
The body says "- arch/tricore/include/tc3xx/chip.h and tc4xx/chip.h get the STM" definitions, but the series adds arch/tricore/src/common/tricore_stm.h and does not change chip.h.
Fix: name tricore_stm.h in the Summary and Impact sections.
Contributor
|
@parthitce please rebase your patch. |
ssekar15
force-pushed
the
native-2.3-stm
branch
from
November 8, 2026 04:00
d8b775a to
1f3258d
Compare
|
xiaoxiang781216
previously approved these changes
Nov 8, 2026
ssekar15
force-pushed
the
native-2.3-stm
branch
from
November 10, 2026 03:58
1f3258d to
8592b12
Compare
The system timer driver reaches the STM only through the iLLD IfxStm driver and its MODULE_STM0 and SRC names. Add tricore_stm.h with the STM base, interrupt, register offsets and bits of CPU0 for TC3xx and TC4xx, as checked against the TC39xB and TC4Dx iLLD headers. On TC4xx the STM is part of the CPU SFR space, has a single 64-bit timer register and places CMP0OS at bit 1. Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
tricore_systimer.c drives the STM through IfxStm, and the timer setup passes it the iLLD MODULE_STM0 and SRC names, which TC4xx aliases to MODULE_CPU0 and SRC_STMCPU0_SR2 on the command line. Program the STM registers directly with the new STM definitions instead, the same way IfxStm did: hard suspend on halt, CMP0 on the timer bits [31:0] raising STMIR0. Rename the local IFX_CFG_CPU_CLOCK_FREQUENCY, which redefined the iLLD one, and drop the TC4xx aliases. Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Nothing calls the IfxStm functions any more, since the system timer programs the STM itself, so drop IfxStm.c and IfxStm_cfg.c from the TC3xx and TC4xx builds. Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
ssekar15
force-pushed
the
native-2.3-stm
branch
from
November 10, 2026 07:19
8592b12 to
c734545
Compare
Contributor
|
@casaroli @zhangyu-duck rebased to latest. |
xiaoxiang781216
approved these changes
Nov 10, 2026
xiaoxiang781216
approved these changes
Nov 11, 2026
GUIDINGLI
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The TriCore system timer (tricore_systimer.c) drives the STM through the
Infineon iLLD IfxStm driver, and the chip timer setup passes it the iLLD
MODULE_STM0 and SRC names. On TC4xx those names do not exist, so the
build aliases them to MODULE_CPU0 and SRC_STMCPU0_SR2 on the command line.
tricore_systimer.c also defines its own IFX_CFG_CPU_CLOCK_FREQUENCY,
which redefines the iLLD one.
This series adds the STM base, interrupt, register offsets and bits of
CPU0 for TC3xx and TC4xx to a new internal header,
src/common/tricore_stm.h (checked against the TC39xB and TC4Dx iLLD
headers). They are kept out of the public arch/chip/chip.h. On TC4xx the STM is part of the CPU SFR space
and has a single 64-bit timer register. The system timer now programs the
STM registers directly, the same way IfxStm did: hard suspend on halt,
CMP0 on the timer bits [31:0] raising STMIR0. The TC4xx aliases are gone,
and IfxStm.c and IfxStm_cfg.c are no longer built.
Dependency
Depends on #21504.
Impact
TriCore only (arch/tricore).
of both chips.
and the TC4xx MODULE_STM0/SRC_STM0SR0 alias defines are removed.
same as before.
No Kconfig, board defconfig or documentation changes.
Testing
I confirm that changes are verified on local setup and works as intended:
(TC3x), TASKING SmartCode v10.4r1 (TC4x)
triboard_tc4x9_com image
IFX_CFG_CPU_CLOCK_FREQUENCY redefinition in tricore_systimer.c is gone.
Build results (tip):
Runtime, ostest (all four on dca24a78322, the same code with the STM
definitions in chip.h; TC4x7 GCC rerun on the tip d8b775a):