m32r: Rearrange platform-dependent codes
Hirokazu Takata [Wed, 1 Aug 2007 12:09:31 +0000 (21:09 +0900)]
Rearrange platform-dependent codes from arch/m32r/kernel/*.c
to arch/m32r/platforms/{platform}/.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>

27 files changed:
arch/m32r/Makefile
arch/m32r/kernel/Makefile
arch/m32r/platforms/Makefile [new file with mode: 0644]
arch/m32r/platforms/m32104ut/Makefile [new file with mode: 0644]
arch/m32r/platforms/m32104ut/io.c [moved from arch/m32r/kernel/io_m32104ut.c with 99% similarity]
arch/m32r/platforms/m32104ut/setup.c [moved from arch/m32r/kernel/setup_m32104ut.c with 98% similarity]
arch/m32r/platforms/m32700ut/Makefile [new file with mode: 0644]
arch/m32r/platforms/m32700ut/io.c [moved from arch/m32r/kernel/io_m32700ut.c with 99% similarity]
arch/m32r/platforms/m32700ut/setup.c [moved from arch/m32r/kernel/setup_m32700ut.c with 99% similarity]
arch/m32r/platforms/mappi/Makefile [new file with mode: 0644]
arch/m32r/platforms/mappi/io.c [moved from arch/m32r/kernel/io_mappi.c with 99% similarity]
arch/m32r/platforms/mappi/setup.c [moved from arch/m32r/kernel/setup_mappi.c with 99% similarity]
arch/m32r/platforms/mappi2/Makefile [new file with mode: 0644]
arch/m32r/platforms/mappi2/io.c [moved from arch/m32r/kernel/io_mappi2.c with 99% similarity]
arch/m32r/platforms/mappi2/setup.c [moved from arch/m32r/kernel/setup_mappi2.c with 99% similarity]
arch/m32r/platforms/mappi3/Makefile [new file with mode: 0644]
arch/m32r/platforms/mappi3/io.c [moved from arch/m32r/kernel/io_mappi3.c with 99% similarity]
arch/m32r/platforms/mappi3/setup.c [moved from arch/m32r/kernel/setup_mappi3.c with 99% similarity]
arch/m32r/platforms/oaks32r/Makefile [new file with mode: 0644]
arch/m32r/platforms/oaks32r/io.c [moved from arch/m32r/kernel/io_oaks32r.c with 99% similarity]
arch/m32r/platforms/oaks32r/setup.c [moved from arch/m32r/kernel/setup_oaks32r.c with 98% similarity]
arch/m32r/platforms/opsput/Makefile [new file with mode: 0644]
arch/m32r/platforms/opsput/io.c [moved from arch/m32r/kernel/io_opsput.c with 99% similarity]
arch/m32r/platforms/opsput/setup.c [moved from arch/m32r/kernel/setup_opsput.c with 99% similarity]
arch/m32r/platforms/usrv/Makefile [new file with mode: 0644]
arch/m32r/platforms/usrv/io.c [moved from arch/m32r/kernel/io_usrv.c with 98% similarity]
arch/m32r/platforms/usrv/setup.c [moved from arch/m32r/kernel/setup_usrv.c with 98% similarity]

index cdf63b2..60e12f3 100644 (file)
@@ -36,7 +36,8 @@ LIBGCC        := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
 libs-y += arch/m32r/lib/ $(LIBGCC)
 core-y += arch/m32r/kernel/    \
           arch/m32r/mm/        \
-          arch/m32r/boot/
+          arch/m32r/boot/      \
+          arch/m32r/platforms/
 
 drivers-$(CONFIG_OPROFILE)     += arch/m32r/oprofile/
 
index 5a2fa88..e97e26e 100644 (file)
@@ -8,14 +8,6 @@ obj-y  := process.o entry.o traps.o align.o irq.o setup.o time.o \
        m32r_ksyms.o sys_m32r.o semaphore.o signal.o ptrace.o
 
 obj-$(CONFIG_SMP)              += smp.o smpboot.o
-obj-$(CONFIG_PLAT_MAPPI)       += setup_mappi.o io_mappi.o
-obj-$(CONFIG_PLAT_MAPPI2)      += setup_mappi2.o io_mappi2.o
-obj-$(CONFIG_PLAT_MAPPI3)      += setup_mappi3.o io_mappi3.o
-obj-$(CONFIG_PLAT_USRV)                += setup_usrv.o io_usrv.o
-obj-$(CONFIG_PLAT_M32700UT)    += setup_m32700ut.o io_m32700ut.o
-obj-$(CONFIG_PLAT_OPSPUT)      += setup_opsput.o io_opsput.o
 obj-$(CONFIG_MODULES)          += module.o
-obj-$(CONFIG_PLAT_OAKS32R)     += setup_oaks32r.o io_oaks32r.o
-obj-$(CONFIG_PLAT_M32104UT)    += setup_m32104ut.o io_m32104ut.o
 
 EXTRA_AFLAGS   := -traditional
diff --git a/arch/m32r/platforms/Makefile b/arch/m32r/platforms/Makefile
new file mode 100644 (file)
index 0000000..da03e1a
--- /dev/null
@@ -0,0 +1,9 @@
+# arch/m32r/platforms/Makefile
+obj-$(CONFIG_PLAT_M32104UT)    += m32104ut/
+obj-$(CONFIG_PLAT_M32700UT)    += m32700ut/
+obj-$(CONFIG_PLAT_MAPPI)       += mappi/
+obj-$(CONFIG_PLAT_MAPPI2)      += mappi2/
+obj-$(CONFIG_PLAT_MAPPI3)      += mappi3/
+obj-$(CONFIG_PLAT_OAKS32R)     += oaks32r/
+obj-$(CONFIG_PLAT_OPSPUT)      += opsput/
+obj-$(CONFIG_PLAT_USRV)                += usrv/
diff --git a/arch/m32r/platforms/m32104ut/Makefile b/arch/m32r/platforms/m32104ut/Makefile
new file mode 100644 (file)
index 0000000..0de5908
--- /dev/null
@@ -0,0 +1 @@
+obj-y  := setup.o io.o
similarity index 99%
rename from arch/m32r/kernel/io_m32104ut.c
rename to arch/m32r/platforms/m32104ut/io.c
index 2189eca..e5d8be6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/m32r/kernel/io_m32104ut.c
+ *  linux/arch/m32r/platforms/m32104ut/io.c
  *
  *  Typical I/O routines for M32104UT board.
  *
similarity index 98%
rename from arch/m32r/kernel/setup_m32104ut.c
rename to arch/m32r/platforms/m32104ut/setup.c
index 1692b32..98138b4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/m32r/kernel/setup_m32104ut.c
+ *  linux/arch/m32r/platforms/m32104ut/setup.c
  *
  *  Setup routines for M32104UT Board
  *
diff --git a/arch/m32r/platforms/m32700ut/Makefile b/arch/m32r/platforms/m32700ut/Makefile
new file mode 100644 (file)
index 0000000..0de5908
--- /dev/null
@@ -0,0 +1 @@
+obj-y  := setup.o io.o
similarity index 99%
rename from arch/m32r/kernel/io_m32700ut.c
rename to arch/m32r/platforms/m32700ut/io.c
index 5898f40..6862586 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/m32r/kernel/io_m32700ut.c
+ *  linux/arch/m32r/platforms/m32700ut/io.c
  *
  *  Typical I/O routines for M32700UT board.
  *
similarity index 99%
rename from arch/m32r/kernel/setup_m32700ut.c
rename to arch/m32r/platforms/m32700ut/setup.c
index 7efc145..77b0ae9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/m32r/kernel/setup_m32700ut.c
+ *  linux/arch/m32r/platforms/m32700ut/setup.c
  *
  *  Setup routines for Renesas M32700UT Board
  *
diff --git a/arch/m32r/platforms/mappi/Makefile b/arch/m32r/platforms/mappi/Makefile
new file mode 100644 (file)
index 0000000..0de5908
--- /dev/null
@@ -0,0 +1 @@
+obj-y  := setup.o io.o
similarity index 99%
rename from arch/m32r/kernel/io_mappi.c
rename to arch/m32r/platforms/mappi/io.c
index 3139678..ac1c396 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/m32r/kernel/io_mappi.c
+ *  linux/arch/m32r/platforms/mappi/io.c
  *
  *  Typical I/O routines for Mappi board.
  *
similarity index 99%
rename from arch/m32r/kernel/setup_mappi.c
rename to arch/m32r/platforms/mappi/setup.c
index fe73c9e..3ec087f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/m32r/kernel/setup_mappi.c
+ *  linux/arch/m32r/platforms/mappi/setup.c
  *
  *  Setup routines for Renesas MAPPI Board
  *
diff --git a/arch/m32r/platforms/mappi2/Makefile b/arch/m32r/platforms/mappi2/Makefile
new file mode 100644 (file)
index 0000000..0de5908
--- /dev/null
@@ -0,0 +1 @@
+obj-y  := setup.o io.o
similarity index 99%
rename from arch/m32r/kernel/io_mappi2.c
rename to arch/m32r/platforms/mappi2/io.c
index ecc6aa8..da58960 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/m32r/kernel/io_mappi2.c
+ *  linux/arch/m32r/platforms/mappi2/io.c
  *
  *  Typical I/O routines for Mappi2 board.
  *
similarity index 99%
rename from arch/m32r/kernel/setup_mappi2.c
rename to arch/m32r/platforms/mappi2/setup.c
index 55abb21..d87969c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/m32r/kernel/setup_mappi2.c
+ *  linux/arch/m32r/platforms/mappi2/setup.c
  *
  *  Setup routines for Renesas MAPPI-II(M3A-ZA36) Board
  *
diff --git a/arch/m32r/platforms/mappi3/Makefile b/arch/m32r/platforms/mappi3/Makefile
new file mode 100644 (file)
index 0000000..0de5908
--- /dev/null
@@ -0,0 +1 @@
+obj-y  := setup.o io.o
similarity index 99%
rename from arch/m32r/kernel/io_mappi3.c
rename to arch/m32r/platforms/mappi3/io.c
index a13b5f6..1bc3f90 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/m32r/kernel/io_mappi3.c
+ *  linux/arch/m32r/platforms/mappi3/io.c
  *
  *  Typical I/O routines for Mappi3 board.
  *
similarity index 99%
rename from arch/m32r/kernel/setup_mappi3.c
rename to arch/m32r/platforms/mappi3/setup.c
index 93dc010..785b4bd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/m32r/kernel/setup_mappi3.c
+ *  linux/arch/m32r/platforms/mappi3/setup.c
  *
  *  Setup routines for Renesas MAPPI-III(M3A-2170) Board
  *
diff --git a/arch/m32r/platforms/oaks32r/Makefile b/arch/m32r/platforms/oaks32r/Makefile
new file mode 100644 (file)
index 0000000..0de5908
--- /dev/null
@@ -0,0 +1 @@
+obj-y  := setup.o io.o
similarity index 99%
rename from arch/m32r/kernel/io_oaks32r.c
rename to arch/m32r/platforms/oaks32r/io.c
index 068bf47..364a3b2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/m32r/kernel/io_oaks32r.c
+ *  linux/arch/m32r/platforms/oaks32r/io.c
  *
  *  Typical I/O routines for OAKS32R board.
  *
similarity index 98%
rename from arch/m32r/kernel/setup_oaks32r.c
rename to arch/m32r/platforms/oaks32r/setup.c
index cd62598..6faa5db 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/m32r/kernel/setup_oaks32r.c
+ *  linux/arch/m32r/platforms/oaks32r/setup.c
  *
  *  Setup routines for OAKS32R Board
  *
diff --git a/arch/m32r/platforms/opsput/Makefile b/arch/m32r/platforms/opsput/Makefile
new file mode 100644 (file)
index 0000000..0de5908
--- /dev/null
@@ -0,0 +1 @@
+obj-y  := setup.o io.o
similarity index 99%
rename from arch/m32r/kernel/io_opsput.c
rename to arch/m32r/platforms/opsput/io.c
index 3cbb1f7..379efb7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/m32r/kernel/io_opsput.c
+ *  linux/arch/m32r/platforms/opsput/io.c
  *
  *  Typical I/O routines for OPSPUT board.
  *
similarity index 99%
rename from arch/m32r/kernel/setup_opsput.c
rename to arch/m32r/platforms/opsput/setup.c
index 62d6b71..fab13fd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/m32r/kernel/setup_opsput.c
+ *  linux/arch/m32r/platforms/opsput/setup.c
  *
  *  Setup routines for Renesas OPSPUT Board
  *
diff --git a/arch/m32r/platforms/usrv/Makefile b/arch/m32r/platforms/usrv/Makefile
new file mode 100644 (file)
index 0000000..0de5908
--- /dev/null
@@ -0,0 +1 @@
+obj-y  := setup.o io.o
similarity index 98%
rename from arch/m32r/kernel/io_usrv.c
rename to arch/m32r/platforms/usrv/io.c
index a8c0e2e..f5e50d3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/m32r/kernel/io_usrv.c
+ *  linux/arch/m32r/platforms/usrv/io.c
  *
  *  Typical I/O routines for uServer board.
  *
@@ -17,7 +17,7 @@
 #include <asm/io.h>
 
 #include <linux/types.h>
-#include "../drivers/m32r_cfc.h"
+#include "../../../../drivers/pcmcia/m32r_cfc.h"
 
 extern void pcc_ioread_byte(int, unsigned long, void *, size_t, size_t, int);
 extern void pcc_ioread_word(int, unsigned long, void *, size_t, size_t, int);
similarity index 98%
rename from arch/m32r/kernel/setup_usrv.c
rename to arch/m32r/platforms/usrv/setup.c
index f5b4b5a..89588d6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/m32r/kernel/setup_usrv.c
+ *  linux/arch/m32r/platforms/usrv/setup.c
  *
  *  Setup routines for MITSUBISHI uServer
  *
@@ -198,7 +198,7 @@ void __init init_IRQ(void)
 #endif  /* CONFIG_SERIAL_M32R_SIO */
 
        /* INT#67-#71: CFC#0 IREQ on PLD */
-       for (i = 0 ; i < CONFIG_CFC_NUM ; i++ ) {
+       for (i = 0 ; i < CONFIG_M32R_CFC_NUM ; i++ ) {
                irq_desc[PLD_IRQ_CF0 + i].status = IRQ_DISABLED;
                irq_desc[PLD_IRQ_CF0 + i].chip = &m32700ut_pld_irq_type;
                irq_desc[PLD_IRQ_CF0 + i].action = 0;
@@ -246,4 +246,3 @@ void __init init_IRQ(void)
        icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD11;
        enable_mappi_irq(M32R_IRQ_INT1);
 }
-