OSDN Git Service

MIPS: Loongson64: Move files to the top-level directory
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Sun, 20 Oct 2019 15:01:36 +0000 (23:01 +0800)
committerPaul Burton <paulburton@kernel.org>
Fri, 1 Nov 2019 21:31:28 +0000 (14:31 -0700)
Current Loongson-3 code can share among all Loongson64 processors.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Paul Burton <paulburton@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: chenhc@lemote.com
Cc: paul.burton@mips.com
27 files changed:
arch/mips/Kconfig
arch/mips/configs/loongson3_defconfig
arch/mips/include/asm/mach-loongson64/cpu-feature-overrides.h
arch/mips/loongson64/Kconfig
arch/mips/loongson64/Makefile
arch/mips/loongson64/acpi_init.c [moved from arch/mips/loongson64/loongson-3/acpi_init.c with 100% similarity]
arch/mips/loongson64/cmdline.c [moved from arch/mips/loongson64/common/cmdline.c with 100% similarity]
arch/mips/loongson64/common/Makefile [deleted file]
arch/mips/loongson64/cop2-ex.c [moved from arch/mips/loongson64/loongson-3/cop2-ex.c with 100% similarity]
arch/mips/loongson64/dma.c [moved from arch/mips/loongson64/loongson-3/dma.c with 100% similarity]
arch/mips/loongson64/env.c [moved from arch/mips/loongson64/common/env.c with 100% similarity]
arch/mips/loongson64/hpet.c [moved from arch/mips/loongson64/loongson-3/hpet.c with 100% similarity]
arch/mips/loongson64/init.c [moved from arch/mips/loongson64/common/init.c with 100% similarity]
arch/mips/loongson64/irq.c [moved from arch/mips/loongson64/loongson-3/irq.c with 100% similarity]
arch/mips/loongson64/loongson-3/Makefile [deleted file]
arch/mips/loongson64/numa.c [moved from arch/mips/loongson64/loongson-3/numa.c with 100% similarity]
arch/mips/loongson64/pci.c [moved from arch/mips/loongson64/common/pci.c with 100% similarity]
arch/mips/loongson64/platform.c [moved from arch/mips/loongson64/loongson-3/platform.c with 100% similarity]
arch/mips/loongson64/pm.c [moved from arch/mips/loongson64/common/pm.c with 100% similarity]
arch/mips/loongson64/reset.c [moved from arch/mips/loongson64/common/reset.c with 100% similarity]
arch/mips/loongson64/rtc.c [moved from arch/mips/loongson64/common/rtc.c with 100% similarity]
arch/mips/loongson64/setup.c [moved from arch/mips/loongson64/common/setup.c with 100% similarity]
arch/mips/loongson64/smp.c [moved from arch/mips/loongson64/loongson-3/smp.c with 100% similarity]
arch/mips/loongson64/smp.h [moved from arch/mips/loongson64/loongson-3/smp.h with 100% similarity]
arch/mips/loongson64/time.c [moved from arch/mips/loongson64/common/time.c with 100% similarity]
arch/mips/pci/Makefile
drivers/platform/mips/Kconfig

index aa6f849..b303b5c 100644 (file)
@@ -461,7 +461,33 @@ config MACH_LOONGSON2EF
 
 config MACH_LOONGSON64
        bool "Loongson-2/3 GSx64 family of machines"
+       select ARCH_SPARSEMEM_ENABLE
+       select ARCH_MIGHT_HAVE_PC_PARPORT
+       select ARCH_MIGHT_HAVE_PC_SERIO
+       select GENERIC_ISA_DMA_SUPPORT_BROKEN
+       select BOOT_ELF32
+       select BOARD_SCACHE
+       select CSRC_R4K
+       select CEVT_R4K
+       select CPU_HAS_WB
+       select FORCE_PCI
+       select ISA
+       select I8259
+       select IRQ_MIPS_CPU
+       select NR_CPUS_DEFAULT_4
+       select USE_GENERIC_EARLY_PRINTK_8250
+       select SYS_HAS_CPU_LOONGSON64
+       select SYS_HAS_EARLY_PRINTK
+       select SYS_SUPPORTS_SMP
+       select SYS_SUPPORTS_HOTPLUG_CPU
+       select SYS_SUPPORTS_NUMA
+       select SYS_SUPPORTS_64BIT_KERNEL
+       select SYS_SUPPORTS_HIGHMEM
+       select SYS_SUPPORTS_LITTLE_ENDIAN
        select SYS_SUPPORTS_ZBOOT
+       select LOONGSON_MC146818
+       select ZONE_DMA32
+       select NUMA
        help
          This enables the support of Loongson-2/3 family of processors with
          GSx64 microarchitecture.
index 90ee008..caad7bf 100644 (file)
@@ -24,7 +24,6 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_SYSCTL_SYSCALL=y
 CONFIG_EMBEDDED=y
 CONFIG_MACH_LOONGSON64=y
-CONFIG_LOONGSON_MACH3X=y
 CONFIG_SMP=y
 CONFIG_HZ_256=y
 CONFIG_KEXEC=y
index 895607e..7dc8d75 100644 (file)
@@ -43,7 +43,6 @@
 #define cpu_has_vint           0
 #define cpu_has_vtag_icache    0
 #define cpu_has_watch          1
-
 #define cpu_has_wsbh           1
 #define cpu_has_ic_fills_f_dc  1
 #define cpu_hwrena_impl_bits   0xc0000000
