xtensa: virt: move PCI root complex to KIO range
authorMax Filippov <jcmvbkbc@gmail.com>
Mon, 2 Sep 2019 06:55:49 +0000 (23:55 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 2 Sep 2019 07:09:30 +0000 (00:09 -0700)
Move PCI configuration space, MMIO and memory to the KIO range to free
vmalloc area and use static TLB to access them. Move MMIO to the
beginning of KIO and define PCI_IOBASE as XCHAL_KIO_BYPASS_VADDR to
match it. Reduce number of supported PCI buses to 0x3f so that ECAM
window fits into first 64MB of the KIO. Reduce size of the PCI memory
window to 128MB so that it fits into KIO.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/boot/dts/virt.dts
arch/xtensa/include/asm/io.h

index 6aecbc0f3549ae6c039e19b24b33b880755cfb7f..a9dcd87b6eb1ee894fc540d173dcd77030ed54da 100644 (file)
                #size-cells = <2>;
                #interrupt-cells = <0x1>;
 
-               bus-range = <0x0 0x3f>;
-               reg = <0xc0000000 0x04000000>;
+               bus-range = <0x0 0x3e>;
+               reg = <0xf0100000 0x03f00000>;
 
                     // BUS_ADDRESS(3)  CPU_PHYSICAL(1)  SIZE(2)
-               ranges = <0x01000000 0x0 0xc4000000  0xc4000000  0x0 0x04000000>,
-                        <0x02000000 0x0 0xc8000000  0xc8000000  0x0 0x18000000>;
+               ranges = <0x01000000 0x0 0xf0000000  0xf0000000  0x0 0x00010000>,
+                        <0x02000000 0x0 0xf4000000  0xf4000000  0x0 0x08000000>;
 
                     // PCI_DEVICE(3)  INT#(1)  CONTROLLER(PHANDLE)  CONTROLLER_DATA(2)
                interrupt-map = <
index da3e783f896b34c3fd60cfc94a1aa44a6465365b..988e08530a5c77aeee213a80d015b33e66b95e08 100644 (file)
@@ -21,6 +21,7 @@
 
 #define IOADDR(x)              (XCHAL_KIO_BYPASS_VADDR + (x))
 #define IO_SPACE_LIMIT ~0
+#define PCI_IOBASE             ((void __iomem *)XCHAL_KIO_BYPASS_VADDR)
 
 #ifdef CONFIG_MMU