obj-y += timer.o io.o devices.o iomux.o clock.o rk29-pl330.o dma.o ddr.o memcpy_dma.o reset.o
obj-y += tests.o memtester.o
-obj-y += early_printk.o
-ifndef CONFIG_DEBUG_LL
-obj-y += ../kernel/debug.o
-endif
obj-$(CONFIG_PM) += pm.o
obj-$(CONFIG_CPU_FREQ) += cpufreq.o
obj-$(CONFIG_DDR_FREQ) += ddrfreq.o
+++ /dev/null
-/*
- * arch/arm/mach-rk29/early_printk.c
- *
- * Copyright (C) 2009 Sascha Hauer <s.hauer@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/kernel.h>
-#include <linux/console.h>
-#include <linux/init.h>
-
-#ifndef CONFIG_DEBUG_LL
-extern void printch(int);
-
-static void early_write(const char *s, unsigned n)
-{
- while (n-- > 0) {
- if (*s == '\n')
- printch('\r');
- printch(*s);
- s++;
- }
-}
-
-static void early_console_write(struct console *con, const char *s, unsigned n)
-{
- early_write(s, n);
-}
-
-static struct console early_console = {
- .name = "earlycon",
- .write = early_console_write,
- .flags = CON_PRINTBUFFER | CON_BOOT,
- .index = -1,
-};
-#endif
-
-void __init rk29_setup_early_printk(void)
-{
-#ifndef CONFIG_DEBUG_LL
- register_console(&early_console);
-#endif
-}
obj-y += reset.o
obj-y += timer.o
obj-$(CONFIG_FIQ) += fiq.o
-obj-y += ../mach-rk29/early_printk.o
-ifndef CONFIG_DEBUG_LL
-obj-y += ../kernel/debug.o
-endif
obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o
obj-$(CONFIG_MACH_RK30_SDK) += board-rk30-sdk.o board-rk30-sdk-key.o
#include <mach/iomux.h>
#include <mach/fiq.h>
-extern void __init rk29_setup_early_printk(void);
-
void __init rk30_init_irq(void)
{
gic_init(0, IRQ_LOCALTIMER, RK30_GICD_BASE, RK30_GICC_BASE);
help
It is only intended for debugging.
+config RK_EARLY_PRINTK
+ bool "Early printk"
+ depends on PRINTK && !DEBUG_LL
+ default y
+ help
+ Say Y here if you want to have an early console using the
+ kernel low-level debugging functions.
+
endif
obj-$(CONFIG_RK29_VPU) += vpu_service.o
obj-$(CONFIG_ARCH_RK30) += dma-pl330.o
obj-$(CONFIG_FIQ_DEBUGGER) += rk_fiq_debugger.o
+obj-$(CONFIG_RK_EARLY_PRINTK) += early_printk.o ../kernel/debug.o
obj-y += mem_reserve.o
obj-y += sram.o
--- /dev/null
+/*
+ * arch/arm/mach-rk29/early_printk.c
+ *
+ * Copyright (C) 2009 Sascha Hauer <s.hauer@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/console.h>
+#include <linux/init.h>
+
+#ifndef CONFIG_DEBUG_LL
+extern void printch(int);
+
+static void early_write(const char *s, unsigned n)
+{
+ while (n-- > 0) {
+ if (*s == '\n')
+ printch('\r');
+ printch(*s);
+ s++;
+ }
+}
+
+static void early_console_write(struct console *con, const char *s, unsigned n)
+{
+ early_write(s, n);
+}
+
+static struct console early_console = {
+ .name = "earlycon",
+ .write = early_console_write,
+ .flags = CON_PRINTBUFFER | CON_BOOT,
+ .index = -1,
+};
+#endif
+
+void __init rk29_setup_early_printk(void)
+{
+#ifndef CONFIG_DEBUG_LL
+ register_console(&early_console);
+#endif
+}
static int inline board_usb_detect_init(unsigned gpio) { return 0; }
#endif
+#ifdef CONFIG_RK_EARLY_PRINTK
+void __init rk29_setup_early_printk(void);
+#else
+static void inline rk29_setup_early_printk(void) {}
+#endif
+
/* for wakeup Android */
void rk28_send_wakeup_key(void);