]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
MIPS: Loongson: Naming style cleanup and rework
authorHuacai Chen <chenhc@lemote.com>
Tue, 21 Apr 2015 02:00:35 +0000 (10:00 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Sun, 21 Jun 2015 19:53:59 +0000 (21:53 +0200)
Currently, code of Loongson-2/3 is under loongson directory and code of
Loongson-1 is under loongson1 directory. Besides, there are Kconfig
options such as MACH_LOONGSON and MACH_LOONGSON1. This naming style is
very ugly and confusing. Since Loongson-2/3 are both 64-bit general-
purpose CPU while Loongson-1 is 32-bit SoC, we rename both file names
and Kconfig symbols from loongson/loongson1 to loongson64/loongson32.

[ralf@linux-mips.org: Resolve a number of simple conflicts.]

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Cc: Kelvin Cheung <keguang.zhang@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/9790/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
102 files changed:
arch/mips/Kbuild.platforms
arch/mips/Kconfig
arch/mips/boot/compressed/uart-16550.c
arch/mips/configs/fuloong2e_defconfig
arch/mips/configs/lemote2f_defconfig
arch/mips/configs/loongson3_defconfig
arch/mips/configs/ls1b_defconfig
arch/mips/include/asm/mach-loongson/workarounds.h [deleted file]
arch/mips/include/asm/mach-loongson32/cpufreq.h [moved from arch/mips/include/asm/mach-loongson1/cpufreq.h with 81% similarity]
arch/mips/include/asm/mach-loongson32/irq.h [moved from arch/mips/include/asm/mach-loongson1/irq.h with 95% similarity]
arch/mips/include/asm/mach-loongson32/loongson1.h [moved from arch/mips/include/asm/mach-loongson1/loongson1.h with 91% similarity]
arch/mips/include/asm/mach-loongson32/platform.h [moved from arch/mips/include/asm/mach-loongson1/platform.h with 85% similarity]
arch/mips/include/asm/mach-loongson32/prom.h [moved from arch/mips/include/asm/mach-loongson1/prom.h with 84% similarity]
arch/mips/include/asm/mach-loongson32/regs-clk.h [moved from arch/mips/include/asm/mach-loongson1/regs-clk.h with 90% similarity]
arch/mips/include/asm/mach-loongson32/regs-mux.h [moved from arch/mips/include/asm/mach-loongson1/regs-mux.h with 94% similarity]
arch/mips/include/asm/mach-loongson32/regs-pwm.h [moved from arch/mips/include/asm/mach-loongson1/regs-pwm.h with 84% similarity]
arch/mips/include/asm/mach-loongson32/regs-wdt.h [moved from arch/mips/include/asm/mach-loongson1/regs-wdt.h with 77% similarity]
arch/mips/include/asm/mach-loongson64/boot_param.h [moved from arch/mips/include/asm/mach-loongson/boot_param.h with 98% similarity]
arch/mips/include/asm/mach-loongson64/cpu-feature-overrides.h [moved from arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h with 90% similarity]
arch/mips/include/asm/mach-loongson64/cs5536/cs5536.h [moved from arch/mips/include/asm/mach-loongson/cs5536/cs5536.h with 100% similarity]
arch/mips/include/asm/mach-loongson64/cs5536/cs5536_mfgpt.h [moved from arch/mips/include/asm/mach-loongson/cs5536/cs5536_mfgpt.h with 100% similarity]
arch/mips/include/asm/mach-loongson64/cs5536/cs5536_pci.h [moved from arch/mips/include/asm/mach-loongson/cs5536/cs5536_pci.h with 100% similarity]
arch/mips/include/asm/mach-loongson64/cs5536/cs5536_vsm.h [moved from arch/mips/include/asm/mach-loongson/cs5536/cs5536_vsm.h with 100% similarity]
arch/mips/include/asm/mach-loongson64/dma-coherence.h [moved from arch/mips/include/asm/mach-loongson/dma-coherence.h with 93% similarity]
arch/mips/include/asm/mach-loongson64/gpio.h [moved from arch/mips/include/asm/mach-loongson/gpio.h with 100% similarity]
arch/mips/include/asm/mach-loongson64/irq.h [moved from arch/mips/include/asm/mach-loongson/irq.h with 92% similarity]
arch/mips/include/asm/mach-loongson64/kernel-entry-init.h [moved from arch/mips/include/asm/mach-loongson/kernel-entry-init.h with 88% similarity]
arch/mips/include/asm/mach-loongson64/loongson.h [moved from arch/mips/include/asm/mach-loongson/loongson.h with 98% similarity]
arch/mips/include/asm/mach-loongson64/loongson_hwmon.h [moved from arch/mips/include/asm/mach-loongson/loongson_hwmon.h with 100% similarity]
arch/mips/include/asm/mach-loongson64/machine.h [moved from arch/mips/include/asm/mach-loongson/machine.h with 84% similarity]
arch/mips/include/asm/mach-loongson64/mc146818rtc.h [moved from arch/mips/include/asm/mach-loongson/mc146818rtc.h with 85% similarity]
arch/mips/include/asm/mach-loongson64/mem.h [moved from arch/mips/include/asm/mach-loongson/mem.h with 89% similarity]
arch/mips/include/asm/mach-loongson64/mmzone.h [moved from arch/mips/include/asm/mach-loongson/mmzone.h with 100% similarity]
arch/mips/include/asm/mach-loongson64/pci.h [moved from arch/mips/include/asm/mach-loongson/pci.h with 93% similarity]
arch/mips/include/asm/mach-loongson64/spaces.h [moved from arch/mips/include/asm/mach-loongson/spaces.h with 65% similarity]
arch/mips/include/asm/mach-loongson64/topology.h [moved from arch/mips/include/asm/mach-loongson/topology.h with 100% similarity]
arch/mips/include/asm/mach-loongson64/workarounds.h [new file with mode: 0644]
arch/mips/loongson32/Kconfig [moved from arch/mips/loongson1/Kconfig with 96% similarity]
arch/mips/loongson32/Makefile [moved from arch/mips/loongson1/Makefile with 74% similarity]
arch/mips/loongson32/Platform [moved from arch/mips/loongson1/Platform with 59% similarity]
arch/mips/loongson32/common/Makefile [moved from arch/mips/loongson1/common/Makefile with 100% similarity]
arch/mips/loongson32/common/irq.c [moved from arch/mips/loongson1/common/irq.c with 100% similarity]
arch/mips/loongson32/common/platform.c [moved from arch/mips/loongson1/common/platform.c with 100% similarity]
arch/mips/loongson32/common/prom.c [moved from arch/mips/loongson1/common/prom.c with 100% similarity]
arch/mips/loongson32/common/reset.c [moved from arch/mips/loongson1/common/reset.c with 100% similarity]
arch/mips/loongson32/common/setup.c [moved from arch/mips/loongson1/common/setup.c with 100% similarity]
arch/mips/loongson32/common/time.c [moved from arch/mips/loongson1/common/time.c with 100% similarity]
arch/mips/loongson32/ls1b/Makefile [moved from arch/mips/loongson1/ls1b/Makefile with 100% similarity]
arch/mips/loongson32/ls1b/board.c [moved from arch/mips/loongson1/ls1b/board.c with 100% similarity]
arch/mips/loongson64/Kconfig [moved from arch/mips/loongson/Kconfig with 98% similarity]
arch/mips/loongson64/Makefile [moved from arch/mips/loongson/Makefile with 88% similarity]
arch/mips/loongson64/Platform [moved from arch/mips/loongson/Platform with 87% similarity]
arch/mips/loongson64/common/Makefile [moved from arch/mips/loongson/common/Makefile with 100% similarity]
arch/mips/loongson64/common/bonito-irq.c [moved from arch/mips/loongson/common/bonito-irq.c with 100% similarity]
arch/mips/loongson64/common/cmdline.c [moved from arch/mips/loongson/common/cmdline.c with 100% similarity]
arch/mips/loongson64/common/cs5536/Makefile [moved from arch/mips/loongson/common/cs5536/Makefile with 100% similarity]
arch/mips/loongson64/common/cs5536/cs5536_acc.c [moved from arch/mips/loongson/common/cs5536/cs5536_acc.c with 100% similarity]
arch/mips/loongson64/common/cs5536/cs5536_ehci.c [moved from arch/mips/loongson/common/cs5536/cs5536_ehci.c with 100% similarity]
arch/mips/loongson64/common/cs5536/cs5536_ide.c [moved from arch/mips/loongson/common/cs5536/cs5536_ide.c with 100% similarity]
arch/mips/loongson64/common/cs5536/cs5536_isa.c [moved from arch/mips/loongson/common/cs5536/cs5536_isa.c with 100% similarity]
arch/mips/loongson64/common/cs5536/cs5536_mfgpt.c [moved from arch/mips/loongson/common/cs5536/cs5536_mfgpt.c with 100% similarity]
arch/mips/loongson64/common/cs5536/cs5536_ohci.c [moved from arch/mips/loongson/common/cs5536/cs5536_ohci.c with 100% similarity]
arch/mips/loongson64/common/cs5536/cs5536_pci.c [moved from arch/mips/loongson/common/cs5536/cs5536_pci.c with 100% similarity]
arch/mips/loongson64/common/dma-swiotlb.c [moved from arch/mips/loongson/common/dma-swiotlb.c with 100% similarity]
arch/mips/loongson64/common/early_printk.c [moved from arch/mips/loongson/common/early_printk.c with 100% similarity]
arch/mips/loongson64/common/env.c [moved from arch/mips/loongson/common/env.c with 100% similarity]
arch/mips/loongson64/common/init.c [moved from arch/mips/loongson/common/init.c with 100% similarity]
arch/mips/loongson64/common/irq.c [moved from arch/mips/loongson/common/irq.c with 100% similarity]
arch/mips/loongson64/common/machtype.c [moved from arch/mips/loongson/common/machtype.c with 100% similarity]
arch/mips/loongson64/common/mem.c [moved from arch/mips/loongson/common/mem.c with 100% similarity]
arch/mips/loongson64/common/pci.c [moved from arch/mips/loongson/common/pci.c with 100% similarity]
arch/mips/loongson64/common/platform.c [moved from arch/mips/loongson/common/platform.c with 100% similarity]
arch/mips/loongson64/common/pm.c [moved from arch/mips/loongson/common/pm.c with 100% similarity]
arch/mips/loongson64/common/reset.c [moved from arch/mips/loongson/common/reset.c with 100% similarity]
arch/mips/loongson64/common/rtc.c [moved from arch/mips/loongson/common/rtc.c with 100% similarity]
arch/mips/loongson64/common/serial.c [moved from arch/mips/loongson/common/serial.c with 100% similarity]
arch/mips/loongson64/common/setup.c [moved from arch/mips/loongson/common/setup.c with 100% similarity]
arch/mips/loongson64/common/time.c [moved from arch/mips/loongson/common/time.c with 100% similarity]
arch/mips/loongson64/common/uart_base.c [moved from arch/mips/loongson/common/uart_base.c with 100% similarity]
arch/mips/loongson64/fuloong-2e/Makefile [moved from arch/mips/loongson/fuloong-2e/Makefile with 100% similarity]
arch/mips/loongson64/fuloong-2e/irq.c [moved from arch/mips/loongson/fuloong-2e/irq.c with 100% similarity]
arch/mips/loongson64/fuloong-2e/reset.c [moved from arch/mips/loongson/fuloong-2e/reset.c with 100% similarity]
arch/mips/loongson64/lemote-2f/Makefile [moved from arch/mips/loongson/lemote-2f/Makefile with 100% similarity]
arch/mips/loongson64/lemote-2f/clock.c [moved from arch/mips/loongson/lemote-2f/clock.c with 100% similarity]
arch/mips/loongson64/lemote-2f/ec_kb3310b.c [moved from arch/mips/loongson/lemote-2f/ec_kb3310b.c with 100% similarity]
arch/mips/loongson64/lemote-2f/ec_kb3310b.h [moved from arch/mips/loongson/lemote-2f/ec_kb3310b.h with 100% similarity]
arch/mips/loongson64/lemote-2f/irq.c [moved from arch/mips/loongson/lemote-2f/irq.c with 100% similarity]
arch/mips/loongson64/lemote-2f/machtype.c [moved from arch/mips/loongson/lemote-2f/machtype.c with 100% similarity]
arch/mips/loongson64/lemote-2f/pm.c [moved from arch/mips/loongson/lemote-2f/pm.c with 100% similarity]
arch/mips/loongson64/lemote-2f/reset.c [moved from arch/mips/loongson/lemote-2f/reset.c with 100% similarity]
arch/mips/loongson64/loongson-3/Makefile [moved from arch/mips/loongson/loongson-3/Makefile with 100% similarity]
arch/mips/loongson64/loongson-3/cop2-ex.c [moved from arch/mips/loongson/loongson-3/cop2-ex.c with 100% similarity]
arch/mips/loongson64/loongson-3/hpet.c [moved from arch/mips/loongson/loongson-3/hpet.c with 100% similarity]
arch/mips/loongson64/loongson-3/irq.c [moved from arch/mips/loongson/loongson-3/irq.c with 100% similarity]
arch/mips/loongson64/loongson-3/numa.c [moved from arch/mips/loongson/loongson-3/numa.c with 100% similarity]
arch/mips/loongson64/loongson-3/platform.c [moved from arch/mips/loongson/loongson-3/platform.c with 100% similarity]
arch/mips/loongson64/loongson-3/smp.c [moved from arch/mips/loongson/loongson-3/smp.c with 100% similarity]
arch/mips/loongson64/loongson-3/smp.h [moved from arch/mips/loongson/loongson-3/smp.h with 100% similarity]
drivers/clk/Makefile
drivers/cpufreq/ls1x-cpufreq.c
drivers/rtc/Kconfig
drivers/rtc/rtc-ls1x.c

index 39cf40da5f1490e64e29ee7aa7a2ed46eefe3fc9..a424e46b50afaa85f5e081f5f9ee8e31887816bb 100644 (file)
@@ -15,8 +15,8 @@ platforms += jazz
 platforms += jz4740
 platforms += lantiq
 platforms += lasat
-platforms += loongson
-platforms += loongson1
+platforms += loongson32
+platforms += loongson64
 platforms += mti-malta
 platforms += mti-sead3
 platforms += netlogic
index 0ee59e8cdb5747d8850a8f2fe9c6d5b81d9d5092..733f6ac97f28da6e8ed01b9ae27b3365012dd7dc 100644 (file)
@@ -26,7 +26,7 @@ config MIPS
        select HAVE_SYSCALL_TRACEPOINTS
        select ARCH_HAS_ELF_RANDOMIZE
        select HAVE_ARCH_TRANSPARENT_HUGEPAGE if CPU_SUPPORTS_HUGEPAGES && 64BIT
-       select RTC_LIB if !MACH_LOONGSON
+       select RTC_LIB if !MACH_LOONGSON64
        select GENERIC_ATOMIC64 if !64BIT
        select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
        select HAVE_DMA_ATTRS
@@ -346,26 +346,28 @@ config LASAT
        select SYS_SUPPORTS_64BIT_KERNEL if BROKEN
        select SYS_SUPPORTS_LITTLE_ENDIAN
 
-config MACH_LOONGSON
-       bool "Loongson family of machines"
+config MACH_LOONGSON32
+       bool "Loongson-1 family of machines"
        select SYS_SUPPORTS_ZBOOT
        help
-         This enables the support of Loongson family of machines.
+         This enables support for the Loongson-1 family of machines.
 
-         Loongson is a family of general-purpose MIPS-compatible CPUs.
-         developed at Institute of Computing Technology (ICT),
-         Chinese Academy of Sciences (CAS) in the People's Republic
-         of China. The chief architect is Professor Weiwu Hu.
+         Loongson-1 is a family of 32-bit MIPS-compatible SoCs developed by
+         the Institute of Computing Technology (ICT), Chinese Academy of
+         Sciences (CAS).
 
-config MACH_LOONGSON1
-       bool "Loongson 1 family of machines"
+config MACH_LOONGSON64
+       bool "Loongson-2/3 family of machines"
        select SYS_SUPPORTS_ZBOOT
        help
-         This enables support for the Loongson 1 based machines.
+         This enables the support of Loongson-2/3 family of machines.
 
-         Loongson 1 is a family of 32-bit MIPS-compatible SoCs developed by
-         the ICT (Institute of Computing Technology) and the Chinese Academy
-         of Sciences.
+         Loongson-2 is a family of single-core CPUs and Loongson-3 is a
+         family of multi-core CPUs. They are both 64-bit general-purpose
+         MIPS-compatible CPUs. Loongson-2/3 are developed by the Institute
+         of Computing Technology (ICT), Chinese Academy of Sciences (CAS)
+         in the People's Republic of China. The chief architect is Professor
+         Weiwu Hu.
 
 config MACH_PISTACHIO
        bool "IMG Pistachio SoC based boards"
@@ -948,8 +950,8 @@ source "arch/mips/sibyte/Kconfig"
 source "arch/mips/txx9/Kconfig"
 source "arch/mips/vr41xx/Kconfig"
 source "arch/mips/cavium-octeon/Kconfig"
-source "arch/mips/loongson/Kconfig"
-source "arch/mips/loongson1/Kconfig"
+source "arch/mips/loongson32/Kconfig"
+source "arch/mips/loongson64/Kconfig"
 source "arch/mips/netlogic/Kconfig"
 source "arch/mips/paravirt/Kconfig"
 
index 237494b7a21afcc0b7c10e77e5fdc07ca880477c..408799a839b42f2d9d7d1232bd7ea4efda0cf2d4 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <asm/addrspace.h>
 
-#if defined(CONFIG_MACH_LOONGSON) || defined(CONFIG_MIPS_MALTA)
+#if defined(CONFIG_MACH_LOONGSON64) || defined(CONFIG_MIPS_MALTA)
 #define UART_BASE 0x1fd003f8
 #define PORT(offset) (CKSEG1ADDR(UART_BASE) + (offset))
 #endif
index b2a577ebce0b08f79650d8ef2bb096fcb6d0a27e..a75c65da08b4b7d573c45e0e429acd6dd54300c9 100644 (file)
@@ -1,4 +1,4 @@
-CONFIG_MACH_LOONGSON=y
+CONFIG_MACH_LOONGSON64=y
 CONFIG_64BIT=y
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
index 0cbc9863c7c8a75690eba7c827cf69e3094bb581..54cc3853d259de430f222e2a4f50d907201bd302 100644 (file)
@@ -1,4 +1,4 @@
-CONFIG_MACH_LOONGSON=y
+CONFIG_MACH_LOONGSON64=y
 CONFIG_LEMOTE_MACH2F=y
 CONFIG_CS5536_MFGPT=y
 CONFIG_64BIT=y
index c8442997477b909c5cbc2a3bb229a4469565c8aa..f8bf915c6d6b446f27568845e38601241716536c 100644 (file)
@@ -1,4 +1,4 @@
-CONFIG_MACH_LOONGSON=y
+CONFIG_MACH_LOONGSON64=y
 CONFIG_SWIOTLB=y
 CONFIG_LOONGSON_MACH3X=y
 CONFIG_CPU_LOONGSON3=y
index 7eb75543ca1a23b5be78e89ae3ec33b0f3d446db..1b2cc1fb26a165189630a79f06c6ce39459edb34 100644 (file)
@@ -1,4 +1,4 @@
-CONFIG_MACH_LOONGSON1=y
+CONFIG_MACH_LOONGSON32=y
 CONFIG_PREEMPT=y
 # CONFIG_SECCOMP is not set
 CONFIG_EXPERIMENTAL=y
diff --git a/arch/mips/include/asm/mach-loongson/workarounds.h b/arch/mips/include/asm/mach-loongson/workarounds.h
deleted file mode 100644 (file)
index e180c14..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef __ASM_MACH_LOONGSON_WORKAROUNDS_H_
-#define __ASM_MACH_LOONGSON_WORKAROUNDS_H_
-
-#define WORKAROUND_CPUFREQ     0x00000001
-#define WORKAROUND_CPUHOTPLUG  0x00000002
-
-#endif
similarity index 81%
rename from arch/mips/include/asm/mach-loongson1/cpufreq.h
rename to arch/mips/include/asm/mach-loongson32/cpufreq.h
index e7765ce30bcf8e5626b7c1d99c17a820e06df54e..6843fa1a608de8db0a29160e8871215f26e9d97a 100644 (file)
@@ -10,8 +10,8 @@
  */
 
 
-#ifndef __ASM_MACH_LOONGSON1_CPUFREQ_H
-#define __ASM_MACH_LOONGSON1_CPUFREQ_H
+#ifndef __ASM_MACH_LOONGSON32_CPUFREQ_H
+#define __ASM_MACH_LOONGSON32_CPUFREQ_H
 
 struct plat_ls1x_cpufreq {
        const char      *clk_name;      /* CPU clk */
@@ -20,4 +20,4 @@ struct plat_ls1x_cpufreq {
        unsigned int    min_freq;       /* in kHz */
 };
 
-#endif /* __ASM_MACH_LOONGSON1_CPUFREQ_H */
+#endif /* __ASM_MACH_LOONGSON32_CPUFREQ_H */
similarity index 95%
rename from arch/mips/include/asm/mach-loongson1/irq.h
rename to arch/mips/include/asm/mach-loongson32/irq.h
index 96bfb1c1c73d2417e8662f0baf78dba2da6c61b1..0d35b994e8d20248b6d8e0ce70afcd2ac103314a 100644 (file)
@@ -10,8 +10,8 @@
  */
 
 
-#ifndef __ASM_MACH_LOONGSON1_IRQ_H
-#define __ASM_MACH_LOONGSON1_IRQ_H
+#ifndef __ASM_MACH_LOONGSON32_IRQ_H
+#define __ASM_MACH_LOONGSON32_IRQ_H
 
 /*
  * CPU core Interrupt Numbers
@@ -70,4 +70,4 @@
 
 #define NR_IRQS                        (MIPS_CPU_IRQS + LS1X_IRQS)
 
-#endif /* __ASM_MACH_LOONGSON1_IRQ_H */
+#endif /* __ASM_MACH_LOONGSON32_IRQ_H */
similarity index 91%
rename from arch/mips/include/asm/mach-loongson1/loongson1.h
rename to arch/mips/include/asm/mach-loongson32/loongson1.h
index 20e0c2b155dda86617324568fb2f5911f2d9e76b..12aa129aad807129be51244474e96cabf097a2bf 100644 (file)
@@ -10,8 +10,8 @@
  */
 
 
-#ifndef __ASM_MACH_LOONGSON1_LOONGSON1_H
-#define __ASM_MACH_LOONGSON1_LOONGSON1_H
+#ifndef __ASM_MACH_LOONGSON32_LOONGSON1_H
+#define __ASM_MACH_LOONGSON32_LOONGSON1_H
 
 #define DEFAULT_MEMSIZE                        256     /* If no memsize provided */
 
@@ -47,4 +47,4 @@
 #include <regs-pwm.h>
 #include <regs-wdt.h>
 
-#endif /* __ASM_MACH_LOONGSON1_LOONGSON1_H */
+#endif /* __ASM_MACH_LOONGSON32_LOONGSON1_H */
similarity index 85%
rename from arch/mips/include/asm/mach-loongson1/platform.h
rename to arch/mips/include/asm/mach-loongson32/platform.h
index 47de55e0c835e2a7fb6b7d16299095e440e2885f..c32f03f3f72cefef04df672243e052069702444b 100644 (file)
@@ -8,8 +8,8 @@
  */
 
 
-#ifndef __ASM_MACH_LOONGSON1_PLATFORM_H
-#define __ASM_MACH_LOONGSON1_PLATFORM_H
+#ifndef __ASM_MACH_LOONGSON32_PLATFORM_H
+#define __ASM_MACH_LOONGSON32_PLATFORM_H
 
 #include <linux/platform_device.h>
 
@@ -23,4 +23,4 @@ extern struct platform_device ls1x_rtc_pdev;
 extern void __init ls1x_clk_init(void);
 extern void __init ls1x_serial_setup(struct platform_device *pdev);
 
-#endif /* __ASM_MACH_LOONGSON1_PLATFORM_H */
+#endif /* __ASM_MACH_LOONGSON32_PLATFORM_H */
similarity index 84%
rename from arch/mips/include/asm/mach-loongson1/prom.h
rename to arch/mips/include/asm/mach-loongson32/prom.h
index 34859a4d4ac4ccafbc59bfd4beb3b696d336ce23..a08503c0ba20974df952d7a1fc0dd9d25962e671 100644 (file)
@@ -7,8 +7,8 @@
  * option) any later version.
  */
 
-#ifndef __ASM_MACH_LOONGSON1_PROM_H
-#define __ASM_MACH_LOONGSON1_PROM_H
+#ifndef __ASM_MACH_LOONGSON32_PROM_H
+#define __ASM_MACH_LOONGSON32_PROM_H
 
 #include <linux/io.h>
 #include <linux/init.h>
@@ -21,4 +21,4 @@ extern unsigned long memsize, highmemsize;
 extern char *prom_getenv(char *name);
 extern void __init prom_init_cmdline(void);
 
-#endif /* __ASM_MACH_LOONGSON1_PROM_H */
+#endif /* __ASM_MACH_LOONGSON32_PROM_H */
similarity index 90%
rename from arch/mips/include/asm/mach-loongson1/regs-clk.h
rename to arch/mips/include/asm/mach-loongson32/regs-clk.h
index ee2445b10fc38535a7f478566724583601851191..1f5a715ac8418c18930a34ed60694f48f548a032 100644 (file)
@@ -9,8 +9,8 @@
  * option) any later version.
  */
 
