]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: 7671/1: use Kconfig to select uncompress.h
authorShawn Guo <shawn.guo@linaro.org>
Thu, 14 Mar 2013 07:47:27 +0000 (08:47 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 15 Mar 2013 17:18:51 +0000 (17:18 +0000)
Following the approach handling DEBUG_LL inclusion, the patch creates
a Kconfig symbol CONFIG_UNCOMPRESS_INCLUDE for choosing the correct
uncompress header.  For traditional build, mach/uncompress.h will be
included in arch/arm/boot/compressed/misc.c.  For multiplatform build,
debug/uncompress.h which contains a suite of empty functions will be
used.  In this way, a platform with particular uncompress.h
implementation could choose its own uncompress.h with this Kconfig
option.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/Kconfig.debug
arch/arm/boot/compressed/misc.c
arch/arm/include/debug/uncompress.h [new file with mode: 0644]

index acddddac7ee46fb961e8ba1fe86d038276d0a632..fc54a5bcf5abd063599c6f45e49217451eedd119 100644 (file)
@@ -601,6 +601,11 @@ config DEBUG_LL_INCLUDE
        default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1
        default "mach/debug-macro.S"
 
+config UNCOMPRESS_INCLUDE
+       string
+       default "debug/uncompress.h" if ARCH_MULTIPLATFORM
+       default "mach/uncompress.h"
+
 config EARLY_PRINTK
        bool "Early printk"
        depends on DEBUG_LL
index df899834d84ed688a8e77e90e0b584789aba6243..31bd43b8209585d807d745309057013ba627b8a5 100644 (file)
@@ -25,13 +25,7 @@ unsigned int __machine_arch_type;
 static void putstr(const char *ptr);
 extern void error(char *x);
 
-#ifdef CONFIG_ARCH_MULTIPLATFORM
-static inline void putc(int c) {}
-static inline void flush(void) {}
-static inline void arch_decomp_setup(void) {}
-#else
-#include <mach/uncompress.h>
-#endif
+#include CONFIG_UNCOMPRESS_INCLUDE
 
 #ifdef CONFIG_DEBUG_ICEDCC
 
diff --git a/arch/arm/include/debug/uncompress.h b/arch/arm/include/debug/uncompress.h
new file mode 100644 (file)
index 0000000..e19955d
--- /dev/null
@@ -0,0 +1,3 @@
+static inline void putc(int c) {}
+static inline void flush(void) {}
+static inline void arch_decomp_setup(void) {}