MIPS: Loongson 3: Add HT-linked PCI support
[firefly-linux-kernel-4.4.55.git] / arch / mips / include / asm / mach-loongson / loongson.h
index 5913ea064ebeeadab6d78669dafea0e4498b2d3d..f0367ffbf8c189aeac9d3c9ff24abb0399686d33 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/init.h>
 #include <linux/irq.h>
 #include <linux/kconfig.h>
+#include <boot_param.h>
 
 /* loongson internal northbridge initialization */
 extern void bonito_irq_init(void);
@@ -101,7 +102,13 @@ static inline void do_perfcnt_IRQ(void)
 #define LOONGSON_PCICFG_BASE   0x1fe80000
 #define LOONGSON_PCICFG_SIZE   0x00000800      /* 2K */
 #define LOONGSON_PCICFG_TOP    (LOONGSON_PCICFG_BASE+LOONGSON_PCICFG_SIZE-1)
+
+#if defined(CONFIG_HT_PCI)
+#define LOONGSON_PCIIO_BASE    loongson_sysconf.pci_io_base
+#else
 #define LOONGSON_PCIIO_BASE    0x1fd00000
+#endif
+
 #define LOONGSON_PCIIO_SIZE    0x00100000      /* 1M */
 #define LOONGSON_PCIIO_TOP     (LOONGSON_PCIIO_BASE+LOONGSON_PCIIO_SIZE-1)