-#ifndef __ASM_MACH_LOONGSON1_REGS_CLK_H
-#define __ASM_MACH_LOONGSON1_REGS_CLK_H
+#ifndef __ASM_MACH_LOONGSON32_REGS_CLK_H
+#define __ASM_MACH_LOONGSON32_REGS_CLK_H
 
 #define LS1X_CLK_REG(x) \
                ((void __iomem *)KSEG1ADDR(LS1X_CLK_BASE + (x)))
@@ -48,4 +48,4 @@
 #define BYPASS_DDR_WIDTH               1
 #define BYPASS_CPU_WIDTH               1
 
-#endif /* __ASM_MACH_LOONGSON1_REGS_CLK_H */
+#endif /* __ASM_MACH_LOONGSON32_REGS_CLK_H */
similarity index 94%
rename from arch/mips/include/asm/mach-loongson1/regs-mux.h
rename to arch/mips/include/asm/mach-loongson32/regs-mux.h
index fb1e36efaa19c37fc2a1081f7cc67ae17f79448f..8302d92f2da2ceae8cbe692bf748823f71d8c489 100644 (file)
@@ -9,8 +9,8 @@
  * option) any later version.
  */
 
-#ifndef __ASM_MACH_LOONGSON1_REGS_MUX_H
-#define __ASM_MACH_LOONGSON1_REGS_MUX_H
+#ifndef __ASM_MACH_LOONGSON32_REGS_MUX_H
+#define __ASM_MACH_LOONGSON32_REGS_MUX_H
 
 #define LS1X_MUX_REG(x) \
                ((void __iomem *)KSEG1ADDR(LS1X_MUX_BASE + (x)))
