linux-stable/arch
Pali Rohár 59a446e26e arm64: dts: marvell: armada-37xx: Extend PCIe MEM space
commit 514ef1e62d upstream.

Current PCIe MEM space of size 16 MB is not enough for some combination
of PCIe cards (e.g. NVMe disk together with ath11k wifi card). ARM Trusted
Firmware for Armada 3700 platform already assigns 128 MB for PCIe window,
so extend PCIe MEM space to the end of 128 MB PCIe window which allows to
allocate more PCIe BARs for more PCIe cards.

Without this change some combination of PCIe cards cannot be used and
kernel show error messages in dmesg during initialization:

    pci 0000:00:00.0: BAR 8: no space for [mem size 0x01800000]
    pci 0000:00:00.0: BAR 8: failed to assign [mem size 0x01800000]
    pci 0000:00:00.0: BAR 6: assigned [mem 0xe8000000-0xe80007ff pref]
    pci 0000:01:00.0: BAR 8: no space for [mem size 0x01800000]
    pci 0000:01:00.0: BAR 8: failed to assign [mem size 0x01800000]
    pci 0000:02:03.0: BAR 8: no space for [mem size 0x01000000]
    pci 0000:02:03.0: BAR 8: failed to assign [mem size 0x01000000]
    pci 0000:02:07.0: BAR 8: no space for [mem size 0x00100000]
    pci 0000:02:07.0: BAR 8: failed to assign [mem size 0x00100000]
    pci 0000:03:00.0: BAR 0: no space for [mem size 0x01000000 64bit]
    pci 0000:03:00.0: BAR 0: failed to assign [mem size 0x01000000 64bit]

Due to bugs in U-Boot port for Turris Mox, the second range in Turris Mox
kernel DTS file for PCIe must start at 16 MB offset. Otherwise U-Boot
crashes during loading of kernel DTB file. This bug is present only in
U-Boot code for Turris Mox and therefore other Armada 3700 devices are not
affected by this bug. Bug is fixed in U-Boot version 2021.07.

To not break booting new kernels on existing versions of U-Boot on Turris
Mox, use first 16 MB range for IO and second range with rest of PCIe window
for MEM.

Signed-off-by: Pali Rohár <pali@kernel.org>
Fixes: 76f6386b25 ("arm64: dts: marvell: Add Aardvark PCIe support for Armada 3700")
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-06 15:05:07 +02:00
..
alpha alpha: Declare virt_to_phys and virt_to_bus parameter as pointer to volatile 2021-10-06 15:05:07 +02:00
arc ARC: export clear_user_page() for modules 2021-09-22 11:45:35 +02:00
arm ARM: tegra: tamonten: Fix UART pad setting 2021-09-22 11:45:30 +02:00
arm64 arm64: dts: marvell: armada-37xx: Extend PCIe MEM space 2021-10-06 15:05:07 +02:00
blackfin
c6x
cris
frv
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 2021-02-23 14:00:33 +01:00
hexagon hexagon: use common DISCARDS macro 2021-07-20 16:17:54 +02:00
ia64 ia64: mca_drv: fix incorrect array size calculation 2021-07-20 16:17:34 +02:00
m32r
m68k m68k: Double cast io functions to unsigned long 2021-10-06 15:05:06 +02:00
metag
microblaze
mips MIPS: Malta: fix alignment of the devicetree buffer 2021-09-22 11:45:26 +02:00
mn10300
nios2
openrisc openrisc: don't printk() unconditionally 2021-09-22 11:45:26 +02:00
parisc parisc: Use absolute_pointer() to define PAGE0 2021-10-06 15:05:07 +02:00
powerpc powerpc/perf/hv-gpci: Fix counter value parsing 2021-09-22 11:45:24 +02:00
s390 s390/bpf: Fix optimizing out zero-extensions 2021-09-26 13:37:27 +02:00
score
sh sh: dma: fix kconfig dependency for G2_DMA 2021-01-30 13:31:15 +01:00
sparc sparc: avoid stringop-overread errors 2021-10-06 15:05:07 +02:00
tile
um um: fix error return code in winch_tramp() 2021-07-20 16:17:53 +02:00
unicore32
x86 xen/x86: fix PV trap handling on secondary processors 2021-10-06 15:05:04 +02:00
xtensa xtensa: ISS: don't panic in rs_init 2021-09-22 11:45:29 +02:00
.gitignore
Kconfig mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race 2020-11-18 18:28:03 +01:00