linux-mips
[Top] [All Lists]

[PATCH V6 10/15] MIPS: Loongson: Add Loongson-3 Kconfig options

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH V6 10/15] MIPS: Loongson: Add Loongson-3 Kconfig options
From: Huacai Chen <chenhc@lemote.com>
Date: Fri, 17 Aug 2012 16:43:30 +0800
Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Fuxin Zhang <zhangfx@lemote.com>, Zhangjin Wu <wuzhangjin@gmail.com>, Huacai Chen <chenhc@lemote.com>, Hongliang Tao <taohl@lemote.com>, Hua Yan <yanh@lemote.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=81f2dQ2f6dBPCTYnwP+f9ucMbZt4HBFDkULAJPtC51I=; b=hQhZVoBcH9p7qWkftDDZ7uI5K83/2b4YkOPFSK7gRfSCcpx8YjPCsE2oxi2qRhlQj1 LM/JFlQxcBW3za4zuadGumumjN7mToRSu3w9fRF/JaLB69/QCK0hWgO/l/XJ7YfaLxH3 /Egs+Ob6g/lFdz+6FXpp2Hg5X3yDN4xU+KIdgb4071MA8iLEZcfmyoo0mIHSbsM+QxU1 Q9pSSLNu0v/aSD1/86RYeyfMyEOFEd+6xNGtDntbktN9IewVUzIYoIcCk1SxleLzI4iD 743bpU7/gHyZd/U1DrAtzs5RzuBqreb2KprZE0aCaVQUUXcXmctqQF1Z++HpElX+LwhJ dCwg==
In-reply-to: <1345193015-3024-1-git-send-email-chenhc@lemote.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1345193015-3024-1-git-send-email-chenhc@lemote.com>
Sender: linux-mips-bounce@linux-mips.org
Added Kconfig options include: Loongson-3 CPU and machine definition,
CPU cache features, UEFI-like firmware interface, HT-linked PCI, and
big memory 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>
---
 arch/mips/Kconfig          |   26 ++++++++++++++++++++++
 arch/mips/loongson/Kconfig |   52 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 78 insertions(+), 0 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 331d574..0660068 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1571,6 +1571,16 @@ config CPU_LOONGSON2
        select CPU_SUPPORTS_64BIT_KERNEL
        select CPU_SUPPORTS_HIGHMEM
 
+config CPU_LOONGSON3
+       bool "Loongson 3 CPU"
+       depends on SYS_HAS_CPU_LOONGSON3
+       select CPU_SUPPORTS_32BIT_KERNEL
+       select CPU_SUPPORTS_64BIT_KERNEL
+       select CPU_SUPPORTS_HIGHMEM
+       help
+               The Loongson 3 processor implements the MIPS III instruction set
+               with many extensions.
+
 config CPU_LOONGSON1
        bool
        select CPU_MIPS32
@@ -1597,6 +1607,11 @@ config SYS_HAS_CPU_LOONGSON2F
        select CPU_SUPPORTS_ADDRWINCFG if 64BIT
        select CPU_SUPPORTS_UNCACHED_ACCELERATED
 
+config SYS_HAS_CPU_LOONGSON3
+       bool
+       select CPU_SUPPORTS_CPUFREQ
+       select CPU_SUPPORTS_COHERENT_CACHE
+
 config SYS_HAS_CPU_LOONGSON1B
        bool
 
@@ -1734,6 +1749,8 @@ config CPU_SUPPORTS_HUGEPAGES
        bool
 config CPU_SUPPORTS_UNCACHED_ACCELERATED
        bool
+config CPU_SUPPORTS_COHERENT_CACHE
+       bool
 config MIPS_PGD_C0_CONTEXT
        bool
        default y if 64BIT && CPU_MIPSR2
@@ -2399,6 +2416,15 @@ config PCI
          your box. Other bus systems are ISA, EISA, or VESA. If you have PCI,
          say Y, otherwise N.
 
+config HT_PCI
+       bool "Support for HT-linked PCI"
+       select PCI_DOMAINS
+       help
+         Loongson family machines use Hyper-Transport bus for inter-core
+         connection and device connection. The PCI bus is a subordinate
+         linked at HT. Choose Y unless you are using Loongson 2E/2F based
+         machines.
+
 config PCI_DOMAINS
        bool
 
diff --git a/arch/mips/loongson/Kconfig b/arch/mips/loongson/Kconfig
index 263beb9..dd951b8 100644
--- a/arch/mips/loongson/Kconfig
+++ b/arch/mips/loongson/Kconfig
@@ -59,6 +59,33 @@ config LEMOTE_MACH2F
 
          These family machines include fuloong2f mini PC, yeeloong2f notebook,
          LingLoong allinone PC and so forth.
+
+config LEMOTE_MACH3A
+       bool "Lemote Loongson 3A family machines"
+       select ARCH_SPARSEMEM_ENABLE
+       select GENERIC_ISA_DMA_SUPPORT_BROKEN
+       select GENERIC_HARDIRQS_NO__DO_IRQ
+       select BOOT_ELF32
+       select BOARD_SCACHE
+       select CSRC_R4K
+       select CEVT_R4K
+       select CPU_HAS_WB
+       select HW_HAS_PCI
+       select ISA
+       select I8259
+       select IRQ_CPU
+       select SYS_HAS_CPU_LOONGSON3
+       select SYS_HAS_EARLY_PRINTK
+       select SYS_SUPPORTS_SMP
+       select SYS_SUPPORTS_32BIT_KERNEL
+       select SYS_SUPPORTS_64BIT_KERNEL
+       select SYS_SUPPORTS_HIGHMEM
+       select SYS_SUPPORTS_LITTLE_ENDIAN
+       select LOONGSON_MC146818
+       select UEFI_FIRMWARE_INTERFACE
+       help
+               Lemote Loongson 3A family machines utilize the 3A revision of
+               Loongson processor and RS780/SBX00 chipset.
 endchoice
 
 config CS5536
@@ -86,8 +113,33 @@ config LOONGSON_UART_BASE
        default y
        depends on EARLY_PRINTK || SERIAL_8250
 
+config LOONGSON_BIGMEM
+       bool "Soft IOMMU Support for Big Memory (>4GB)"
+       depends on CPU_LOONGSON3
+       select SWIOTLB
+       select ZONE_DMA32
+
+config IOMMU_HELPER
+       bool
+
+config NEED_SG_DMA_LENGTH
+       bool
+
+config SWIOTLB
+       bool
+       select IOMMU_HELPER
+       select NEED_SG_DMA_LENGTH
+       select NEED_DMA_MAP_STATE
+
 config LOONGSON_MC146818
        bool
        default n
 
+config ARCH_SPARSEMEM_ENABLE
+       bool
+       select SPARSEMEM_STATIC
+
+config UEFI_FIRMWARE_INTERFACE
+       bool
+
 endif # MACH_LOONGSON
-- 
1.7.7.3


<Prev in Thread] Current Thread [Next in Thread>