@@ -64,4 +64,4 @@
 #define GMAC1_USE_PWM23                        (0x1 << 1)
 #define GMAC0_USE_PWM01                        0x1
 
-#endif /* __ASM_MACH_LOONGSON1_REGS_MUX_H */
+#endif /* __ASM_MACH_LOONGSON32_REGS_MUX_H */
similarity index 84%
rename from arch/mips/include/asm/mach-loongson1/regs-pwm.h
rename to arch/mips/include/asm/mach-loongson32/regs-pwm.h
index 99f2bcc586f0136499bbf78bc21f1ff2838c9ed8..69f174ed13a43d47915b67c8ed32100aa94026bf 100644 (file)
@@ -9,8 +9,8 @@
  * option) any later version.
  */
 
-#ifndef __ASM_MACH_LOONGSON1_REGS_PWM_H
-#define __ASM_MACH_LOONGSON1_REGS_PWM_H
+#ifndef __ASM_MACH_LOONGSON32_REGS_PWM_H
+#define __ASM_MACH_LOONGSON32_REGS_PWM_H
 
 /* Loongson 1 PWM Timer Register Definitions */
 #define PWM_CNT                        0x0
@@ -26,4 +26,4 @@
 #define PWM_OE                 (0x1 << 3)
 #define CNT_EN                 0x1
 
