soc: nxp: imx95: Refine condition to enable MCUX_LPTMR_TIMER#109474
soc: nxp: imx95: Refine condition to enable MCUX_LPTMR_TIMER#109474dbaluta wants to merge 1 commit into
Conversation
| @@ -43,10 +45,7 @@ config NUM_IRQS | |||
| default 250 # 2ND_LVL_ISR_TBL_OFFSET + MAX_IRQ_PER_AGGREGATOR * NUM_2ND_LEVEL_AGGREGATORS | |||
|
|
|||
| config MCUX_LPTMR_TIMER | |||
There was a problem hiding this comment.
suggest using configdefault
There was a problem hiding this comment.
@zejiang0jason this an enhancement. I prefer to fix the issue first.
LaurentiuM1234
left a comment
There was a problem hiding this comment.
this looks wrong. why are we using the same compatible for two different programming models? what if someone enables CONFIG_COUNTER to use LPIT for example? looks like we'll end up with two different drivers operating on the same IP.
|
@LaurentiuM1234 not sure I understand your comment. The code in this patch adds a stricter condition on enabling MCUX_LPTMR_TIMER. So, if someone enables CONFIG_COUNTER then MCUX_LPTMR_TIMER won't be selected by default. |
what I'm trying to point out here is that the way these 2 drivers are handled doesn't seem correct due to the fact that we're trying to use the same compatible for two different programming models. What I'd like to see here is the core problem being fixed. Adding more Kconfig stitching is not it, IMO.
this only seems to work if you set CONFIG_COUNTER=y in the defconfig file. If you set it manually via |
|
@LaurentiuM1234 the entire design looks fishy but at least it looks like both drivers were designed to acknowledge each other. So for example, here is a comment from @Holt-Sun can you please comment on this? @LaurentiuM1234 my fix is indeed not fixing the root cause of the issue but I also don't think it is worse either. It just partially fixes 0c4382a so that we can enable CORTEX_M_SYSTICK. I wonder if it is not a better idea to just revert 0c4382a |
@LaurentiuM1234 and @dbaluta , for LPTMR specifically, I don't think using the same The separation is done at the instance-selection level. So even if This PR only narrows the i.MX95 M7 default so |
|
@dbaluta please do a rebase so we can re-run the CI - issue is unrelated to this. |
For i.MX95 M7 MCUX_LPTMR_TIMER defaults to y if COUNTER_MCUX_LPTMR not enabled. This prevents us on enabling CORTEX_M_SYSTICK. So refine the condition so that MCUX_LPTMR_TIMER only defaults to enabled if COUNTER_MCUX_LPTMR not set (as it is now) and also add condition that zephyr,system-timer is actually set. This also moves DT_CHOSEN_ZEPHYR_SYSTEM_TIMER, DT_CHOSEN_ZEPHYR_SYSTEM_TIMER_PATH definitions at the top of the file. Fixes: 0c4382a ("drivers: timer: keep mcux_lptmr policy explicit") Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
|



For i.MX95 M7 MCUX_LPTMR_TIMER defaults to y if COUNTER_MCUX_LPTMR not enabled.
This prevents us on enabling CORTEX_M_SYSTICK. So refine the condition so that MCUX_LPTMR_TIMER only defaults to enabled if COUNTER_MCUX_LPTMR not set (as it is now) and also add condition that zephyr,system-timer is actually set.
This also moves DT_CHOSEN_ZEPHYR_SYSTEM_TIMER, DT_CHOSEN_ZEPHYR_SYSTEM_TIMER_PATH definitions at the top of the file.
Fixes: 0c4382a ("drivers: timer: keep mcux_lptmr policy explicit")
This also fixes SOF build for i.MX95 thesofproject/sof#10765