index 3215b76..b1aefd0 100644 (file)
@@ -1,45 +1,9 @@
 # SPDX-License-Identifier: GPL-2.0
 if MACH_LOONGSON64
 
-choice
-       prompt "Machine Type"
-
-config LOONGSON_MACH3X
-       bool "Generic Loongson 3 family machines"
-       select ARCH_SPARSEMEM_ENABLE
-       select ARCH_MIGHT_HAVE_PC_PARPORT
-       select ARCH_MIGHT_HAVE_PC_SERIO
-       select GENERIC_ISA_DMA_SUPPORT_BROKEN
-       select BOOT_ELF32
-       select BOARD_SCACHE
-       select CSRC_R4K
-       select CEVT_R4K
-       select CPU_HAS_WB
-       select FORCE_PCI
-       select ISA
-       select I8259
-       select IRQ_MIPS_CPU
-       select NR_CPUS_DEFAULT_4
-       select USE_GENERIC_EARLY_PRINTK_8250
-       select SYS_HAS_CPU_LOONGSON64
-       select SYS_HAS_EARLY_PRINTK
-       select SYS_SUPPORTS_SMP
-       select SYS_SUPPORTS_HOTPLUG_CPU
-       select SYS_SUPPORTS_NUMA
-       select SYS_SUPPORTS_64BIT_KERNEL
-       select SYS_SUPPORTS_HIGHMEM
-       select SYS_SUPPORTS_LITTLE_ENDIAN
-       select LOONGSON_MC146818
-       select ZONE_DMA32
-       select NUMA
-       help
-               Generic Loongson 3 family machines utilize the 3A/3B revision
-               of Loongson processor and RS780/SBX00 chipset.
-endchoice
-
 config RS780_HPET
        bool "RS780/SBX00 HPET Timer"
-       depends on LOONGSON_MACH3X
+       depends on CONFIG_MACH_LOONGSON64
        select MIPS_EXTERNAL_TIMER
        help
          This option enables the hpet timer of AMD RS780/SBX00.
index dc16a23..0b3c65b 100644 (file)
@@ -1,12 +1,13 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
-# Common code for all Loongson based systems
+# Makefile for Loongson-3 family machines
 #
+obj-$(CONFIG_MACH_LOONGSON64) += irq.o cop2-ex.o platform.o acpi_init.o dma.o \
+                               setup.o init.o cmdline.o env.o time.o reset.o \
 
-obj-$(CONFIG_MACH_LOONGSON64) += common/
-
-#
-# All Loongson-3 family machines
-#
-
-obj-$(CONFIG_CPU_LOONGSON64)  += loongson-3/
+obj-$(CONFIG_SMP)      += smp.o
+obj-$(CONFIG_NUMA)     += numa.o
+obj-$(CONFIG_RS780_HPET) += hpet.o
+obj-$(CONFIG_PCI) += pci.o
+obj-$(CONFIG_LOONGSON_MC146818) += rtc.o
+obj-$(CONFIG_SUSPEND) += pm.o
diff --git a/arch/mips/loongson64/common/Makefile b/arch/mips/loongson64/common/Makefile
deleted file mode 100644 (file)
index c476401..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# Makefile for loongson based machines.
-#
-
-obj-y += setup.o init.o cmdline.o env.o time.o reset.o
-
-obj-$(CONFIG_PCI) += pci.o
-
-obj-$(CONFIG_LOONGSON_MC146818) += rtc.o
-
-#
-# Suspend Support
-#
-
-obj-$(CONFIG_SUSPEND) += pm.o
diff --git a/arch/mips/loongson64/loongson-3/Makefile b/arch/mips/loongson64/loongson-3/Makefile
deleted file mode 100644 (file)
index df39598..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-#
-# Makefile for Loongson-3 family machines
-#
-obj-y                  += irq.o cop2-ex.o platform.o acpi_init.o dma.o
-
-obj-$(CONFIG_SMP)      += smp.o
-
-obj-$(CONFIG_NUMA)     += numa.o
-
-obj-$(CONFIG_RS780_HPET) += hpet.o
index d6de4cb..342ce10 100644 (file)
@@ -35,7 +35,7 @@ obj-$(CONFIG_LASAT)           += pci-lasat.o
 obj-$(CONFIG_MIPS_COBALT)      += fixup-cobalt.o
 obj-$(CONFIG_LEMOTE_FULOONG2E) += fixup-fuloong2e.o ops-loongson2.o
 obj-$(CONFIG_LEMOTE_MACH2F)    += fixup-lemote2f.o ops-loongson2.o
-obj-$(CONFIG_LOONGSON_MACH3X)  += fixup-loongson3.o ops-loongson3.o
+obj-$(CONFIG_MACH_LOONGSON64)  += fixup-loongson3.o ops-loongson3.o
 obj-$(CONFIG_MIPS_MALTA)       += fixup-malta.o pci-malta.o
 obj-$(CONFIG_PMC_MSP7120_GW)   += fixup-pmcmsp.o ops-pmcmsp.o
 obj-$(CONFIG_PMC_MSP7120_EVAL) += fixup-pmcmsp.o ops-pmcmsp.o
index 62ea193..f4d0a86 100644 (file)
@@ -17,8 +17,8 @@ menuconfig MIPS_PLATFORM_DEVICES
 if MIPS_PLATFORM_DEVICES
 
 config CPU_HWMON
-       tristate "Loongson CPU HWMon Driver"
-       depends on LOONGSON_MACH3X
+       tristate "Loongson-3 CPU HWMon Driver"
+       depends on CONFIG_MACH_LOONGSON64
        select HWMON
        default y
        help