-#endif /* __ASM_MACH_LOONGSON1_REGS_PWM_H */
+#endif /* __ASM_MACH_LOONGSON32_REGS_PWM_H */
similarity index 77%
rename from arch/mips/include/asm/mach-loongson1/regs-wdt.h
rename to arch/mips/include/asm/mach-loongson32/regs-wdt.h
index c39ee982ad3b57e0e23191ea886a0abc21de996e..6644ab6d33915d9010567bf9f7b8a43e53fcbcb2 100644 (file)
@@ -9,11 +9,11 @@
  * option) any later version.
  */
 
-#ifndef __ASM_MACH_LOONGSON1_REGS_WDT_H
-#define __ASM_MACH_LOONGSON1_REGS_WDT_H
+#ifndef __ASM_MACH_LOONGSON32_REGS_WDT_H
+#define __ASM_MACH_LOONGSON32_REGS_WDT_H
 
 #define WDT_EN                 0x0
 #define WDT_TIMER              0x4
 #define WDT_SET                        0x8
 
-#endif /* __ASM_MACH_LOONGSON1_REGS_WDT_H */
+#endif /* __ASM_MACH_LOONGSON32_REGS_WDT_H */
similarity index 98%
rename from arch/mips/include/asm/mach-loongson/boot_param.h
rename to arch/mips/include/asm/mach-loongson64/boot_param.h
index fa802926523f24b96c2200d640fc7f888986be62..d3f3258b7cd4a82b32776e030b00951fba8c0281 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __ASM_MACH_LOONGSON_BOOT_PARAM_H_
-#define __ASM_MACH_LOONGSON_BOOT_PARAM_H_
+#ifndef __ASM_MACH_LOONGSON64_BOOT_PARAM_H_
+#define __ASM_MACH_LOONGSON64_BOOT_PARAM_H_
 
 #define SYSTEM_RAM_LOW         1
 #define SYSTEM_RAM_HIGH                2
