@@ -447,6 +447,7 @@ config LASAT
config MACH_LOONGSON32
bool "Loongson 32-bit family of machines"
select SYS_SUPPORTS_ZBOOT
+ select HAVE_MACH_HEAD_FILES
help
This enables support for the Loongson-1 family of machines.
@@ -1,4 +1,4 @@
cflags-$(CONFIG_CPU_LOONGSON32) += -march=mips32r2 -Wa,--trap
platform-$(CONFIG_MACH_LOONGSON32) += loongson32/
-cflags-$(CONFIG_MACH_LOONGSON32) += -I$(srctree)/arch/mips/include/asm/mach-loongson32
+cflags-$(CONFIG_MACH_LOONGSON32) += -I$(srctree)/arch/mips/loongson32/include
load-$(CONFIG_CPU_LOONGSON32) += 0xffffffff80200000
@@ -7,8 +7,8 @@
#include <linux/irq.h>
#include <asm/irq_cpu.h>
-#include <loongson1.h>
-#include <irq.h>
+#include <mach/loongson1.h>
+#include <mach/irq.h>
#define LS1X_INTC_REG(n, x) \
((void __iomem *)KSEG1ADDR(LS1X_INTC_BASE + (n * 0x18) + (x)))
@@ -13,11 +13,11 @@
#include <linux/stmmac.h>
#include <linux/usb/ehci_pdriver.h>
-#include <platform.h>
-#include <loongson1.h>
-#include <cpufreq.h>
-#include <dma.h>
-#include <nand.h>
+#include <mach/platform.h>
+#include <mach/loongson1.h>
+#include <mach/cpufreq.h>
+#include <mach/dma.h>
+#include <mach/nand.h>
/* 8250/16550 compatible UART */
#define LS1X_UART(_id) \
@@ -11,7 +11,7 @@
#include <asm/bootinfo.h>
#include <asm/fw/fw.h>
-#include <loongson1.h>
+#include <mach/loongson1.h>
unsigned long memsize;
@@ -9,7 +9,7 @@
#include <asm/idle.h>
#include <asm/reboot.h>
-#include <loongson1.h>
+#include <mach/loongson1.h>
static void __iomem *wdt_reg_base;
@@ -8,8 +8,8 @@
#include <linux/sizes.h>
#include <asm/time.h>
-#include <loongson1.h>
-#include <platform.h>
+#include <mach/loongson1.h>
+#include <mach/platform.h>
#ifdef CONFIG_CEVT_CSRC_LS1X
new file mode 100644
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/cpu-feature-overrides.h>
similarity index 100%
rename from arch/mips/include/asm/mach-loongson32/cpufreq.h
rename to arch/mips/loongson32/include/mach/cpufreq.h
similarity index 100%
rename from arch/mips/include/asm/mach-loongson32/dma.h
rename to arch/mips/loongson32/include/mach/dma.h
new file mode 100644
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/ioremap.h>
similarity index 100%
rename from arch/mips/include/asm/mach-loongson32/irq.h
rename to arch/mips/loongson32/include/mach/irq.h
new file mode 100644
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/kernel-entry-init.h>
new file mode 100644
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/kmalloc.h>
similarity index 91%
rename from arch/mips/include/asm/mach-loongson32/loongson1.h
rename to arch/mips/loongson32/include/mach/loongson1.h
@@ -45,10 +45,10 @@
#define LS1X_NAND_BASE 0x1fe78000
#define LS1X_CLK_BASE 0x1fe78030
-#include <regs-clk.h>
-#include <regs-mux.h>
-#include <regs-pwm.h>
-#include <regs-rtc.h>
-#include <regs-wdt.h>
+#include <mach/regs-clk.h>
+#include <mach/regs-mux.h>
+#include <mach/regs-pwm.h>
+#include <mach/regs-rtc.h>
+#include <mach/regs-wdt.h>
#endif /* __ASM_MACH_LOONGSON32_LOONGSON1_H */
new file mode 100644
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/mangle-port.h>
similarity index 100%
rename from arch/mips/include/asm/mach-loongson32/nand.h
rename to arch/mips/loongson32/include/mach/nand.h
similarity index 95%
rename from arch/mips/include/asm/mach-loongson32/platform.h
rename to arch/mips/loongson32/include/mach/platform.h
@@ -8,8 +8,8 @@
#include <linux/platform_device.h>
-#include <dma.h>
-#include <nand.h>
+#include <mach/dma.h>
+#include <mach/nand.h>
extern struct platform_device ls1x_uart_pdev;
extern struct platform_device ls1x_cpufreq_pdev;
similarity index 100%
rename from arch/mips/include/asm/mach-loongson32/regs-clk.h
rename to arch/mips/loongson32/include/mach/regs-clk.h
similarity index 100%
rename from arch/mips/include/asm/mach-loongson32/regs-mux.h
rename to arch/mips/loongson32/include/mach/regs-mux.h
similarity index 100%
rename from arch/mips/include/asm/mach-loongson32/regs-pwm.h
rename to arch/mips/loongson32/include/mach/regs-pwm.h
similarity index 100%
rename from arch/mips/include/asm/mach-loongson32/regs-rtc.h
rename to arch/mips/loongson32/include/mach/regs-rtc.h
similarity index 100%
rename from arch/mips/include/asm/mach-loongson32/regs-wdt.h
rename to arch/mips/loongson32/include/mach/regs-wdt.h
new file mode 100644
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/spaces.h>
new file mode 100644
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/topology.h>
new file mode 100644
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/war.h>
@@ -7,10 +7,10 @@
#include <linux/mtd/partitions.h>
#include <linux/sizes.h>
-#include <loongson1.h>
-#include <dma.h>
-#include <nand.h>
-#include <platform.h>
+#include <mach/loongson1.h>
+#include <mach/dma.h>
+#include <mach/nand.h>
+#include <mach/platform.h>
static const struct gpio_led ls1x_gpio_leds[] __initconst = {
{
@@ -3,7 +3,7 @@
* Copyright (c) 2016 Yang Ling <gnaygnil@gmail.com>
*/
-#include <platform.h>
+#include <mach/platform.h>
static struct platform_device *ls1c_platform_devices[] __initdata = {
&ls1x_uart_pdev,
@@ -8,7 +8,7 @@
#include <linux/io.h>
#include <linux/err.h>
-#include <loongson1.h>
+#include <mach/loongson1.h>
#include "clk.h"
#define OSC (33 * 1000000)
@@ -7,7 +7,7 @@
#include <linux/clk-provider.h>
#include <linux/io.h>
-#include <loongson1.h>
+#include <mach/loongson1.h>
#include "clk.h"
#define OSC (24 * 1000000)
@@ -18,8 +18,8 @@
#include <linux/platform_device.h>
#include <linux/slab.h>
-#include <cpufreq.h>
-#include <loongson1.h>
+#include <mach/cpufreq.h>
+#include <mach/loongson1.h>
struct ls1x_cpufreq {
struct device *dev;
@@ -13,7 +13,7 @@
#include <linux/delay.h>
#include <linux/types.h>
#include <linux/io.h>
-#include <loongson1.h>
+#include <mach/loongson1.h>
#define LS1X_RTC_REG_OFFSET (LS1X_RTC_BASE + 0x20)
#define LS1X_RTC_REGS(x) \
@@ -7,7 +7,7 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/watchdog.h>
-#include <loongson1.h>
+#include <mach/loongson1.h>
#define DEFAULT_HEARTBEAT 30
Remove header files from arch/mips/include/asm/mach-loongson32 to arch/mips/loongson32/include/mach Signed-off-by: bibo mao <maobibo@loongson.cn> --- arch/mips/Kconfig | 1 + arch/mips/loongson32/Platform | 2 +- arch/mips/loongson32/common/irq.c | 4 ++-- arch/mips/loongson32/common/platform.c | 10 +++++----- arch/mips/loongson32/common/prom.c | 2 +- arch/mips/loongson32/common/reset.c | 2 +- arch/mips/loongson32/common/time.c | 4 ++-- arch/mips/loongson32/include/mach/cpu-feature-overrides.h | 2 ++ .../asm/mach-loongson32 => loongson32/include/mach}/cpufreq.h | 0 .../asm/mach-loongson32 => loongson32/include/mach}/dma.h | 0 arch/mips/loongson32/include/mach/ioremap.h | 2 ++ .../asm/mach-loongson32 => loongson32/include/mach}/irq.h | 0 arch/mips/loongson32/include/mach/kernel-entry-init.h | 2 ++ arch/mips/loongson32/include/mach/kmalloc.h | 2 ++ .../mach-loongson32 => loongson32/include/mach}/loongson1.h | 10 +++++----- arch/mips/loongson32/include/mach/mangle-port.h | 2 ++ .../asm/mach-loongson32 => loongson32/include/mach}/nand.h | 0 .../asm/mach-loongson32 => loongson32/include/mach}/platform.h | 4 ++-- .../asm/mach-loongson32 => loongson32/include/mach}/regs-clk.h | 0 .../asm/mach-loongson32 => loongson32/include/mach}/regs-mux.h | 0 .../asm/mach-loongson32 => loongson32/include/mach}/regs-pwm.h | 0 .../asm/mach-loongson32 => loongson32/include/mach}/regs-rtc.h | 0 .../asm/mach-loongson32 => loongson32/include/mach}/regs-wdt.h | 0 arch/mips/loongson32/include/mach/spaces.h | 2 ++ arch/mips/loongson32/include/mach/topology.h | 2 ++ arch/mips/loongson32/include/mach/war.h | 2 ++ arch/mips/loongson32/ls1b/board.c | 8 ++++---- arch/mips/loongson32/ls1c/board.c | 2 +- drivers/clk/loongson1/clk-loongson1b.c | 2 +- drivers/clk/loongson1/clk-loongson1c.c | 2 +- drivers/cpufreq/loongson1-cpufreq.c | 4 ++-- drivers/rtc/rtc-ls1x.c | 2 +- drivers/watchdog/loongson1_wdt.c | 2 +- 33 files changed, 47 insertions(+), 30 deletions(-) create mode 100644 arch/mips/loongson32/include/mach/cpu-feature-overrides.h rename arch/mips/{include/asm/mach-loongson32 => loongson32/include/mach}/cpufreq.h (100%) rename arch/mips/{include/asm/mach-loongson32 => loongson32/include/mach}/dma.h (100%) create mode 100644 arch/mips/loongson32/include/mach/ioremap.h rename arch/mips/{include/asm/mach-loongson32 => loongson32/include/mach}/irq.h (100%) create mode 100644 arch/mips/loongson32/include/mach/kernel-entry-init.h create mode 100644 arch/mips/loongson32/include/mach/kmalloc.h rename arch/mips/{include/asm/mach-loongson32 => loongson32/include/mach}/loongson1.h (91%) create mode 100644 arch/mips/loongson32/include/mach/mangle-port.h rename arch/mips/{include/asm/mach-loongson32 => loongson32/include/mach}/nand.h (100%) rename arch/mips/{include/asm/mach-loongson32 => loongson32/include/mach}/platform.h (95%) rename arch/mips/{include/asm/mach-loongson32 => loongson32/include/mach}/regs-clk.h (100%) rename arch/mips/{include/asm/mach-loongson32 => loongson32/include/mach}/regs-mux.h (100%) rename arch/mips/{include/asm/mach-loongson32 => loongson32/include/mach}/regs-pwm.h (100%) rename arch/mips/{include/asm/mach-loongson32 => loongson32/include/mach}/regs-rtc.h (100%) rename arch/mips/{include/asm/mach-loongson32 => loongson32/include/mach}/regs-wdt.h (100%) create mode 100644 arch/mips/loongson32/include/mach/spaces.h create mode 100644 arch/mips/loongson32/include/mach/topology.h create mode 100644 arch/mips/loongson32/include/mach/war.h