[PATCH] arm: Enlarge IO_SPACE_LIMIT needed for some SoC

From: Ansuel Smith
Date: Mon May 10 2021 - 22:17:07 EST


Ipq8064 SoC requires larger IO_SPACE_LIMIT on second and third pci port.
Each pci line I/O space require 0x100000 and the current limit in the
specific case of ipq8064 cause the malfunction of the second and the
third line that are commonly used for wifi cards.
Current IO space is set to support only 0x100000 space while for ipq806x
if all 3 pcie lines are connected, it's required 0x300000 of space.
Update the IO_SPACE_LIMIT to permit this larger space and update the
documentation for the Mapping PCI I/O space memory end to the new value
of ff0fffff.

Signed-off-by: Ansuel Smith <ansuelsmth@xxxxxxxxx>
---
Documentation/arm/memory.rst | 2 +-
arch/arm/include/asm/io.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/arm/memory.rst b/Documentation/arm/memory.rst
index 0cb1e2938823..938fe74c9020 100644
--- a/Documentation/arm/memory.rst
+++ b/Documentation/arm/memory.rst
@@ -53,7 +53,7 @@ ffc00000 ffc7ffff Guard region
ff800000 ffbfffff Permanent, fixed read-only mapping of the
firmware provided DT blob

-fee00000 feffffff Mapping of PCI I/O space. This is a static
+fee00000 ff0fffff Mapping of PCI I/O space. This is a static
mapping within the vmalloc space.

VMALLOC_START VMALLOC_END-1 vmalloc() / ioremap() space.
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index fc748122f1e0..76f1c668df5e 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -197,7 +197,7 @@ void __iomem *pci_remap_cfgspace(resource_size_t res_cookie, size_t size);
#ifdef CONFIG_NEED_MACH_IO_H
#include <mach/io.h>
#elif defined(CONFIG_PCI)
-#define IO_SPACE_LIMIT ((resource_size_t)0xfffff)
+#define IO_SPACE_LIMIT ((resource_size_t)0x2fffff)
#define __io(a) __typesafe_io(PCI_IO_VIRT_BASE + ((a) & IO_SPACE_LIMIT))
#else
#define __io(a) __typesafe_io((a) & IO_SPACE_LIMIT)
--
2.30.2