similarity index 90%
rename from arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h
rename to arch/mips/include/asm/mach-loongson64/cpu-feature-overrides.h
index acc376897e46038707f9978c6a8f2db87c102020..98963c2c7be48abf311915cd99fea93f73141cd4 100644 (file)
@@ -13,8 +13,8 @@
  *     loongson2f user manual.
  */
 
-#ifndef __ASM_MACH_LOONGSON_CPU_FEATURE_OVERRIDES_H
-#define __ASM_MACH_LOONGSON_CPU_FEATURE_OVERRIDES_H
+#ifndef __ASM_MACH_LOONGSON64_CPU_FEATURE_OVERRIDES_H
+#define __ASM_MACH_LOONGSON64_CPU_FEATURE_OVERRIDES_H
 
 #define cpu_dcache_line_size() 32
 #define cpu_icache_line_size() 32
@@ -58,4 +58,4 @@
 
 #define cpu_has_wsbh           IS_ENABLED(CONFIG_CPU_LOONGSON3)
 
-#endif /* __ASM_MACH_LOONGSON_CPU_FEATURE_OVERRIDES_H */
+#endif /* __ASM_MACH_LOONGSON64_CPU_FEATURE_OVERRIDES_H */
similarity index 93%
rename from arch/mips/include/asm/mach-loongson/dma-coherence.h
rename to arch/mips/include/asm/mach-loongson64/dma-coherence.h
index 4bf4e19f72e8512fe781b2e7a30d63df1e11dad9..1602a9e9e8c249f814096cc6d4e7993cc4f1b07a 100644 (file)
@@ -8,8 +8,8 @@
  * Author: Fuxin Zhang, zhangfx@lemote.com
  *
  */
