obj-y += timer.o io.o devices.o iomux.o clock.o rk29-pl330.o dma.o gpio.o ddr.o sram.o memcpy_dma.o reset.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_RK29_VPU) += vpu.o vpu_mem.o
clk_enable_nolock(&clk_ddr);
clk_enable_nolock(&clk_debug);
clk_enable_nolock(&clk_jtag);
-#ifdef CONFIG_DEBUG_LL
clk_enable_nolock(&clk_uart1);
-#endif
}
static int __init clk_disable_unused(void)
--- /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
+}