aboutsummaryrefslogtreecommitdiff
path: root/arch/loongarch/include/asm/addrspace.h
diff options
context:
space:
mode:
authorWolfram Sang <wsa@kernel.org>2022-09-16 20:42:18 +0100
committerWolfram Sang <wsa@kernel.org>2022-09-16 20:42:18 +0100
commitd819524d3144f4703f45f473fdc85ad7579ae94c (patch)
tree9bcb29b9b1a24ecf5a1a367c1af7d9be138ba041 /arch/loongarch/include/asm/addrspace.h
parent859d64685d6c868db62b86064769b053db8bf834 (diff)
parent80e78fcce86de0288793a0ef0f6acf37656ee4cf (diff)
Merge tag 'v6.0-rc5' into i2c/for-mergewindow
Linux 6.0-rc5
Diffstat (limited to 'arch/loongarch/include/asm/addrspace.h')
-rw-r--r--arch/loongarch/include/asm/addrspace.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/loongarch/include/asm/addrspace.h b/arch/loongarch/include/asm/addrspace.h
index b91e0733b2e5..d342935e5a72 100644
--- a/arch/loongarch/include/asm/addrspace.h
+++ b/arch/loongarch/include/asm/addrspace.h
@@ -109,4 +109,20 @@ extern unsigned long vm_map_base;
*/
#define PHYSADDR(a) ((_ACAST64_(a)) & TO_PHYS_MASK)
+/*
+ * On LoongArch, I/O ports mappring is following:
+ *
+ * | .... |
+ * |-----------------------|
+ * | pci io ports(16K~32M) |
+ * |-----------------------|
+ * | isa io ports(0 ~16K) |
+ * PCI_IOBASE ->|-----------------------|
+ * | .... |
+ */
+#define PCI_IOBASE ((void __iomem *)(vm_map_base + (2 * PAGE_SIZE)))
+#define PCI_IOSIZE SZ_32M
+#define ISA_IOSIZE SZ_16K
+#define IO_SPACE_LIMIT (PCI_IOSIZE - 1)
+
#endif /* _ASM_ADDRSPACE_H */