-#ifndef __ASM_MACH_LOONGSON_DMA_COHERENCE_H
-#define __ASM_MACH_LOONGSON_DMA_COHERENCE_H
+#ifndef __ASM_MACH_LOONGSON64_DMA_COHERENCE_H
+#define __ASM_MACH_LOONGSON64_DMA_COHERENCE_H
 
 #ifdef CONFIG_SWIOTLB
 #include <linux/swiotlb.h>
@@ -82,4 +82,4 @@ static inline void plat_post_dma_flush(struct device *dev)
 {
 }
 
-#endif /* __ASM_MACH_LOONGSON_DMA_COHERENCE_H */
+#endif /* __ASM_MACH_LOONGSON64_DMA_COHERENCE_H */
similarity index 92%
rename from arch/mips/include/asm/mach-loongson/irq.h
rename to arch/mips/include/asm/mach-loongson64/irq.h
index a281cca5f2fb9699c90d5e8c4cfe0300136162fe..d18c45c7c394173b3ff552040149dfde7cb97150 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __ASM_MACH_LOONGSON_IRQ_H_
-#define __ASM_MACH_LOONGSON_IRQ_H_
+#ifndef __ASM_MACH_LOONGSON64_IRQ_H_
+#define __ASM_MACH_LOONGSON64_IRQ_H_
 
 #include <boot_param.h>
 
@@ -40,4 +40,4 @@ extern void fixup_irqs(void);
 extern void loongson3_ipi_interrupt(struct pt_regs *regs);
 
 #include_next <irq.h>
-#endif /* __ASM_MACH_LOONGSON_IRQ_H_ */
+#endif /* __ASM_MACH_LOONGSON64_IRQ_H_ */
similarity index 88%
rename from arch/mips/include/asm/mach-loongson/kernel-entry-init.h
rename to arch/mips/include/asm/mach-loongson64/kernel-entry-init.h
index df5fca8eeb80a591cf03aa0332c39315ce2e04cf..3f2f84f6c401f5637b5952477abdea47ab9e657d 100644 (file)
@@ -8,8 +8,8 @@
  * Copyright (C) 2009 Jiajie Chen (chenjiajie@cse.buaa.edu.cn)
  * Copyright (C) 2012 Huacai Chen (chenhc@lemote.com)
  */
-#ifndef __ASM_MACH_LOONGSON_KERNEL_ENTRY_H
-#define __ASM_MACH_LOONGSON_KERNEL_ENTRY_H
+#ifndef __ASM_MACH_LOONGSON64_KERNEL_ENTRY_H
+#define __ASM_MACH_LOONGSON64_KERNEL_ENTRY_H
 
 /*
  * Override macros used in arch/mips/kernel/head.S.
@@ -49,4 +49,4 @@
 #endif
        .endm
 
-#endif /* __ASM_MACH_LOONGSON_KERNEL_ENTRY_H */
+#endif /* __ASM_MACH_LOONGSON64_KERNEL_ENTRY_H */
similarity index 98%
rename from arch/mips/include/asm/mach-loongson/loongson.h
rename to arch/mips/include/asm/mach-loongson64/loongson.h
index 9783103fd6f662d8c5e3b55bcbabbe63f4b12e5e..d1ff774ac4b6560c4048311c1aca1821291ca437 100644 (file)
@@ -8,8 +8,8 @@
  * option) any later version.
  */
 
-#ifndef __ASM_MACH_LOONGSON_LOONGSON_H
-#define __ASM_MACH_LOONGSON_LOONGSON_H
+#ifndef __ASM_MACH_LOONGSON64_LOONGSON_H
+#define __ASM_MACH_LOONGSON64_LOONGSON_H
 
 #include <linux/io.h>
 #include <linux/init.h>
@@ -357,4 +357,4 @@ extern unsigned long _loongson_addrwincfg_base;
 
 #endif /* ! CONFIG_CPU_SUPPORTS_ADDRWINCFG */
 
