[PATCH 04/39] MIPS: loongson32: Add header files path prefix

From: bibo mao
Date: Mon Mar 30 2020 - 04:39:05 EST


Remove header files from arch/mips/include/asm/mach-loongson32
to arch/mips/loongson32/include/mach

Signed-off-by: bibo mao <maobibo@xxxxxxxxxxx>
---
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

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 8645207..3c38202 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -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.

diff --git a/arch/mips/loongson32/Platform b/arch/mips/loongson32/Platform
index 7f8e342..b3f061a 100644
--- a/arch/mips/loongson32/Platform
+++ b/arch/mips/loongson32/Platform
@@ -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
diff --git a/arch/mips/loongson32/common/irq.c b/arch/mips/loongson32/common/irq.c
index 9a50070..0e82336 100644
--- a/arch/mips/loongson32/common/irq.c
+++ b/arch/mips/loongson32/common/irq.c
@@ -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)))
diff --git a/arch/mips/loongson32/common/platform.c b/arch/mips/loongson32/common/platform.c
index 794c96c..9a783f8 100644
--- a/arch/mips/loongson32/common/platform.c
+++ b/arch/mips/loongson32/common/platform.c
@@ -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) \
diff --git a/arch/mips/loongson32/common/prom.c b/arch/mips/loongson32/common/prom.c
index fd76114..9b7dfc6 100644
--- a/arch/mips/loongson32/common/prom.c
+++ b/arch/mips/loongson32/common/prom.c
@@ -11,7 +11,7 @@
#include <asm/bootinfo.h>
#include <asm/fw/fw.h>

-#include <loongson1.h>
+#include <mach/loongson1.h>

unsigned long memsize;

diff --git a/arch/mips/loongson32/common/reset.c b/arch/mips/loongson32/common/reset.c
index 0c7399b..3e44b7f 100644
--- a/arch/mips/loongson32/common/reset.c
+++ b/arch/mips/loongson32/common/reset.c
@@ -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;

diff --git a/arch/mips/loongson32/common/time.c b/arch/mips/loongson32/common/time.c
index 459b15c..7313eaa 100644
--- a/arch/mips/loongson32/common/time.c
+++ b/arch/mips/loongson32/common/time.c
@@ -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

