diff options
author | John Crispin <blogic@openwrt.org> | 2011-05-29 21:19:26 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2011-05-29 21:19:26 +0000 |
commit | 9af744afe836c76a099b67a7ea976724b1363923 (patch) | |
tree | b9da76295132f5efbc18c34b9de3db80de664403 /target/linux/lantiq/patches/106-early_printk.patch | |
parent | c4509d34ea9afc5e373c353c48ccdf327f58217e (diff) | |
download | master-187ad058-9af744afe836c76a099b67a7ea976724b1363923.tar.gz master-187ad058-9af744afe836c76a099b67a7ea976724b1363923.tar.bz2 master-187ad058-9af744afe836c76a099b67a7ea976724b1363923.zip |
[lantiq]
* backport 2.6.8 patches to .39 / .32.33
* remove lqtapi
* bump tapi/dsl to .39
* migrate to new ltq_ style api
* add amazon_se support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27026 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/patches/106-early_printk.patch')
-rw-r--r-- | target/linux/lantiq/patches/106-early_printk.patch | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/target/linux/lantiq/patches/106-early_printk.patch b/target/linux/lantiq/patches/106-early_printk.patch deleted file mode 100644 index 1cf402c5c5..0000000000 --- a/target/linux/lantiq/patches/106-early_printk.patch +++ /dev/null @@ -1,93 +0,0 @@ ---- a/arch/mips/lantiq/Kconfig -+++ b/arch/mips/lantiq/Kconfig -@@ -33,4 +33,19 @@ - #source "arch/mips/lantiq/falcon/Kconfig" - source "arch/mips/lantiq/xway/Kconfig" - -+if EARLY_PRINTK -+choice -+ prompt "Early printk port" -+ default LANTIQ_PROM_ASC1 -+ help -+ Choose which serial port is used, until the console driver is loaded -+ -+config LANTIQ_PROM_ASC0 -+ bool "ASC0" -+ -+config LANTIQ_PROM_ASC1 -+ bool "ASC1" -+endchoice -+endif -+ - endif ---- /dev/null -+++ b/arch/mips/lantiq/early_printk.c -@@ -0,0 +1,68 @@ -+/* -+ * 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. -+ * -+ * Copyright (C) 2010 John Crispin <blogic@openwrt.org> -+ */ -+ -+#include <linux/init.h> -+#include <linux/cpu.h> -+ -+#include <lantiq.h> -+ -+#ifdef CONFIG_SOC_LANTIQ_XWAY -+#include <xway.h> -+#ifdef CONFIG_LANTIQ_PROM_ASC0 -+#define LQ_ASC_BASE KSEG1ADDR(LQ_ASC0_BASE) -+#else -+#define LQ_ASC_BASE KSEG1ADDR(LQ_ASC1_BASE) -+#endif -+ -+#elif defined(CONFIG_SOC_LANTIQ_FALCON) -+#include <falcon/gpon_reg_base.h> -+#ifdef CONFIG_LANTIQ_PROM_ASC0 -+#define LQ_ASC_BASE GPON_ASC0_BASE -+#else -+#define LQ_ASC_BASE GPON_ASC1_BASE -+#endif -+ -+#endif -+ -+#define ASC_BUF 1024 -+#define LQ_ASC_FSTAT 0x0048 -+#define LQ_ASC_TBUF 0x0020 -+#define TXMASK 0x3F00 -+#define TXOFFSET 8 -+ -+static char buf[ASC_BUF]; -+ -+void -+prom_putchar(char c) -+{ -+ unsigned long flags; -+ -+ local_irq_save(flags); -+ while ((lq_r32((u32 *)(LQ_ASC_BASE + LQ_ASC_FSTAT)) & TXMASK) >> TXOFFSET); -+ -+ if (c == '\n') -+ lq_w32('\r', (u32 *)(LQ_ASC_BASE + LQ_ASC_TBUF)); -+ lq_w32(c, (u32 *)(LQ_ASC_BASE + LQ_ASC_TBUF)); -+ local_irq_restore(flags); -+} -+ -+void -+early_printf(const char *fmt, ...) -+{ -+ va_list args; -+ int l; -+ char *p, *buf_end; -+ -+ va_start(args, fmt); -+ l = vsnprintf(buf, ASC_BUF, fmt, args); -+ va_end(args); -+ buf_end = buf + l; -+ -+ for (p = buf; p < buf_end; p++) -+ prom_putchar(*p); -+} |