-#endif /* __ASM_MACH_LOONGSON_LOONGSON_H */
+#endif /* __ASM_MACH_LOONGSON64_LOONGSON_H */
similarity index 84%
rename from arch/mips/include/asm/mach-loongson/machine.h
rename to arch/mips/include/asm/mach-loongson64/machine.h
index cb2b60249cd209c260c9abcc4f66062254e4d09a..c52549bb4e56d663e61d88d17a20f79f3163b067 100644 (file)
@@ -8,8 +8,8 @@
  * option) any later version.
  */
 
-#ifndef __ASM_MACH_LOONGSON_MACHINE_H
-#define __ASM_MACH_LOONGSON_MACHINE_H
+#ifndef __ASM_MACH_LOONGSON64_MACHINE_H
+#define __ASM_MACH_LOONGSON64_MACHINE_H
 
 #ifdef CONFIG_LEMOTE_FULOONG2E
 
@@ -30,4 +30,4 @@
 
 #endif /* CONFIG_LOONGSON_MACH3X */
 
-#endif /* __ASM_MACH_LOONGSON_MACHINE_H */
+#endif /* __ASM_MACH_LOONGSON64_MACHINE_H */
similarity index 85%
rename from arch/mips/include/asm/mach-loongson/mc146818rtc.h
rename to arch/mips/include/asm/mach-loongson64/mc146818rtc.h
index ed7fe978335ad667a6b6b185ec3cf054f5cb2bc2..ebdccfee50bed22739d367b33977df2709d1703f 100644 (file)
@@ -7,8 +7,8 @@
  *
  * RTC routines for PC style attached Dallas chip.
  */
-#ifndef __ASM_MACH_LOONGSON_MC146818RTC_H
-#define __ASM_MACH_LOONGSON_MC146818RTC_H
+#ifndef __ASM_MACH_LOONGSON64_MC146818RTC_H
+#define __ASM_MACH_LOONGSON64_MC146818RTC_H
 
 #include <linux/io.h>
 
@@ -33,4 +33,4 @@ static inline void CMOS_WRITE(unsigned char data, unsigned long addr)
 #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1970)
 #endif
 
-#endif /* __ASM_MACH_LOONGSON_MC146818RTC_H */
+#endif /* __ASM_MACH_LOONGSON64_MC146818RTC_H */
similarity index 89%
rename from arch/mips/include/asm/mach-loongson/mem.h
rename to arch/mips/include/asm/mach-loongson64/mem.h
index f4a36d7dbfabd864d97df1a9e2c135cc1e4c5b63..75c16bead536d5b47ab8fd36ca5819eb549d905c 100644 (file)
@@ -8,8 +8,8 @@
  * option) any later version.
  */
 
-#ifndef __ASM_MACH_LOONGSON_MEM_H
-#define __ASM_MACH_LOONGSON_MEM_H
+#ifndef __ASM_MACH_LOONGSON64_MEM_H
+#define __ASM_MACH_LOONGSON64_MEM_H
 
 /*
  * high memory space
@@ -38,4 +38,4 @@
 #define LOONGSON_MMIO_MEM_END  0x80000000
 #endif
 
-#endif /* __ASM_MACH_LOONGSON_MEM_H */
+#endif /* __ASM_MACH_LOONGSON64_MEM_H */
similarity index 93%
rename from arch/mips/include/asm/mach-loongson/pci.h
rename to arch/mips/include/asm/mach-loongson64/pci.h
index 1212774f66ef4d810b24e22b524935248ee6dd3f..3401f557434aac74d6ea89e031ede697d01fd30b 100644 (file)
@@ -9,8 +9,8 @@
  * option) any later version.
  */
 
-#ifndef __ASM_MACH_LOONGSON_PCI_H_
-#define __ASM_MACH_LOONGSON_PCI_H_
+#ifndef __ASM_MACH_LOONGSON64_PCI_H_
+#define __ASM_MACH_LOONGSON64_PCI_H_
 
 extern struct pci_ops loongson_pci_ops;
 
@@ -52,4 +52,4 @@ extern struct pci_ops loongson_pci_ops;
 
 #endif /* !CONFIG_CPU_SUPPORTS_ADDRWINCFG */
 
-#endif /* !__ASM_MACH_LOONGSON_PCI_H_ */
+#endif /* !__ASM_MACH_LOONGSON64_PCI_H_ */
similarity index 65%
rename from arch/mips/include/asm/mach-loongson/spaces.h
rename to arch/mips/include/asm/mach-loongson64/spaces.h
index e2506ee9004478b392e661b2cc393f748521f61d..c6040b9fcf94c2ac5f3d410d3b9abe0990f17da2 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __ASM_MACH_LOONGSON_SPACES_H_
-#define __ASM_MACH_LOONGSON_SPACES_H_
+#ifndef __ASM_MACH_LOONGSON64_SPACES_H_
+#define __ASM_MACH_LOONGSON64_SPACES_H_
 
 #if defined(CONFIG_64BIT)
 #define CAC_BASE        _AC(0x9800000000000000, UL)
diff --git a/arch/mips/include/asm/mach-loongson64/workarounds.h b/arch/mips/include/asm/mach-loongson64/workarounds.h
new file mode 100644 (file)
index 0000000..e659f04
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef __ASM_MACH_LOONGSON64_WORKAROUNDS_H_
+#define __ASM_MACH_LOONGSON64_WORKAROUNDS_H_
+
+#define WORKAROUND_CPUFREQ     0x00000001
+#define WORKAROUND_CPUHOTPLUG  0x00000002
+
+#endif
similarity index 96%
rename from arch/mips/loongson1/Kconfig
rename to arch/mips/loongson32/Kconfig
index aeecdd9fac9fabb3be49cb2eb4cf7881e21e4f7e..7704f20529d63589fce06b73e9fdf1a819f28be8 100644 (file)
@@ -1,4 +1,4 @@
-if MACH_LOONGSON1
+if MACH_LOONGSON32
 
 choice
        prompt "Machine Type"
@@ -58,4 +58,4 @@ config TIMER_USE_PWM3
 
 endchoice
 
-endif # MACH_LOONGSON1
+endif # MACH_LOONGSON32
similarity index 74%
rename from arch/mips/loongson1/Makefile
rename to arch/mips/loongson32/Makefile
index 9719c75886f55145382efb5af4dc341c45e1f703..5f4bd6e071ca06410db2e09f5cc400b3ab769d43 100644 (file)
@@ -2,7 +2,7 @@
 # Common code for all Loongson 1 based systems
 #
 