diff --git a/arch/mips/loongson32/include/mach/cpu-feature-overrides.h b/arch/mips/loongson32/include/mach/cpu-feature-overrides.h
new file mode 100644
index 0000000..f3e0e12
--- /dev/null
+++ b/arch/mips/loongson32/include/mach/cpu-feature-overrides.h
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/cpu-feature-overrides.h>
diff --git a/arch/mips/include/asm/mach-loongson32/cpufreq.h b/arch/mips/loongson32/include/mach/cpufreq.h
similarity index 100%
rename from arch/mips/include/asm/mach-loongson32/cpufreq.h
rename to arch/mips/loongson32/include/mach/cpufreq.h
diff --git a/arch/mips/include/asm/mach-loongson32/dma.h b/arch/mips/loongson32/include/mach/dma.h
similarity index 100%
rename from arch/mips/include/asm/mach-loongson32/dma.h
rename to arch/mips/loongson32/include/mach/dma.h
diff --git a/arch/mips/loongson32/include/mach/ioremap.h b/arch/mips/loongson32/include/mach/ioremap.h
new file mode 100644
index 0000000..2369393
--- /dev/null
+++ b/arch/mips/loongson32/include/mach/ioremap.h
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/ioremap.h>
diff --git a/arch/mips/include/asm/mach-loongson32/irq.h b/arch/mips/loongson32/include/mach/irq.h
similarity index 100%
rename from arch/mips/include/asm/mach-loongson32/irq.h
rename to arch/mips/loongson32/include/mach/irq.h
diff --git a/arch/mips/loongson32/include/mach/kernel-entry-init.h b/arch/mips/loongson32/include/mach/kernel-entry-init.h
new file mode 100644
index 0000000..19b872be
--- /dev/null
+++ b/arch/mips/loongson32/include/mach/kernel-entry-init.h
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/kernel-entry-init.h>
diff --git a/arch/mips/loongson32/include/mach/kmalloc.h b/arch/mips/loongson32/include/mach/kmalloc.h
new file mode 100644
index 0000000..4f056db
--- /dev/null
+++ b/arch/mips/loongson32/include/mach/kmalloc.h
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/kmalloc.h>
diff --git a/arch/mips/include/asm/mach-loongson32/loongson1.h b/arch/mips/loongson32/include/mach/loongson1.h
similarity index 91%
rename from arch/mips/include/asm/mach-loongson32/loongson1.h
rename to arch/mips/loongson32/include/mach/loongson1.h
index eb3ddbe..8b53f47 100644
--- a/arch/mips/include/asm/mach-loongson32/loongson1.h
+++ b/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 */
diff --git a/arch/mips/loongson32/include/mach/mangle-port.h b/arch/mips/loongson32/include/mach/mangle-port.h
new file mode 100644
index 0000000..b9736e3
--- /dev/null
+++ b/arch/mips/loongson32/include/mach/mangle-port.h
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/mangle-port.h>
diff --git a/arch/mips/include/asm/mach-loongson32/nand.h b/arch/mips/loongson32/include/mach/nand.h
similarity index 100%
rename from arch/mips/include/asm/mach-loongson32/nand.h
rename to arch/mips/loongson32/include/mach/nand.h
diff --git a/arch/mips/include/asm/mach-loongson32/platform.h b/arch/mips/loongson32/include/mach/platform.h
similarity index 95%
rename from arch/mips/include/asm/mach-loongson32/platform.h
rename to arch/mips/loongson32/include/mach/platform.h
index eb83e27..e2f8ac7 100644
--- a/arch/mips/include/asm/mach-loongson32/platform.h
+++ b/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;
diff --git a/arch/mips/include/asm/mach-loongson32/regs-clk.h b/arch/mips/loongson32/include/mach/regs-clk.h
similarity index 100%
rename from arch/mips/include/asm/mach-loongson32/regs-clk.h
rename to arch/mips/loongson32/include/mach/regs-clk.h
diff --git a/arch/mips/include/asm/mach-loongson32/regs-mux.h b/arch/mips/loongson32/include/mach/regs-mux.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
diff --git a/arch/mips/include/asm/mach-loongson32/regs-pwm.h b/arch/mips/loongson32/include/mach/regs-pwm.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
diff --git a/arch/mips/include/asm/mach-loongson32/regs-rtc.h b/arch/mips/loongson32/include/mach/regs-rtc.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
diff --git a/arch/mips/include/asm/mach-loongson32/regs-wdt.h b/arch/mips/loongson32/include/mach/regs-wdt.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
diff --git a/arch/mips/loongson32/include/mach/spaces.h b/arch/mips/loongson32/include/mach/spaces.h
new file mode 100644
index 0000000..39a4d72
--- /dev/null
+++ b/arch/mips/loongson32/include/mach/spaces.h
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/spaces.h>
diff --git a/arch/mips/loongson32/include/mach/topology.h b/arch/mips/loongson32/include/mach/topology.h
new file mode 100644
index 0000000..86e585b
--- /dev/null
+++ b/arch/mips/loongson32/include/mach/topology.h
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/topology.h>
diff --git a/arch/mips/loongson32/include/mach/war.h b/arch/mips/loongson32/include/mach/war.h
new file mode 100644
index 0000000..5b0422a
--- /dev/null
+++ b/arch/mips/loongson32/include/mach/war.h
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/war.h>
diff --git a/arch/mips/loongson32/ls1b/board.c b/arch/mips/loongson32/ls1b/board.c
index 727e067..555449e 100644
--- a/arch/mips/loongson32/ls1b/board.c
+++ b/arch/mips/loongson32/ls1b/board.c
@@ -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 = {
{
diff --git a/arch/mips/loongson32/ls1c/board.c b/arch/mips/loongson32/ls1c/board.c
index e9de6da..481512b 100644
--- a/arch/mips/loongson32/ls1c/board.c
+++ b/arch/mips/loongson32/ls1c/board.c
@@ -3,7 +3,7 @@
* Copyright (c) 2016 Yang Ling <gnaygnil@xxxxxxxxx>
*/

-#include <platform.h>
+#include <mach/platform.h>

static struct platform_device *ls1c_platform_devices[] __initdata = {
&ls1x_uart_pdev,
diff --git a/drivers/clk/loongson1/clk-loongson1b.c b/drivers/clk/loongson1/clk-loongson1b.c
index 13a2ca2..d590c1e 100644
--- a/drivers/clk/loongson1/clk-loongson1b.c
+++ b/drivers/clk/loongson1/clk-loongson1b.c
@@ -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)
diff --git a/drivers/clk/loongson1/clk-loongson1c.c b/drivers/clk/loongson1/clk-loongson1c.c
index 703f876..c58c3ad 100644
--- a/drivers/clk/loongson1/clk-loongson1c.c
+++ b/drivers/clk/loongson1/clk-loongson1c.c
@@ -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)
diff --git a/drivers/cpufreq/loongson1-cpufreq.c b/drivers/cpufreq/loongson1-cpufreq.c
index 0ea8877..3de842e 100644
--- a/drivers/cpufreq/loongson1-cpufreq.c
+++ b/drivers/cpufreq/loongson1-cpufreq.c
@@ -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;
diff --git a/drivers/rtc/rtc-ls1x.c b/drivers/rtc/rtc-ls1x.c
index 8bd3405..4d9128b 100644
--- a/drivers/rtc/rtc-ls1x.c
+++ b/drivers/rtc/rtc-ls1x.c
@@ -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) \
diff --git a/drivers/watchdog/loongson1_wdt.c b/drivers/watchdog/loongson1_wdt.c
index bb3d075c..fd6ef37 100644
--- a/drivers/watchdog/loongson1_wdt.c
+++ b/drivers/watchdog/loongson1_wdt.c
@@ -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

--
1.8.3.1