aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2013-03-14 03:47:27 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-03-15 13:18:51 -0400
commit615967b00fecc9e636dc59bf1ee322274f7dd041 (patch)
tree7983efe8f151ea8decb91c219b4b61ee8dec2d6a
parentf6161aa153581da4a3867a2d1a7caf4be19b6ec9 (diff)
ARM: 7671/1: use Kconfig to select uncompress.h
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>
-rw-r--r--arch/arm/Kconfig.debug5
-rw-r--r--arch/arm/boot/compressed/misc.c8
-rw-r--r--arch/arm/include/debug/uncompress.h3
3 files changed, 9 insertions, 7 deletions
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index acddddac7ee4..fc54a5bcf5ab 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -601,6 +601,11 @@ config DEBUG_LL_INCLUDE
601 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 601 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1
602 default "mach/debug-macro.S" 602 default "mach/debug-macro.S"
603 603
604config UNCOMPRESS_INCLUDE
605 string
606 default "debug/uncompress.h" if ARCH_MULTIPLATFORM
607 default "mach/uncompress.h"
608
604config EARLY_PRINTK 609config EARLY_PRINTK
605 bool "Early printk" 610 bool "Early printk"
606 depends on DEBUG_LL 611 depends on DEBUG_LL
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index df899834d84e..31bd43b82095 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -25,13 +25,7 @@ unsigned int __machine_arch_type;
25static void putstr(const char *ptr); 25static void putstr(const char *ptr);
26extern void error(char *x); 26extern void error(char *x);
27 27
28#ifdef CONFIG_ARCH_MULTIPLATFORM 28#include CONFIG_UNCOMPRESS_INCLUDE
29static inline void putc(int c) {}
30static inline void flush(void) {}
31static inline void arch_decomp_setup(void) {}
32#else
33#include <mach/uncompress.h>
34#endif
35 29
36#ifdef CONFIG_DEBUG_ICEDCC 30#ifdef CONFIG_DEBUG_ICEDCC
37 31
diff --git a/arch/arm/include/debug/uncompress.h b/arch/arm/include/debug/uncompress.h
new file mode 100644
index 000000000000..e19955d9e02e
--- /dev/null
+++ b/arch/arm/include/debug/uncompress.h
@@ -0,0 +1,3 @@
1static inline void putc(int c) {}
2static inline void flush(void) {}
3static inline void arch_decomp_setup(void) {}