-obj-$(CONFIG_MACH_LOONGSON1) += common/
+obj-$(CONFIG_MACH_LOONGSON32) += common/
 
 #
 # Loongson LS1B board
similarity index 59%
rename from arch/mips/loongson1/Platform
rename to arch/mips/loongson32/Platform
index 11863441dea3348f2da81cd94ef98ecca1c4cacb..ebb6dc290f0ab5591da3076dfc387a660c786c4b 100644 (file)
@@ -2,6 +2,6 @@ cflags-$(CONFIG_CPU_LOONGSON1)  += \
        $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
        -Wa,-mips32r2 -Wa,--trap
 
-platform-$(CONFIG_MACH_LOONGSON1)      += loongson1/
-cflags-$(CONFIG_MACH_LOONGSON1)                += -I$(srctree)/arch/mips/include/asm/mach-loongson1
+platform-$(CONFIG_MACH_LOONGSON32)     += loongson32/
+cflags-$(CONFIG_MACH_LOONGSON32)       += -I$(srctree)/arch/mips/include/asm/mach-loongson32
 load-$(CONFIG_LOONGSON1_LS1B)          += 0xffffffff80100000
similarity index 98%
rename from arch/mips/loongson/Kconfig
rename to arch/mips/loongson64/Kconfig
index 50641491546354648ebb3a9872061c2de84ed63d..497912b38d8ebd82458f225a8b1fc2a5cbaf0d13 100644 (file)
@@ -1,4 +1,4 @@
-if MACH_LOONGSON
+if MACH_LOONGSON64
 
 choice
        prompt "Machine Type"
@@ -155,4 +155,4 @@ config LOONGSON_MC146818
 config LEFI_FIRMWARE_INTERFACE
        bool
 
-endif # MACH_LOONGSON
+endif # MACH_LOONGSON64
similarity index 88%
rename from arch/mips/loongson/Makefile
rename to arch/mips/loongson64/Makefile
index 7429994e76041c3b603d012067d03eb4d21cc972..4fe3d88fc361c8e6557dffd144a7fc22df0ff83b 100644 (file)
@@ -2,7 +2,7 @@
 # Common code for all Loongson based systems
 #
 
-obj-$(CONFIG_MACH_LOONGSON) += common/
+obj-$(CONFIG_MACH_LOONGSON64) += common/
 
 #
 # Lemote Fuloong mini-PC (Loongson 2E-based)
similarity index 87%
rename from arch/mips/loongson/Platform
rename to arch/mips/loongson64/Platform
index 0ac20eb84ecc84a0e08472610082c4787e51cab3..2e48e83d5524ac13a25a98b0c1d9bd60ae2c7ffa 100644 (file)
@@ -26,8 +26,8 @@ endif
 # Loongson Machines' Support
 #
 
-platform-$(CONFIG_MACH_LOONGSON) += loongson/
-cflags-$(CONFIG_MACH_LOONGSON) += -I$(srctree)/arch/mips/include/asm/mach-loongson -mno-branch-likely
+platform-$(CONFIG_MACH_LOONGSON64) += loongson64/
+cflags-$(CONFIG_MACH_LOONGSON64) += -I$(srctree)/arch/mips/include/asm/mach-loongson64 -mno-branch-likely
 load-$(CONFIG_LEMOTE_FULOONG2E) += 0xffffffff80100000
 load-$(CONFIG_LEMOTE_MACH2F) += 0xffffffff80200000
 load-$(CONFIG_LOONGSON_MACH3X) += 0xffffffff80200000
index cc773271b919a5bbdfd44fb615444359fb3deaad..78029bd2444b74e14cc2ba48bdb91ffd4b01e453 100644 (file)
@@ -24,7 +24,7 @@ obj-$(CONFIG_COMMON_CLK_CDCE706)      += clk-cdce706.o
 obj-$(CONFIG_ARCH_CLPS711X)            += clk-clps711x.o
 obj-$(CONFIG_ARCH_EFM32)               += clk-efm32gg.o
 obj-$(CONFIG_ARCH_HIGHBANK)            += clk-highbank.o
-obj-$(CONFIG_MACH_LOONGSON1)           += clk-ls1x.o
+obj-$(CONFIG_MACH_LOONGSON32)          += clk-ls1x.o
 obj-$(CONFIG_COMMON_CLK_MAX_GEN)       += clk-max-gen.o
 obj-$(CONFIG_COMMON_CLK_MAX77686)      += clk-max77686.o
 obj-$(CONFIG_COMMON_CLK_MAX77802)      += clk-max77802.o
index f0913eee2f5007a2ba8ca5ee7b1adea21bfc8215..262581b3318d7913380fef95facb9e191dff43d4 100644 (file)
@@ -17,8 +17,8 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 
-#include <asm/mach-loongson1/cpufreq.h>
-#include <asm/mach-loongson1/loongson1.h>
+#include <cpufreq.h>
+#include <loongson1.h>
 
 static struct {
        struct device *dev;
index 0fe4ad8826b2cda45044d8699696486cbd4bd1eb..354b908a03d84a6dbf3b84e5c4720706f7eeb57c 100644 (file)
@@ -1484,7 +1484,7 @@ config RTC_DRV_PUV3
 
 config RTC_DRV_LOONGSON1
        tristate "loongson1 RTC support"
-       depends on MACH_LOONGSON1
+       depends on MACH_LOONGSON32
        help
          This is a driver for the loongson1 on-chip Counter0 (Time-Of-Year
          counter) to be used as a RTC.
index 8445e564094a7150e77fb24eeab9e0c2f49aa903..22a9ec4f2b836c53585880ec6cd65b222ed522df 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/delay.h>
 #include <linux/types.h>
 #include <linux/io.h>
-#include <asm/mach-loongson1/loongson1.h>
+#include <loongson1.h>
 
 #define LS1X_RTC_REG_OFFSET    (LS1X_RTC_BASE + 0x20)
 #define LS1X_RTC_REGS(x) \