-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Imx943 change irqsteer driver as native driver #99187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Imx943 change irqsteer driver as native driver #99187
Conversation
LaurentiuM1234
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial comments below.
Most importantly: please don't change anything in the driver unless it's related to the fact that you're dropping the HAL API. This is an important change and by doing so you're making the review harder and easier to miss out the important stuff.
If you really want to make some unrelated changes then please do so in a separate commit with the appropriate justification.
Also, please make sure you don't break bisectability (see comment from binding). Make sure that after you apply each commit, the affected boards will still compile.
| reg: | ||
| required: true | ||
|
|
||
| irq_offset: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need this?
CC: @yongxu-wang15
sure, np. |
900da9d to
4268eb0
Compare
121c460 to
c1686ee
Compare
|
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
e71bd4f to
fa891fd
Compare
This adds priority attribute to irqsteer in order to support multi level interrupts. We need to make this change atomic so that we don't break the build. So, we introduce a new property named 'priority' to `interrupt-cells` and we increase the number of cells. Then we update all instances of interrupts using irqsteer (for imx95, imx8m, imx8qm, imx8qxp and also update the overlay(imx8mp_evk_mimx8ml8_adsp) for tests. Signed-off-by: Biwen Li <[email protected]>
Supporting irqsteer using NXP HAL becomes increasingly harder with new SoCs. For example now there are two incompatible HAL drivers for IRQ steer (mcux-sdk-ng/drivers/irqsteer and mcux-sdk-ng/drivers/irqsteer_1). In order to avoid overcomplicating code and better scaling code for newer SoCs just drop using the NXP HAL and implement an IRQ Steer native Zephyr driver Use irqsteer node of imx943 as example. New features: - Support multiple irqsteer instances. - Indroduce new properties(nxp,irq-offset, nxp,num-irqs). Signed-off-by: Biwen Li <[email protected]>
This commit enables multi level interrupts: - Enable multi level interrupts imx943 is a two level interrupts system and some interrupts(eg. edma interrupts) depend on irqsteer. - Increase irq number from 405 to 790 Actually there are 407(IRQ 0 ~ IRQ 406) interrupts from nvic(first level interrupts), The second level interrupts are extended by irqsteer, it extends 32 x 12 = 384 interrupts, So first level interrupts + second level interrupts = 407 + 384 = 791(IRQ 0 ~ IRQ 790) interrupts Signed-off-by: Biwen Li <[email protected]>
Enable edma4 by default for lpuart8 of m33(in NETCMIX) of imx943_evk Signed-off-by: Biwen Li <[email protected]>
Add config for imx943_evk_mimx94398_m33 - Use the sample to test the irqsteer driver Signed-off-by: Biwen Li <[email protected]>
This commit fixes build issue when multi level interrupts feature
is enabled, define new macro TEST_1ST_LEVEL_INTERRUPTS_MAX to
support multi level interrupts case.
- error: array subscript 24 is above array bounds of 'volatile
uint32_t[16]' {aka 'volatile unsigned int[16]'}
[-Werror=array-bounds])
Signed-off-by: Biwen Li <[email protected]>
Fix build issue when multi level interrupts is enabled,
define new macro TEST_1ST_LEVEL_INTERRUPTS_MAX to support multi
level interrupts case.
- core_cm33.h:2559:47: error: iteration 496 invokes undefined behavior
[-Werror=aggressive-loop-optimizations]
Signed-off-by: Biwen Li <[email protected]>
Exclude imx943,
- multi level interrupts feature is enabled defaultly,
so irqsteer1 driver is enabled, then the test case
report the build issue:
multiple definition of z_soc_irq_enable,
tests/arch/arm/arm_custom_interrupt/src/arm_custom_interrupt.c:47
first defined here.
Signed-off-by: Biwen Li <[email protected]>
Add irqsteer node for m7_0. Signed-off-by: Biwen Li <[email protected]>
Add irqsteer node for m7_1. Signed-off-by: Biwen Li <[email protected]>
Add edma2 node for lpuart3. Signed-off-by: Biwen Li <[email protected]>
Enable edma2 defaultly. Signed-off-by: Biwen Li <[email protected]>
Add more irqsteer masters. Signed-off-by: Biwen Li <[email protected]>
Add disp_irqsteer node(this is another irqsteer instance). Signed-off-by: Biwen Li <[email protected]>
This commit enables tests/driver/uart/async_api demo for m33 in NETCMIX of imx943_evk. - build command as follows, west build -p always -b imx943_evk/mimx94398/m33 tests/drivers/uart/uart_async_api Signed-off-by: Biwen Li <[email protected]>
Fix build issues,
- error: format %x expects argument of type
unsigned int, but argument 7 has type ssize_t
{aka long int} [-Werror=format=]
zassert_false(ret < 0, "attr->read returned unexpected (err 0x%02x)"
, BT_GATT_ERR(ret));
Signed-off-by: Biwen Li <[email protected]>
fa891fd to
796126b
Compare
|



Change irqsteer driver as a zephyr native driver.
There are two irqsteer drivers in mcux sdk(mcux-sdk-ng/drivers/irqsteer and mcux-sdk-ng/drivers/irqsteer_1) and the APIs are not compatible. mcux-sdk-ng/drivers/irqsteer_1 just likes a native irqsteer driver(Refer to the linux irqsteer driver: drivers/irqchip/irq-imx-irqsteer.c). So change it as a native driver directly.