Skip to content
Snippets Groups Projects
Commit 5a553d6b authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Lorenzo Pieralisi
Browse files

PCI: mvebu: Use resource_size() to remap I/O space


Instead of hardcoding the remapping of IO_SPACE_LIMIT - SZ_64K, use
resource_size().

However, we cannot use just IO_SPACE_LIMIT, because pci_ioremap_io() has
a bug and doesn't allow remapping the last 64 KB before IO_SPACE_LIMIT,
so we ensure that we do not exceed this limit. When the pci_ioremap_io()
issue is fixed, this work around can be dropped.

Note that this workaround already existed, since we were mapping only
up to IO_SPACE_LIMIT - SZ_64K.

Suggested-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@bootlin.com>
[lorenzo.pieralisi@arm.com: tweaked the commit log]
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
parent ee160438
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment