drivers: gpio: xlnx_ps: Do not clear GPIO states on initialization #89424
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.
This driver was setting all GPIO lines to input and the data register to zero on initialization. This does not appear to be common practice among other GPIO drivers, and in fact caused a serious problem on the ZynqMP platform, where between 1 and 4 of the top-most GPIO lines are frequently used by platform firmware and Vivado as reset lines for the programmable logic. Since these resets are active low, and their input/output state is ignored due to how they are connected to the EMIO GPIO outputs from the PS, this caused the PL reset to be asserted when the GPIO driver initialized, preventing any logic using that reset from functioning properly.
There may also be other cases where GPIO line states have already been set by the boot loader or firmware and clearing them may result in improper behavior or glitches on the lines during initialization.
Update the driver to disable GPIO interrupts but leave the pin modes/states unchanged until/unless they are explicitly reconfigured.