From: shawn.guo@linaro.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: use Kconfig to select uncompress.h
Date: Thu, 17 Jan 2013 23:21:58 +0800 [thread overview]
Message-ID: <1358436119-30808-2-git-send-email-shawn.guo@linaro.org> (raw)
In-Reply-To: <1358436119-30808-1-git-send-email-shawn.guo@linaro.org>
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>
---
arch/arm/Kconfig.debug | 5 +++++
arch/arm/boot/compressed/misc.c | 8 +-------
arch/arm/include/debug/uncompress.h | 3 +++
3 files changed, 9 insertions(+), 7 deletions(-)
create mode 100644 arch/arm/include/debug/uncompress.h
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 05f83c8..86b273f8 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -523,6 +523,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
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index df89983..31bd43b 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -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
index 0000000..e19955d
--- /dev/null
+++ b/arch/arm/include/debug/uncompress.h
@@ -0,0 +1,3 @@
+static inline void putc(int c) {}
+static inline void flush(void) {}
+static inline void arch_decomp_setup(void) {}
--
1.7.9.5
next prev parent reply other threads:[~2013-01-17 15:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-17 15:21 [PATCH 0/2] Uncompress debug for multiplatform Shawn Guo
2013-01-17 15:21 ` Shawn Guo [this message]
2013-01-17 16:00 ` [PATCH 1/2] ARM: use Kconfig to select uncompress.h Arnd Bergmann
2013-01-17 15:21 ` [PATCH 2/2] ARM: use DEBUG_LL infrastructural for multiplatform uncompress debug Shawn Guo
2013-01-17 15:33 ` Shawn Guo
2013-01-17 16:25 ` Arnd Bergmann
2013-01-18 2:49 ` Shawn Guo
2013-01-18 2:45 ` [PATCH v2 2/2] ARM: uncompress debug support for multiplatform build Shawn Guo
2013-01-18 8:47 ` Arnd Bergmann
2013-01-18 10:42 ` Russell King - ARM Linux
2013-01-18 11:15 ` Shawn Guo
2013-01-18 18:03 ` Olof Johansson
2013-02-04 16:01 ` Russell King - ARM Linux
2013-02-06 9:32 ` Russell King - ARM Linux
2013-02-06 19:04 ` Stephen Warren
2013-02-07 5:04 ` Shawn Guo
2013-02-07 16:36 ` Stephen Warren
2013-02-08 12:59 ` Russell King - ARM Linux
2013-02-08 11:44 ` [PATCH v3 " Shawn Guo
2013-02-08 12:27 ` Russell King - ARM Linux
2013-02-08 12:45 ` Shawn Guo
[not found] ` <20130128141947.GA11626@S2101-09.ap.freescale.net>
2013-01-28 14:22 ` [PATCH 0/2] Uncompress debug for multiplatform Shawn Guo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1358436119-30808-2-git-send-email-shawn.guo@linaro.org \
--to=shawn.guo@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).