Skip to content
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

drivers: gpio: xlnx_ps: switch driver over to DEVICE_MMIO mapping #78255

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

ibirnbaum
Copy link
Member

Set up a named device MMIO memory mapping in the GPIO controller's parent device, map the virtual memory in the init function of the parent device.

Once the controller's register space has been successfully mapped, propagate the mapped virtual address to all child (= GPIO bank) devices. While it is possible to add a named mapping to every single GPIO bank device and initialize it in the respective bank device's init function, this would result in multiple virtual address mappings all pointing to the same 4k of physical memory. I assume that, although all those mappings having the same attributes, such a setup is at least discouraged.

drivers/gpio/gpio_xlnx_ps.c Outdated Show resolved Hide resolved
drivers/gpio/gpio_xlnx_ps.c Outdated Show resolved Hide resolved
Set up a named device MMIO memory mapping in the GPIO controller's
parent device, map the virtual memory in the init function of the
parent device.

Once the controller's register space has been successfully mapped,
propagate the mapped virtual address to all child (= GPIO bank)
devices. While it is possible to add a named mapping to every
single GPIO bank device and initialize it in the respective bank
device's init function, this would result in multiple virtual
address mappings all pointing to the same 4k of physical memory.
I assume that, although all those mappings having the same attri-
butes, such a setup is at least discouraged.

Signed-off-by: Immo Birnbaum <[email protected]>
Remove the PS GPIO controller's static MMU region entry from the
mmu_regions table for both the XC7Zxxx and XC7ZxxxS variants of the
Zynq 7000.

The PS GPIO controller's device driver has been switched over to
using a named DEVICE_MMIO mapping.

Signed-off-by: Immo Birnbaum <[email protected]>
@ibirnbaum
Copy link
Member Author

Re-based due to the adoption of #82180.

@kartben kartben merged commit d789f33 into zephyrproject-rtos:main Dec 19, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants