diff options
author | Huacai Chen <chenhc@lemote.com> | 2014-03-21 06:44:07 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-03-31 12:17:12 -0400 |
commit | 0e476d91244ec6a9f6be3eb1963627340d031f99 (patch) | |
tree | 0d90f0b1d4d3a5190100a06ffefa7f547ac63bf8 /arch/mips | |
parent | 1299b0e05e106f621fff1504df5251f2a678097e (diff) |
MIPS: Loongson: Add Loongson-3 Kconfig options
Added Kconfig options include: Loongson-3 CPU and machine definition,
CPU cache features, UEFI-like firmware interface (LEFI), HT-linked PCI,
and swiotlb support.
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Hongliang Tao <taohl@lemote.com>
Signed-off-by: Hua Yan <yanh@lemote.com>
Tested-by: Alex Smith <alex.smith@imgtec.com>
Reviewed-by: Alex Smith <alex.smith@imgtec.com>
Cc: John Crispin <john@phrozen.org>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: linux-mips@linux-mips.org
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/6637
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/Kconfig | 29 | ||||
-rw-r--r-- | arch/mips/loongson/Kconfig | 46 | ||||
-rw-r--r-- | arch/mips/loongson/Platform | 1 |
3 files changed, 75 insertions, 1 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 5a95acafcd05..a5ea11d8ec4e 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -1153,6 +1153,18 @@ choice | |||
1153 | prompt "CPU type" | 1153 | prompt "CPU type" |
1154 | default CPU_R4X00 | 1154 | default CPU_R4X00 |
1155 | 1155 | ||
1156 | config CPU_LOONGSON3 | ||
1157 | bool "Loongson 3 CPU" | ||
1158 | depends on SYS_HAS_CPU_LOONGSON3 | ||
1159 | select CPU_SUPPORTS_64BIT_KERNEL | ||
1160 | select CPU_SUPPORTS_HIGHMEM | ||
1161 | select CPU_SUPPORTS_HUGEPAGES | ||
1162 | select WEAK_ORDERING | ||
1163 | select WEAK_REORDERING_BEYOND_LLSC | ||
1164 | help | ||
1165 | The Loongson 3 processor implements the MIPS64R2 instruction | ||
1166 | set with many extensions. | ||
1167 | |||
1156 | config CPU_LOONGSON2E | 1168 | config CPU_LOONGSON2E |
1157 | bool "Loongson 2E" | 1169 | bool "Loongson 2E" |
1158 | depends on SYS_HAS_CPU_LOONGSON2E | 1170 | depends on SYS_HAS_CPU_LOONGSON2E |
@@ -1549,6 +1561,10 @@ config CPU_BMIPS5000 | |||
1549 | select SYS_SUPPORTS_SMP | 1561 | select SYS_SUPPORTS_SMP |
1550 | select SYS_SUPPORTS_HOTPLUG_CPU | 1562 | select SYS_SUPPORTS_HOTPLUG_CPU |
1551 | 1563 | ||
1564 | config SYS_HAS_CPU_LOONGSON3 | ||
1565 | bool | ||
1566 | select CPU_SUPPORTS_CPUFREQ | ||
1567 | |||
1552 | config SYS_HAS_CPU_LOONGSON2E | 1568 | config SYS_HAS_CPU_LOONGSON2E |
1553 | bool | 1569 | bool |
1554 | 1570 | ||
@@ -1761,7 +1777,7 @@ choice | |||
1761 | 1777 | ||
1762 | config PAGE_SIZE_4KB | 1778 | config PAGE_SIZE_4KB |
1763 | bool "4kB" | 1779 | bool "4kB" |
1764 | depends on !CPU_LOONGSON2 | 1780 | depends on !CPU_LOONGSON2 && !CPU_LOONGSON3 |
1765 | help | 1781 | help |
1766 | This option select the standard 4kB Linux page size. On some | 1782 | This option select the standard 4kB Linux page size. On some |
1767 | R3000-family processors this is the only available page size. Using | 1783 | R3000-family processors this is the only available page size. Using |
@@ -2493,6 +2509,17 @@ config PCI | |||
2493 | your box. Other bus systems are ISA, EISA, or VESA. If you have PCI, | 2509 | your box. Other bus systems are ISA, EISA, or VESA. If you have PCI, |
2494 | say Y, otherwise N. | 2510 | say Y, otherwise N. |
2495 | 2511 | ||
2512 | config HT_PCI | ||
2513 | bool "Support for HT-linked PCI" | ||
2514 | default y | ||
2515 | depends on CPU_LOONGSON3 | ||
2516 | select PCI | ||
2517 | select PCI_DOMAINS | ||
2518 | help | ||
2519 | Loongson family machines use Hyper-Transport bus for inter-core | ||
2520 | connection and device connection. The PCI bus is a subordinate | ||
2521 | linked at HT. Choose Y for Loongson-3 based machines. | ||
2522 | |||
2496 | config PCI_DOMAINS | 2523 | config PCI_DOMAINS |
2497 | bool | 2524 | bool |
2498 | 2525 | ||
diff --git a/arch/mips/loongson/Kconfig b/arch/mips/loongson/Kconfig index 263beb9322a8..a5d46f5efe03 100644 --- a/arch/mips/loongson/Kconfig +++ b/arch/mips/loongson/Kconfig | |||
@@ -59,6 +59,35 @@ config LEMOTE_MACH2F | |||
59 | 59 | ||
60 | These family machines include fuloong2f mini PC, yeeloong2f notebook, | 60 | These family machines include fuloong2f mini PC, yeeloong2f notebook, |
61 | LingLoong allinone PC and so forth. | 61 | LingLoong allinone PC and so forth. |
62 | |||
63 | config LEMOTE_MACH3A | ||
64 | bool "Lemote Loongson 3A family machines" | ||
65 | select ARCH_SPARSEMEM_ENABLE | ||
66 | select GENERIC_ISA_DMA_SUPPORT_BROKEN | ||
67 | select GENERIC_HARDIRQS_NO__DO_IRQ | ||
68 | select BOOT_ELF32 | ||
69 | select BOARD_SCACHE | ||
70 | select CSRC_R4K | ||
71 | select CEVT_R4K | ||
72 | select CPU_HAS_WB | ||
73 | select HW_HAS_PCI | ||
74 | select ISA | ||
75 | select HT_PCI | ||
76 | select I8259 | ||
77 | select IRQ_CPU | ||
78 | select NR_CPUS_DEFAULT_4 | ||
79 | select SYS_HAS_CPU_LOONGSON3 | ||
80 | select SYS_HAS_EARLY_PRINTK | ||
81 | select SYS_SUPPORTS_SMP | ||
82 | select SYS_SUPPORTS_64BIT_KERNEL | ||
83 | select SYS_SUPPORTS_HIGHMEM | ||
84 | select SYS_SUPPORTS_LITTLE_ENDIAN | ||
85 | select LOONGSON_MC146818 | ||
86 | select ZONE_DMA32 | ||
87 | select LEFI_FIRMWARE_INTERFACE | ||
88 | help | ||
89 | Lemote Loongson 3A family machines utilize the 3A revision of | ||
90 | Loongson processor and RS780/SBX00 chipset. | ||
62 | endchoice | 91 | endchoice |
63 | 92 | ||
64 | config CS5536 | 93 | config CS5536 |
@@ -86,8 +115,25 @@ config LOONGSON_UART_BASE | |||
86 | default y | 115 | default y |
87 | depends on EARLY_PRINTK || SERIAL_8250 | 116 | depends on EARLY_PRINTK || SERIAL_8250 |
88 | 117 | ||
118 | config IOMMU_HELPER | ||
119 | bool | ||
120 | |||
121 | config NEED_SG_DMA_LENGTH | ||
122 | bool | ||
123 | |||
124 | config SWIOTLB | ||
125 | bool "Soft IOMMU Support for All-Memory DMA" | ||
126 | default y | ||
127 | depends on CPU_LOONGSON3 | ||
128 | select IOMMU_HELPER | ||
129 | select NEED_SG_DMA_LENGTH | ||
130 | select NEED_DMA_MAP_STATE | ||
131 | |||
89 | config LOONGSON_MC146818 | 132 | config LOONGSON_MC146818 |
90 | bool | 133 | bool |
91 | default n | 134 | default n |
92 | 135 | ||
136 | config LEFI_FIRMWARE_INTERFACE | ||
137 | bool | ||
138 | |||
93 | endif # MACH_LOONGSON | 139 | endif # MACH_LOONGSON |
diff --git a/arch/mips/loongson/Platform b/arch/mips/loongson/Platform index 29692e5433b1..6205372b6c2d 100644 --- a/arch/mips/loongson/Platform +++ b/arch/mips/loongson/Platform | |||
@@ -30,3 +30,4 @@ platform-$(CONFIG_MACH_LOONGSON) += loongson/ | |||
30 | cflags-$(CONFIG_MACH_LOONGSON) += -I$(srctree)/arch/mips/include/asm/mach-loongson -mno-branch-likely | 30 | cflags-$(CONFIG_MACH_LOONGSON) += -I$(srctree)/arch/mips/include/asm/mach-loongson -mno-branch-likely |
31 | load-$(CONFIG_LEMOTE_FULOONG2E) += 0xffffffff80100000 | 31 | load-$(CONFIG_LEMOTE_FULOONG2E) += 0xffffffff80100000 |
32 | load-$(CONFIG_LEMOTE_MACH2F) += 0xffffffff80200000 | 32 | load-$(CONFIG_LEMOTE_MACH2F) += 0xffffffff80200000 |
33 | load-$(CONFIG_CPU_LOONGSON3) += 0xffffffff80200000 | ||