[ARM] Support FPGA, fixed IRQ mapping - #290
Merged
gratian merged 4 commits intoAug 25, 2026
Merged
Conversation
chaitu236
marked this pull request as ready for review
August 24, 2026 17:33
chaitu236
force-pushed
the
dev/cvadrevu/fpgaperipheral
branch
2 times, most recently
from
August 24, 2026 20:59
65d0d56 to
04b1bad
Compare
Contributor
Author
|
v3: Added |
The fpgaperipheral driver only binds to devices with the "fpgaperipheral" compatible. Replacing its node with the Zynq devcfg node prevents the driver from probing and breaks FPGA reconfiguration notifications for dependent peripherals. Restore the fpgaperipheral node and disable the inherited devcfg and FPGA region nodes so that only one driver can own the device configuration register range. Fixes: 74561fd ("ARM: dts: ni-zynq: Drop obsolete bindings") Assisted-by: Copilot:GPT-5.6-Sol Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
chaitu236
force-pushed
the
dev/cvadrevu/fpgaperipheral
branch
from
August 24, 2026 22:01
04b1bad to
6e82fcd
Compare
Contributor
Author
|
v4: Fix checkpatch for 'Assisted-by' tags. |
gratian
approved these changes
Aug 24, 2026
gratian
left a comment
There was a problem hiding this comment.
Looks OK overall, just a couple of nitpicks.
Some NI Zynq drivers depend on Linux IRQ numbers matching the corresponding GIC hardware interrupt numbers. The dynamically allocated GIC domain does not preserve that historical numbering contract. Add an NI Zynq-specific option that creates a legacy domain for the primary GIC and pre-associates GIC interrupts starting at 16 with the same Linux IRQ numbers. Fail initialization if the required descriptor range cannot be reserved or the identity mappings cannot be established. Retain the GIC firmware node and existing translation callback so device-tree interrupt specifications continue to work. Also retain the allocation and free callbacks required for current SMP SGI setup. Secondary GICs continue using the normal linear domain. Enable the option in nati_zynq_defconfig. Assisted-by: Copilot:GPT-5.6-Sol Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
macb_close() disconnects the PHY through phylink and clears net_device::phydev. The FPGA notifier subsequently accesses phydev to stop the PHY state machine and release its interrupt, causing a NULL pointer dereference when FPGA programming begins. The FPGA-up path similarly accesses phydev before macb_open() reconnects it. Remove the redundant direct PHY operations from both paths. macb_close() and macb_open() already manage the PHY lifecycle through phylink. Assisted-by: Copilot:GPT-5.6-Sol Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
Suspend device-tree NI 16550 UARTs before FPGA programming and resume them after successful programming. This reinitializes FPGA-backed UARTs, including the serial console, after the FPGA fabric is reconfigured. After suspending a port, replace its register accessors with no-op callbacks to prevent concurrent console or TTY operations from accessing unavailable FPGA MMIO and locking up the system. Restore the normal accessors before resuming the port. Leave ports suspended when programming fails and unregister the FPGA notifier when removing the device. Signed-off-by: Jaeden Amero <jaeden.amero@ni.com> Signed-off-by: Xander Huff <xander.huff@ni.com> Signed-off-by: Brad Mouring <brad.mouring@ni.com> Signed-off-by: Gratian Crisan <gratian.crisan@ni.com> [cvadrevu: reworked from commit dcf0b05 ("8250: Handle FPGA reprogramming")] Assisted-by: Copilot:GPT-5.6-Sol Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
chaitu236
force-pushed
the
dev/cvadrevu/fpgaperipheral
branch
from
August 25, 2026 20:25
6e82fcd to
8895496
Compare
Contributor
Author
|
v5: Address review feedback |
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.
Support FPGA programming and enable fixed IRQ mapping.
WI: AB#3990488
Testing
ni-crio-driver-zynq-dkms, running an IRQ test LV project and verifying irq count increases withgrep atomiczynq /proc/interrupts.