@@ -981,6 +981,7 @@ config MIKROTIK_RB532
select BOOT_RAW
select GPIOLIB
select MIPS_L1_CACHE_SHIFT_4
+ select HAVE_MACH_HEAD_FILES
help
Support the Mikrotik(tm) RouterBoard 532 series,
based on the IDT RC32434 SoC.
@@ -28,8 +28,8 @@
#include <linux/pci.h>
#include <linux/kernel.h>
-#include <asm/mach-rc32434/rc32434.h>
-#include <asm/mach-rc32434/irq.h>
+#include <mach/rc32434.h>
+#include <mach/irq.h>
static int irq_map[2][12] = {
{0, 0, 2, 3, 2, 3, 0, 0, 0, 0, 0, 1},
@@ -31,8 +31,8 @@
#include <linux/types.h>
#include <asm/cpu.h>
-#include <asm/mach-rc32434/rc32434.h>
-#include <asm/mach-rc32434/pci.h>
+#include <mach/rc32434.h>
+#include <mach/pci.h>
#define PCI_ACCESS_READ 0
#define PCI_ACCESS_WRITE 1
@@ -30,8 +30,8 @@
#include <linux/kernel.h>
#include <linux/init.h>
-#include <asm/mach-rc32434/rc32434.h>
-#include <asm/mach-rc32434/pci.h>
+#include <mach/rc32434.h>
+#include <mach/pci.h>
#define PCI_ACCESS_READ 0
#define PCI_ACCESS_WRITE 1
@@ -3,5 +3,5 @@
#
platform-$(CONFIG_MIKROTIK_RB532) += rb532/
cflags-$(CONFIG_MIKROTIK_RB532) += \
- -I$(srctree)/arch/mips/include/asm/mach-rc32434
+ -I$(srctree)/arch/mips/rb532/include
load-$(CONFIG_MIKROTIK_RB532) += 0xffffffff80101000
@@ -21,14 +21,14 @@
#include <asm/bootinfo.h>
-#include <asm/mach-rc32434/rc32434.h>
-#include <asm/mach-rc32434/dma.h>
-#include <asm/mach-rc32434/dma_v.h>
-#include <asm/mach-rc32434/eth.h>
-#include <asm/mach-rc32434/rb.h>
-#include <asm/mach-rc32434/integ.h>
-#include <asm/mach-rc32434/gpio.h>
-#include <asm/mach-rc32434/irq.h>
+#include <mach/rc32434.h>
+#include <mach/dma.h>
+#include <mach/dma_v.h>
+#include <mach/eth.h>
+#include <mach/rb.h>
+#include <mach/integ.h>
+#include <mach/gpio.h>
+#include <mach/irq.h>
#define ETH0_RX_DMA_ADDR (DMA0_BASE_ADDR + 0 * DMA_CHAN_OFFSET)
#define ETH0_TX_DMA_ADDR (DMA0_BASE_ADDR + 1 * DMA_CHAN_OFFSET)
@@ -34,8 +34,8 @@
#include <linux/platform_device.h>
#include <linux/gpio/driver.h>
-#include <asm/mach-rc32434/rb.h>
-#include <asm/mach-rc32434/gpio.h>
+#include <mach/rb.h>
+#include <mach/gpio.h>
struct rb532_gpio_chip {
struct gpio_chip chip;
similarity index 100%
rename from arch/mips/include/asm/mach-rc32434/cpu-feature-overrides.h
rename to arch/mips/rb532/include/mach/cpu-feature-overrides.h
similarity index 99%
rename from arch/mips/include/asm/mach-rc32434/ddr.h
rename to arch/mips/rb532/include/mach/ddr.h
@@ -29,7 +29,7 @@
#ifndef _ASM_RC32434_DDR_H_
#define _ASM_RC32434_DDR_H_
-#include <asm/mach-rc32434/rb.h>
+#include <mach/rb.h>
/* DDR register structure */
struct ddr_ram {
similarity index 98%
rename from arch/mips/include/asm/mach-rc32434/dma.h
rename to arch/mips/rb532/include/mach/dma.h
@@ -12,7 +12,7 @@
#ifndef __ASM_RC32434_DMA_H
#define __ASM_RC32434_DMA_H
-#include <asm/mach-rc32434/rb.h>
+#include <mach/rb.h>
#define DMA0_BASE_ADDR 0x18040000
similarity index 93%
rename from arch/mips/include/asm/mach-rc32434/dma_v.h
rename to arch/mips/rb532/include/mach/dma_v.h
@@ -12,8 +12,8 @@
#ifndef _ASM_RC32434_DMA_V_H_
#define _ASM_RC32434_DMA_V_H_
-#include <asm/mach-rc32434/dma.h>
-#include <asm/mach-rc32434/rc32434.h>
+#include <mach/dma.h>
+#include <mach/rc32434.h>
#define DMA_CHAN_OFFSET 0x14
#define IS_DMA_USED(X) (((X) & \
similarity index 100%
rename from arch/mips/include/asm/mach-rc32434/eth.h
rename to arch/mips/rb532/include/mach/eth.h
similarity index 100%
rename from arch/mips/include/asm/mach-rc32434/gpio.h
rename to arch/mips/rb532/include/mach/gpio.h
new file mode 100644
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/ide.h>
similarity index 98%
rename from arch/mips/include/asm/mach-rc32434/integ.h
rename to arch/mips/rb532/include/mach/integ.h
@@ -29,7 +29,7 @@
#ifndef __RC32434_INTEG_H__
#define __RC32434_INTEG_H__
-#include <asm/mach-rc32434/rb.h>
+#include <mach/rb.h>
#define INTEG0_BASE_ADDR 0x18030030
new file mode 100644
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/ioremap.h>
similarity index 96%
rename from arch/mips/include/asm/mach-rc32434/irq.h
rename to arch/mips/rb532/include/mach/irq.h
@@ -5,7 +5,7 @@
#define NR_IRQS 256
#include <asm/mach-generic/irq.h>
-#include <asm/mach-rc32434/rb.h>
+#include <mach/rb.h>
/* Interrupt Controller */
#define IC_GROUP0_PEND (REGBASE + 0x38000)
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>
new file mode 100644
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/mangle-port.h>
new file mode 100644
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/mc146818rtc.h>
similarity index 100%
rename from arch/mips/include/asm/mach-rc32434/pci.h
rename to arch/mips/rb532/include/mach/pci.h
similarity index 100%
rename from arch/mips/include/asm/mach-rc32434/prom.h
rename to arch/mips/rb532/include/mach/prom.h
similarity index 100%
rename from arch/mips/include/asm/mach-rc32434/rb.h
rename to arch/mips/rb532/include/mach/rb.h
similarity index 100%
rename from arch/mips/include/asm/mach-rc32434/rc32434.h
rename to arch/mips/rb532/include/mach/rc32434.h
new file mode 100644
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/spaces.h>
similarity index 98%
rename from arch/mips/include/asm/mach-rc32434/timer.h
rename to arch/mips/rb532/include/mach/timer.h
@@ -29,7 +29,7 @@
#ifndef __ASM_RC32434_TIMER_H
#define __ASM_RC32434_TIMER_H
-#include <asm/mach-rc32434/rb.h>
+#include <mach/rb.h>
#define TIMER0_BASE_ADDR 0x18028000
#define TIMER_COUNT 3
new file mode 100644
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/mach-generic/topology.h>
similarity index 100%
rename from arch/mips/include/asm/mach-rc32434/war.h
rename to arch/mips/rb532/include/mach/war.h
@@ -42,8 +42,8 @@
#include <asm/time.h>
#include <asm/mipsregs.h>
-#include <asm/mach-rc32434/irq.h>
-#include <asm/mach-rc32434/gpio.h>
+#include <mach/irq.h>
+#include <mach/gpio.h>
struct intr_group {
u32 mask; /* mask of valid bits in pending/mask registers */
@@ -19,8 +19,8 @@
#include <linux/blkdev.h>
#include <asm/bootinfo.h>
-#include <asm/mach-rc32434/ddr.h>
-#include <asm/mach-rc32434/prom.h>
+#include <mach/ddr.h>
+#include <mach/prom.h>
unsigned int idt_cpu_freq = 132000000;
EXPORT_SYMBOL(idt_cpu_freq);
@@ -32,7 +32,7 @@
#include <linux/irq.h>
#include <asm/serial.h>
-#include <asm/mach-rc32434/rb.h>
+#include <mach/rb.h>
extern unsigned int idt_cpu_freq;
@@ -11,8 +11,8 @@
#include <asm/time.h>
#include <linux/ioport.h>
-#include <asm/mach-rc32434/rb.h>
-#include <asm/mach-rc32434/pci.h>
+#include <mach/rb.h>
+#include <mach/pci.h>
struct pci_reg __iomem *pci_reg;
EXPORT_SYMBOL(pci_reg);
@@ -17,7 +17,7 @@
#include <asm/mipsregs.h>
#include <asm/time.h>
-#include <asm/mach-rc32434/rc32434.h>
+#include <mach/rc32434.h>
extern unsigned int idt_cpu_freq;
@@ -28,7 +28,7 @@
#include <linux/libata.h>
#include <scsi/scsi_host.h>
-#include <asm/mach-rc32434/rb.h>
+#include <mach/rb.h>
#define DRV_NAME "pata-rb532-cf"
#define DRV_VERSION "0.1.0"
@@ -10,8 +10,8 @@
#include <linux/platform_device.h>
#include <linux/gpio.h>
-#include <asm/mach-rc32434/gpio.h>
-#include <asm/mach-rc32434/rb.h>
+#include <mach/gpio.h>
+#include <mach/rb.h>
#define DRV_NAME "rb532-button"
@@ -13,8 +13,8 @@
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <asm/mach-rc32434/gpio.h>
-#include <asm/mach-rc32434/rb.h>
+#include <mach/gpio.h>
+#include <mach/rb.h>
static void rb532_led_set(struct led_classdev *cdev,
enum led_brightness brightness)
@@ -60,10 +60,10 @@
#include <asm/io.h>
#include <asm/dma.h>
-#include <asm/mach-rc32434/rb.h>
-#include <asm/mach-rc32434/rc32434.h>
-#include <asm/mach-rc32434/eth.h>
-#include <asm/mach-rc32434/dma_v.h>
+#include <mach/rb.h>
+#include <mach/rc32434.h>
+#include <mach/eth.h>
+#include <mach/dma_v.h>
#define DRV_NAME "korina"
#define DRV_VERSION "0.20"
@@ -28,7 +28,7 @@
#include <linux/uaccess.h> /* For copy_to_user/put_user/... */
#include <linux/io.h> /* For devm_ioremap */
-#include <asm/mach-rc32434/integ.h> /* For the Watchdog registers */
+#include <mach/integ.h> /* For the Watchdog registers */
#define VERSION "1.0"
Remove header files from arch/mips/include/asm/mach-rc32434 to arch/mips/rb532/include/mach Signed-off-by: bibo mao <maobibo@loongson.cn> --- arch/mips/Kconfig | 1 + arch/mips/pci/fixup-rc32434.c | 4 ++-- arch/mips/pci/ops-rc32434.c | 4 ++-- arch/mips/pci/pci-rc32434.c | 4 ++-- arch/mips/rb532/Platform | 2 +- arch/mips/rb532/devices.c | 16 ++++++++-------- arch/mips/rb532/gpio.c | 4 ++-- .../include/mach}/cpu-feature-overrides.h | 0 .../asm/mach-rc32434 => rb532/include/mach}/ddr.h | 2 +- .../asm/mach-rc32434 => rb532/include/mach}/dma.h | 2 +- .../asm/mach-rc32434 => rb532/include/mach}/dma_v.h | 4 ++-- .../asm/mach-rc32434 => rb532/include/mach}/eth.h | 0 .../asm/mach-rc32434 => rb532/include/mach}/gpio.h | 0 arch/mips/rb532/include/mach/ide.h | 2 ++ .../asm/mach-rc32434 => rb532/include/mach}/integ.h | 2 +- arch/mips/rb532/include/mach/ioremap.h | 2 ++ .../asm/mach-rc32434 => rb532/include/mach}/irq.h | 2 +- arch/mips/rb532/include/mach/kernel-entry-init.h | 2 ++ arch/mips/rb532/include/mach/kmalloc.h | 2 ++ arch/mips/rb532/include/mach/mangle-port.h | 2 ++ arch/mips/rb532/include/mach/mc146818rtc.h | 2 ++ .../asm/mach-rc32434 => rb532/include/mach}/pci.h | 0 .../asm/mach-rc32434 => rb532/include/mach}/prom.h | 0 .../asm/mach-rc32434 => rb532/include/mach}/rb.h | 0 .../asm/mach-rc32434 => rb532/include/mach}/rc32434.h | 0 arch/mips/rb532/include/mach/spaces.h | 2 ++ .../asm/mach-rc32434 => rb532/include/mach}/timer.h | 2 +- arch/mips/rb532/include/mach/topology.h | 2 ++ .../asm/mach-rc32434 => rb532/include/mach}/war.h | 0 arch/mips/rb532/irq.c | 4 ++-- arch/mips/rb532/prom.c | 4 ++-- arch/mips/rb532/serial.c | 2 +- arch/mips/rb532/setup.c | 4 ++-- arch/mips/rb532/time.c | 2 +- drivers/ata/pata_rb532_cf.c | 2 +- drivers/input/misc/rb532_button.c | 4 ++-- drivers/leds/leds-rb532.c | 4 ++-- drivers/net/ethernet/korina.c | 8 ++++---- drivers/watchdog/rc32434_wdt.c | 2 +- 39 files changed, 59 insertions(+), 42 deletions(-) rename arch/mips/{include/asm/mach-rc32434 => rb532/include/mach}/cpu-feature-overrides.h (100%) rename arch/mips/{include/asm/mach-rc32434 => rb532/include/mach}/ddr.h (99%) rename arch/mips/{include/asm/mach-rc32434 => rb532/include/mach}/dma.h (98%) rename arch/mips/{include/asm/mach-rc32434 => rb532/include/mach}/dma_v.h (93%) rename arch/mips/{include/asm/mach-rc32434 => rb532/include/mach}/eth.h (100%) rename arch/mips/{include/asm/mach-rc32434 => rb532/include/mach}/gpio.h (100%) create mode 100644 arch/mips/rb532/include/mach/ide.h rename arch/mips/{include/asm/mach-rc32434 => rb532/include/mach}/integ.h (98%) create mode 100644 arch/mips/rb532/include/mach/ioremap.h rename arch/mips/{include/asm/mach-rc32434 => rb532/include/mach}/irq.h (96%) create mode 100644 arch/mips/rb532/include/mach/kernel-entry-init.h create mode 100644 arch/mips/rb532/include/mach/kmalloc.h create mode 100644 arch/mips/rb532/include/mach/mangle-port.h create mode 100644 arch/mips/rb532/include/mach/mc146818rtc.h rename arch/mips/{include/asm/mach-rc32434 => rb532/include/mach}/pci.h (100%) rename arch/mips/{include/asm/mach-rc32434 => rb532/include/mach}/prom.h (100%) rename arch/mips/{include/asm/mach-rc32434 => rb532/include/mach}/rb.h (100%) rename arch/mips/{include/asm/mach-rc32434 => rb532/include/mach}/rc32434.h (100%) create mode 100644 arch/mips/rb532/include/mach/spaces.h rename arch/mips/{include/asm/mach-rc32434 => rb532/include/mach}/timer.h (98%) create mode 100644 arch/mips/rb532/include/mach/topology.h rename arch/mips/{include/asm/mach-rc32434 => rb532/include/mach}/war.h (100%)