From 2f2a2132ff056bb45697dc855eb4fd95b70b38cb Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 10 Apr 2009 14:33:48 +0100 Subject: [PATCH] Separate out the proc- and unit-specific header directories from the general MN10300 arch headers and place them instead in the same directories as contain the .c files for the processor and unit implementations. This permits the symlinks include/asm/proc and include/asm/unit to be dispensed with. This does, however, require that #include be converted to #include and similarly for asm/unit -> unit. Signed-off-by: David Howells --- arch/mn10300/Makefile | 40 ++----------------- arch/mn10300/include/asm/cache.h | 2 +- arch/mn10300/include/asm/irq.h | 2 +- arch/mn10300/include/asm/serial.h | 2 +- arch/mn10300/include/asm/timex.h | 2 +- arch/mn10300/kernel/entry.S | 2 +- arch/mn10300/kernel/gdb-io-serial-low.S | 2 +- arch/mn10300/kernel/gdb-io-serial.c | 2 +- arch/mn10300/kernel/gdb-io-ttysm-low.S | 2 +- arch/mn10300/kernel/gdb-io-ttysm.c | 2 +- arch/mn10300/kernel/gdb-stub.c | 4 +- arch/mn10300/kernel/head.S | 2 +- arch/mn10300/kernel/mn10300-serial-low.S | 4 +- arch/mn10300/kernel/mn10300-serial.c | 2 +- arch/mn10300/kernel/mn10300-watchdog.c | 2 +- arch/mn10300/kernel/setup.c | 2 +- arch/mn10300/kernel/traps.c | 2 +- .../include/proc}/cache.h | 0 .../include/proc}/clock.h | 2 +- .../include/proc}/irq.h | 0 .../include/proc}/proc.h | 0 .../include/unit}/clock.h | 0 .../include/unit}/leds.h | 0 .../include/unit}/serial.h | 2 +- .../include/unit}/smc91111.h | 0 .../include/unit}/timex.h | 2 +- arch/mn10300/unit-asb2303/leds.c | 2 +- arch/mn10300/unit-asb2303/smc91111.c | 2 +- .../include/unit}/clock.h | 0 .../include/unit}/leds.h | 0 .../include/unit}/serial.h | 2 +- .../include/unit}/timex.h | 2 +- arch/mn10300/unit-asb2305/leds.c | 2 +- arch/mn10300/unit-asb2305/unit-init.c | 2 +- drivers/net/smc91x.h | 2 +- 35 files changed, 31 insertions(+), 65 deletions(-) rename arch/mn10300/{include/asm/proc-mn103e010 => proc-mn103e010/include/proc}/cache.h (100%) rename arch/mn10300/{include/asm/proc-mn103e010 => proc-mn103e010/include/proc}/clock.h (94%) rename arch/mn10300/{include/asm/proc-mn103e010 => proc-mn103e010/include/proc}/irq.h (100%) rename arch/mn10300/{include/asm/proc-mn103e010 => proc-mn103e010/include/proc}/proc.h (100%) rename arch/mn10300/{include/asm/unit-asb2303 => unit-asb2303/include/unit}/clock.h (100%) rename arch/mn10300/{include/asm/unit-asb2303 => unit-asb2303/include/unit}/leds.h (100%) rename arch/mn10300/{include/asm/unit-asb2303 => unit-asb2303/include/unit}/serial.h (99%) rename arch/mn10300/{include/asm/unit-asb2303 => unit-asb2303/include/unit}/smc91111.h (100%) rename arch/mn10300/{include/asm/unit-asb2303 => unit-asb2303/include/unit}/timex.h (98%) rename arch/mn10300/{include/asm/unit-asb2305 => unit-asb2305/include/unit}/clock.h (100%) rename arch/mn10300/{include/asm/unit-asb2305 => unit-asb2305/include/unit}/leds.h (100%) rename arch/mn10300/{include/asm/unit-asb2305 => unit-asb2305/include/unit}/serial.h (99%) rename arch/mn10300/{include/asm/unit-asb2305 => unit-asb2305/include/unit}/timex.h (98%) diff --git a/arch/mn10300/Makefile b/arch/mn10300/Makefile index a5985ee9414..dd0c8ff52a6 100644 --- a/arch/mn10300/Makefile +++ b/arch/mn10300/Makefile @@ -94,42 +94,8 @@ ifdef CONFIG_DEBUG_INFO KBUILD_AFLAGS += -Wa,--gdwarf2 endif -################################################################################################### # -# juggle some symlinks in the MN10300 asm include dir +# include the appropriate processor- and unit-specific headers # -# Update machine proc and unit symlinks if something which affects -# them changed. We use .proc / .unit to indicate when they were -# updated last, otherwise make uses the target directory mtime. -# -################################################################################################### - -# processor specific definitions -arch/mn10300/include/asm/.proc: $(wildcard include/config/proc/*.h) include/config/auto.conf - @echo ' SYMLINK arch/mn10300/include/asm/proc -> arch/mn10300/include/asm/proc-$(PROCESSOR)' -ifneq ($(KBUILD_SRC),) - $(Q)mkdir -p arch/mn10300/include/asm - $(Q)ln -fsn $(srctree)/arch/mn10300/include/asm/proc-$(PROCESSOR) arch/mn10300/include/asm/proc -else - $(Q)ln -fsn proc-$(PROCESSOR) arch/mn10300/include/asm/proc -endif - @touch $@ - -CLEAN_FILES += arch/mn10300/include/asm/proc arch/mn10300/include/asm/.proc - -prepare: arch/mn10300/include/asm/.proc - -# unit specific definitions -arch/mn10300/include/asm/.unit: $(wildcard include/config/unit/*.h) include/config/auto.conf - @echo ' SYMLINK arch/mn10300/include/asm/unit -> arch/mn10300/include/asm/unit-$(UNIT)' -ifneq ($(KBUILD_SRC),) - $(Q)mkdir -p arch/mn10300/include/asm - $(Q)ln -fsn $(srctree)/arch/mn10300/include/asm/unit-$(UNIT) arch/mn10300/include/asm/unit -else - $(Q)ln -fsn unit-$(UNIT) arch/mn10300/include/asm/unit -endif - @touch $@ - -CLEAN_FILES += arch/mn10300/include/asm/unit arch/mn10300/include/asm/.unit - -prepare: arch/mn10300/include/asm/.unit +KBUILD_CPPFLAGS += -I$(srctree)/arch/mn10300/proc-$(PROCESSOR)/include +KBUILD_CPPFLAGS += -I$(srctree)/arch/mn10300/unit-$(UNIT)/include diff --git a/arch/mn10300/include/asm/cache.h b/arch/mn10300/include/asm/cache.h index 9e01122208a..e03cfa2e997 100644 --- a/arch/mn10300/include/asm/cache.h +++ b/arch/mn10300/include/asm/cache.h @@ -13,7 +13,7 @@ #define _ASM_CACHE_H #include -#include +#include #ifndef __ASSEMBLY__ #define L1_CACHE_DISPARITY (L1_CACHE_NENTRIES * L1_CACHE_BYTES) diff --git a/arch/mn10300/include/asm/irq.h b/arch/mn10300/include/asm/irq.h index 53b38011690..25c045d16d1 100644 --- a/arch/mn10300/include/asm/irq.h +++ b/arch/mn10300/include/asm/irq.h @@ -16,7 +16,7 @@ #include #include -#include +#include /* this number is used when no interrupt has been assigned */ #define NO_IRQ INT_MAX diff --git a/arch/mn10300/include/asm/serial.h b/arch/mn10300/include/asm/serial.h index 99785a9dead..a29445cddd6 100644 --- a/arch/mn10300/include/asm/serial.h +++ b/arch/mn10300/include/asm/serial.h @@ -33,4 +33,4 @@ #define RS_TABLE_SIZE #endif -#include +#include diff --git a/arch/mn10300/include/asm/timex.h b/arch/mn10300/include/asm/timex.h index 3944277dab6..8d031f9e117 100644 --- a/arch/mn10300/include/asm/timex.h +++ b/arch/mn10300/include/asm/timex.h @@ -12,7 +12,7 @@ #define _ASM_TIMEX_H #include -#include +#include #define TICK_SIZE (tick_nsec / 1000) diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S index ceeaaaa359e..34ab5a29315 100644 --- a/arch/mn10300/kernel/entry.S +++ b/arch/mn10300/kernel/entry.S @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arch/mn10300/kernel/gdb-io-serial-low.S b/arch/mn10300/kernel/gdb-io-serial-low.S index c68dcd05220..4998b24f5d3 100644 --- a/arch/mn10300/kernel/gdb-io-serial-low.S +++ b/arch/mn10300/kernel/gdb-io-serial-low.S @@ -18,7 +18,7 @@ #include #include #include -#include +#include .text diff --git a/arch/mn10300/kernel/gdb-io-serial.c b/arch/mn10300/kernel/gdb-io-serial.c index 11584c51acd..ae663dc717e 100644 --- a/arch/mn10300/kernel/gdb-io-serial.c +++ b/arch/mn10300/kernel/gdb-io-serial.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include /* * initialise the GDB stub diff --git a/arch/mn10300/kernel/gdb-io-ttysm-low.S b/arch/mn10300/kernel/gdb-io-ttysm-low.S index 677c7876307..060b7cca735 100644 --- a/arch/mn10300/kernel/gdb-io-ttysm-low.S +++ b/arch/mn10300/kernel/gdb-io-ttysm-low.S @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include "mn10300-serial.h" .text diff --git a/arch/mn10300/kernel/gdb-io-ttysm.c b/arch/mn10300/kernel/gdb-io-ttysm.c index e94c25e8ca0..a560bbc3137 100644 --- a/arch/mn10300/kernel/gdb-io-ttysm.c +++ b/arch/mn10300/kernel/gdb-io-ttysm.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include "mn10300-serial.h" #if defined(CONFIG_GDBSTUB_ON_TTYSM0) diff --git a/arch/mn10300/kernel/gdb-stub.c b/arch/mn10300/kernel/gdb-stub.c index 0ea7482c152..41b11706c8e 100644 --- a/arch/mn10300/kernel/gdb-stub.c +++ b/arch/mn10300/kernel/gdb-stub.c @@ -136,8 +136,8 @@ #include #include #include -#include -#include +#include +#include /* define to use F7F7 rather than FF which is subverted by JTAG debugger */ #undef GDBSTUB_USE_F7F7_AS_BREAKPOINT diff --git a/arch/mn10300/kernel/head.S b/arch/mn10300/kernel/head.S index 606bd8c6758..8a8309fbe3c 100644 --- a/arch/mn10300/kernel/head.S +++ b/arch/mn10300/kernel/head.S @@ -17,7 +17,7 @@ #include #include #include -#include +#include .section .text.head,"ax" diff --git a/arch/mn10300/kernel/mn10300-serial-low.S b/arch/mn10300/kernel/mn10300-serial-low.S index ef3f4c1df2a..22448538822 100644 --- a/arch/mn10300/kernel/mn10300-serial-low.S +++ b/arch/mn10300/kernel/mn10300-serial-low.S @@ -18,8 +18,8 @@ #include #include #include -#include -#include +#include +#include #include "mn10300-serial.h" #define SCxCTR 0x00 diff --git a/arch/mn10300/kernel/mn10300-serial.c b/arch/mn10300/kernel/mn10300-serial.c index 59b9c4bf958..2fd59664d00 100644 --- a/arch/mn10300/kernel/mn10300-serial.c +++ b/arch/mn10300/kernel/mn10300-serial.c @@ -41,7 +41,7 @@ static const char serial_revdate[] = "2007-11-06"; #include #include #include -#include +#include #include "mn10300-serial.h" static inline __attribute__((format(printf, 1, 2))) diff --git a/arch/mn10300/kernel/mn10300-watchdog.c b/arch/mn10300/kernel/mn10300-watchdog.c index 2e370d88a87..f362d9d138f 100644 --- a/arch/mn10300/kernel/mn10300-watchdog.c +++ b/arch/mn10300/kernel/mn10300-watchdog.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include static DEFINE_SPINLOCK(watchdog_print_lock); static unsigned int watchdog; diff --git a/arch/mn10300/kernel/setup.c b/arch/mn10300/kernel/setup.c index e1d88ab5100..71414e19fd1 100644 --- a/arch/mn10300/kernel/setup.c +++ b/arch/mn10300/kernel/setup.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arch/mn10300/kernel/traps.c b/arch/mn10300/kernel/traps.c index fcb9a03d46a..681ad8c9e4f 100644 --- a/arch/mn10300/kernel/traps.c +++ b/arch/mn10300/kernel/traps.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arch/mn10300/include/asm/proc-mn103e010/cache.h b/arch/mn10300/proc-mn103e010/include/proc/cache.h similarity index 100% rename from arch/mn10300/include/asm/proc-mn103e010/cache.h rename to arch/mn10300/proc-mn103e010/include/proc/cache.h diff --git a/arch/mn10300/include/asm/proc-mn103e010/clock.h b/arch/mn10300/proc-mn103e010/include/proc/clock.h similarity index 94% rename from arch/mn10300/include/asm/proc-mn103e010/clock.h rename to arch/mn10300/proc-mn103e010/include/proc/clock.h index caf99835063..aa23e147d62 100644 --- a/arch/mn10300/include/asm/proc-mn103e010/clock.h +++ b/arch/mn10300/proc-mn103e010/include/proc/clock.h @@ -11,7 +11,7 @@ #ifndef _ASM_PROC_CLOCK_H #define _ASM_PROC_CLOCK_H -#include +#include #define MN10300_WDCLK MN10300_IOCLK diff --git a/arch/mn10300/include/asm/proc-mn103e010/irq.h b/arch/mn10300/proc-mn103e010/include/proc/irq.h similarity index 100% rename from arch/mn10300/include/asm/proc-mn103e010/irq.h rename to arch/mn10300/proc-mn103e010/include/proc/irq.h diff --git a/arch/mn10300/include/asm/proc-mn103e010/proc.h b/arch/mn10300/proc-mn103e010/include/proc/proc.h similarity index 100% rename from arch/mn10300/include/asm/proc-mn103e010/proc.h rename to arch/mn10300/proc-mn103e010/include/proc/proc.h diff --git a/arch/mn10300/include/asm/unit-asb2303/clock.h b/arch/mn10300/unit-asb2303/include/unit/clock.h similarity index 100% rename from arch/mn10300/include/asm/unit-asb2303/clock.h rename to arch/mn10300/unit-asb2303/include/unit/clock.h diff --git a/arch/mn10300/include/asm/unit-asb2303/leds.h b/arch/mn10300/unit-asb2303/include/unit/leds.h similarity index 100% rename from arch/mn10300/include/asm/unit-asb2303/leds.h rename to arch/mn10300/unit-asb2303/include/unit/leds.h diff --git a/arch/mn10300/include/asm/unit-asb2303/serial.h b/arch/mn10300/unit-asb2303/include/unit/serial.h similarity index 99% rename from arch/mn10300/include/asm/unit-asb2303/serial.h rename to arch/mn10300/unit-asb2303/include/unit/serial.h index 0d55cf5896a..047566cd2e3 100644 --- a/arch/mn10300/include/asm/unit-asb2303/serial.h +++ b/arch/mn10300/unit-asb2303/include/unit/serial.h @@ -13,7 +13,7 @@ #define _ASM_UNIT_SERIAL_H #include -#include +#include #include #define SERIAL_PORT0_BASE_ADDRESS 0xA6FB0000 diff --git a/arch/mn10300/include/asm/unit-asb2303/smc91111.h b/arch/mn10300/unit-asb2303/include/unit/smc91111.h similarity index 100% rename from arch/mn10300/include/asm/unit-asb2303/smc91111.h rename to arch/mn10300/unit-asb2303/include/unit/smc91111.h diff --git a/arch/mn10300/include/asm/unit-asb2303/timex.h b/arch/mn10300/unit-asb2303/include/unit/timex.h similarity index 98% rename from arch/mn10300/include/asm/unit-asb2303/timex.h rename to arch/mn10300/unit-asb2303/include/unit/timex.h index 7e54b0cfdd0..f206b63c95b 100644 --- a/arch/mn10300/include/asm/unit-asb2303/timex.h +++ b/arch/mn10300/unit-asb2303/include/unit/timex.h @@ -16,7 +16,7 @@ #endif /* __ASSEMBLY__ */ #include -#include +#include /* * jiffies counter specifications diff --git a/arch/mn10300/unit-asb2303/leds.c b/arch/mn10300/unit-asb2303/leds.c index cd4bc78ccfc..c03839357a1 100644 --- a/arch/mn10300/unit-asb2303/leds.c +++ b/arch/mn10300/unit-asb2303/leds.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #if 0 static const u8 asb2303_led_hex_tbl[16] = { diff --git a/arch/mn10300/unit-asb2303/smc91111.c b/arch/mn10300/unit-asb2303/smc91111.c index 30875dd6563..43c24643941 100644 --- a/arch/mn10300/unit-asb2303/smc91111.c +++ b/arch/mn10300/unit-asb2303/smc91111.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include static struct resource smc91c111_resources[] = { [0] = { diff --git a/arch/mn10300/include/asm/unit-asb2305/clock.h b/arch/mn10300/unit-asb2305/include/unit/clock.h similarity index 100% rename from arch/mn10300/include/asm/unit-asb2305/clock.h rename to arch/mn10300/unit-asb2305/include/unit/clock.h diff --git a/arch/mn10300/include/asm/unit-asb2305/leds.h b/arch/mn10300/unit-asb2305/include/unit/leds.h similarity index 100% rename from arch/mn10300/include/asm/unit-asb2305/leds.h rename to arch/mn10300/unit-asb2305/include/unit/leds.h diff --git a/arch/mn10300/include/asm/unit-asb2305/serial.h b/arch/mn10300/unit-asb2305/include/unit/serial.h similarity index 99% rename from arch/mn10300/include/asm/unit-asb2305/serial.h rename to arch/mn10300/unit-asb2305/include/unit/serial.h index 73d31d67bb7..3bfc9093878 100644 --- a/arch/mn10300/include/asm/unit-asb2305/serial.h +++ b/arch/mn10300/unit-asb2305/include/unit/serial.h @@ -12,7 +12,7 @@ #define _ASM_UNIT_SERIAL_H #include -#include +#include #include #define SERIAL_PORT0_BASE_ADDRESS 0xA6FB0000 diff --git a/arch/mn10300/include/asm/unit-asb2305/timex.h b/arch/mn10300/unit-asb2305/include/unit/timex.h similarity index 98% rename from arch/mn10300/include/asm/unit-asb2305/timex.h rename to arch/mn10300/unit-asb2305/include/unit/timex.h index 10e1bfe3446..a71c49aa85e 100644 --- a/arch/mn10300/include/asm/unit-asb2305/timex.h +++ b/arch/mn10300/unit-asb2305/include/unit/timex.h @@ -16,7 +16,7 @@ #endif /* __ASSEMBLY__ */ #include -#include +#include /* * jiffies counter specifications diff --git a/arch/mn10300/unit-asb2305/leds.c b/arch/mn10300/unit-asb2305/leds.c index e99dcc9cee1..d345ff9042d 100644 --- a/arch/mn10300/unit-asb2305/leds.c +++ b/arch/mn10300/unit-asb2305/leds.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include static const u8 asb2305_led_hex_tbl[16] = { 0x80, 0xf2, 0x48, 0x60, 0x32, 0x24, 0x04, 0xf0, diff --git a/arch/mn10300/unit-asb2305/unit-init.c b/arch/mn10300/unit-asb2305/unit-init.c index 72812a9439a..1c452cc3f6e 100644 --- a/arch/mn10300/unit-asb2305/unit-init.c +++ b/arch/mn10300/unit-asb2305/unit-init.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include /* * initialise some of the unit hardware before gdbstub is set up diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index 912308eec86..329f890e290 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h @@ -369,7 +369,7 @@ static inline void LPD7_SMC_outsw (unsigned char* a, int r, * MN10300/AM33 configuration */ -#include +#include #else