From: zoss@devai.org (Zoltan Devai)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 08/15] ARM: uncompress: Rename misc.c to print.c
Date: Sun, 23 Oct 2011 23:10:38 +0200 [thread overview]
Message-ID: <1319404245-12740-8-git-send-email-zoss@devai.org> (raw)
In-Reply-To: <1319404245-12740-1-git-send-email-zoss@devai.org>
Now that misc.c only holds functions related to printout
during decompression, rename it accordingly.
Signed-off-by: Zoltan Devai <zoss@devai.org>
---
arch/arm/boot/compressed/Makefile | 2 +-
arch/arm/boot/compressed/misc.c | 122 -------------------------------------
arch/arm/boot/compressed/print.c | 122 +++++++++++++++++++++++++++++++++++++
3 files changed, 123 insertions(+), 123 deletions(-)
delete mode 100644 arch/arm/boot/compressed/misc.c
create mode 100644 arch/arm/boot/compressed/print.c
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index e4f32a8..d955d4f 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -23,7 +23,7 @@ endif
AFLAGS_head.o += -DTEXT_OFFSET=$(TEXT_OFFSET)
HEAD = head.o
-OBJS += misc.o decompress.o
+OBJS += print.o decompress.o
FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c
# string library code (-Os is enforced to keep it much smaller)
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
deleted file mode 100644
index 25f0fb2..0000000
--- a/arch/arm/boot/compressed/misc.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * misc.c
- *
- * This is a collection of several routines from gzip-1.0.3
- * adapted for Linux.
- *
- * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
- *
- * Modified for ARM Linux by Russell King
- *
- * Nicolas Pitre <nico@visuaide.com> 1999/04/14 :
- * For this code to run directly from Flash, all constant variables must
- * be marked with 'const' and all other variables initialized at run-time
- * only. This way all non constant variables will end up in the bss segment,
- * which should point to addresses in RAM and cleared to 0 on start.
- * This allows for a much quicker boot time.
- */
-
-#include <linux/compiler.h> /* for inline */
-#include <linux/types.h>
-#include <linux/linkage.h>
-
-void putstr(const char *ptr);
-void error(char *x);
-extern unsigned int __machine_arch_type;
-#define arch_id __machine_arch_type
-
-#include <mach/uncompress.h>
-
-#ifdef ARCH_HAVE_DECOMP_SETUP
-void inline decomp_setup(void)
-{
- arch_decomp_setup();
-}
-#else /* ARCH_HAVE_DECOMP_SETUP */
-void inline decomp_setup(void)
-{
-}
-#endif /* ARCH_HAVE_DECOMP_SETUP */
-
-#ifdef CONFIG_DEBUG_ICEDCC
-
-#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)
-
-static void icedcc_putc(int ch)
-{
- int status, i = 0x4000000;
-
- do {
- if (--i < 0)
- return;
-
- asm volatile ("mrc p14, 0, %0, c0, c1, 0" : "=r" (status));
- } while (status & (1 << 29));
-
- asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
-}
-
-#elif defined(CONFIG_CPU_XSCALE)
-
-static void icedcc_putc(int ch)
-{
- int status, i = 0x4000000;
-
- do {
- if (--i < 0)
- return;
-
- asm volatile ("mrc p14, 0, %0, c14, c0, 0" : "=r" (status));
- } while (status & (1 << 28));
-
- asm("mcr p14, 0, %0, c8, c0, 0" : : "r" (ch));
-}
-
-#else
-
-static void icedcc_putc(int ch)
-{
- int status, i = 0x4000000;
-
- do {
- if (--i < 0)
- return;
-
- asm volatile ("mrc p14, 0, %0, c0, c0, 0" : "=r" (status));
- } while (status & 2);
-
- asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch));
-}
-
-#endif
-
-#define putc(ch) icedcc_putc(ch)
-#endif
-
-void putstr(const char *ptr)
-{
- char c;
-
- while ((c = *ptr++) != '\0') {
- if (c == '\n')
- putc('\r');
- putc(c);
- }
-
- flush();
-}
-
-#ifndef arch_error
-#define arch_error(x)
-#endif
-
-void error(char *x)
-{
- arch_error(x);
-
- putstr("\n\n");
- putstr(x);
- putstr("\n\n -- System halted");
-
- while(1); /* Halt */
-}
diff --git a/arch/arm/boot/compressed/print.c b/arch/arm/boot/compressed/print.c
new file mode 100644
index 0000000..25f0fb2
--- /dev/null
+++ b/arch/arm/boot/compressed/print.c
@@ -0,0 +1,122 @@
+/*
+ * misc.c
+ *
+ * This is a collection of several routines from gzip-1.0.3
+ * adapted for Linux.
+ *
+ * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
+ *
+ * Modified for ARM Linux by Russell King
+ *
+ * Nicolas Pitre <nico@visuaide.com> 1999/04/14 :
+ * For this code to run directly from Flash, all constant variables must
+ * be marked with 'const' and all other variables initialized at run-time
+ * only. This way all non constant variables will end up in the bss segment,
+ * which should point to addresses in RAM and cleared to 0 on start.
+ * This allows for a much quicker boot time.
+ */
+
+#include <linux/compiler.h> /* for inline */
+#include <linux/types.h>
+#include <linux/linkage.h>
+
+void putstr(const char *ptr);
+void error(char *x);
+extern unsigned int __machine_arch_type;
+#define arch_id __machine_arch_type
+
+#include <mach/uncompress.h>
+
+#ifdef ARCH_HAVE_DECOMP_SETUP
+void inline decomp_setup(void)
+{
+ arch_decomp_setup();
+}
+#else /* ARCH_HAVE_DECOMP_SETUP */
+void inline decomp_setup(void)
+{
+}
+#endif /* ARCH_HAVE_DECOMP_SETUP */
+
+#ifdef CONFIG_DEBUG_ICEDCC
+
+#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)
+
+static void icedcc_putc(int ch)
+{
+ int status, i = 0x4000000;
+
+ do {
+ if (--i < 0)
+ return;
+
+ asm volatile ("mrc p14, 0, %0, c0, c1, 0" : "=r" (status));
+ } while (status & (1 << 29));
+
+ asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
+}
+
+#elif defined(CONFIG_CPU_XSCALE)
+
+static void icedcc_putc(int ch)
+{
+ int status, i = 0x4000000;
+
+ do {
+ if (--i < 0)
+ return;
+
+ asm volatile ("mrc p14, 0, %0, c14, c0, 0" : "=r" (status));
+ } while (status & (1 << 28));
+
+ asm("mcr p14, 0, %0, c8, c0, 0" : : "r" (ch));
+}
+
+#else
+
+static void icedcc_putc(int ch)
+{
+ int status, i = 0x4000000;
+
+ do {
+ if (--i < 0)
+ return;
+
+ asm volatile ("mrc p14, 0, %0, c0, c0, 0" : "=r" (status));
+ } while (status & 2);
+
+ asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch));
+}
+
+#endif
+
+#define putc(ch) icedcc_putc(ch)
+#endif
+
+void putstr(const char *ptr)
+{
+ char c;
+
+ while ((c = *ptr++) != '\0') {
+ if (c == '\n')
+ putc('\r');
+ putc(c);
+ }
+
+ flush();
+}
+
+#ifndef arch_error
+#define arch_error(x)
+#endif
+
+void error(char *x)
+{
+ arch_error(x);
+
+ putstr("\n\n");
+ putstr(x);
+ putstr("\n\n -- System halted");
+
+ while(1); /* Halt */
+}
--
1.7.4.1
next prev parent reply other threads:[~2011-10-23 21:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-23 21:10 [RFC PATCH 01/15] ARM: uncompress.h: Remove unused arch_decomp_wdog defines Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 02/15] ARM: uncompress: Remove unused definition of ARCH_HAS_DECOMP_WATCHDOG Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 03/15] ARM: uncompress.h: Introduce ARCH_HAVE_DECOMP_SETUP Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 04/15] ARM: uncompress: Only call arch_decomp_setup when needed Zoltan Devai
2011-10-24 6:55 ` Uwe Kleine-König
2011-10-23 21:10 ` [RFC PATCH 05/15] ARM: uncompress.h: Remove unused arch_decomp_setup declarations Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 06/15] ARM: uncompress: Remove unused Trace functions Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 07/15] ARM: uncompress: Move decompressing related stuff to decompress.c Zoltan Devai
2011-10-24 9:17 ` Russell King - ARM Linux
2011-10-24 9:23 ` Russell King - ARM Linux
2011-10-23 21:10 ` Zoltan Devai [this message]
2011-10-24 6:58 ` [RFC PATCH 08/15] ARM: uncompress: Rename misc.c to print.c Uwe Kleine-König
2011-10-23 21:10 ` [RFC PATCH 09/15] ARM: uncompress: Introduce ucuart as low-level serial port driver Zoltan Devai
2011-10-24 9:26 ` Russell King - ARM Linux
2011-10-23 21:10 ` [RFC PATCH 10/15] ARM: uncompress.h: Convert machines to use the new ucuart driver Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 11/15] ARM: uncompress: Call arch_decomp_setup by default Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 12/15] ARM: uncompress.h: make the ucuart driver the default implementation Zoltan Devai
2011-10-23 21:10 ` [RFC PATCH 13/15] ARM: uncompress.h: Cleanup header guards and banners Zoltan Devai
2011-10-24 9:29 ` Russell King - ARM Linux
2011-10-23 21:10 ` [RFC PATCH 14/15] ARM: uncompress: Get decompress UART info from DT Zoltan Devai
2011-10-24 9:30 ` Russell King - ARM Linux
2011-10-25 7:38 ` Tony Lindgren
2011-10-23 21:10 ` [RFC PATCH 15/15] ARM: uncompress: Add documentation Zoltan Devai
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=1319404245-12740-8-git-send-email-zoss@devai.org \
--to=zoss@devai.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).