diff options
author | John Crispin <blogic@openwrt.org> | 2007-12-26 22:47:45 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2007-12-26 22:47:45 +0000 |
commit | d4462fd4e00d79e43b4fa499060143f6aeedf768 (patch) | |
tree | 520e80915ddf2802169281359a6c520ba9411ad3 /target/linux/ifxmips/files/arch | |
parent | 358f9b5428e5be39688dba5fa3552fac4bab173b (diff) | |
download | upstream-d4462fd4e00d79e43b4fa499060143f6aeedf768.tar.gz upstream-d4462fd4e00d79e43b4fa499060143f6aeedf768.tar.bz2 upstream-d4462fd4e00d79e43b4fa499060143f6aeedf768.zip |
add selection of console driver for ifxmips
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9936 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ifxmips/files/arch')
-rw-r--r-- | target/linux/ifxmips/files/arch/mips/ifxmips/prom.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/target/linux/ifxmips/files/arch/mips/ifxmips/prom.c b/target/linux/ifxmips/files/arch/mips/ifxmips/prom.c index 514c879df3..a3b62f0114 100644 --- a/target/linux/ifxmips/files/arch/mips/ifxmips/prom.c +++ b/target/linux/ifxmips/files/arch/mips/ifxmips/prom.c @@ -29,6 +29,13 @@ #include <asm/bootinfo.h> #include <asm/ifxmips/ifxmips.h> +#ifdef CONFIG_IFXMIPS_USE_CONSOLE0 +#define ASC_OFFSET 0 +#elif CONFIG_IFXMIPS_USE_CONSOLE1 +#define ASC_OFFSET IFXMIPS_ASC1_BASE_OFFSET +#else +#error a tty for the console must be selected +#endif static char buf[1024]; void @@ -39,11 +46,11 @@ prom_free_prom_memory (void) void prom_putchar (char c) { - while ((readl(IFXMIPS_ASC1_FSTAT) & ASCFSTAT_TXFFLMASK) >> ASCFSTAT_TXFFLOFF); + while ((readl(IFXMIPS_ASC0_FSTAT + ASC_OFFSET) & ASCFSTAT_TXFFLMASK) >> ASCFSTAT_TXFFLOFF); if (c == '\n') - writel('\r', IFXMIPS_ASC1_TBUF); - writel(c, IFXMIPS_ASC1_TBUF); + writel('\r', IFXMIPS_ASC0_TBUF + ASC_OFFSET); + writel(c, IFXMIPS_ASC0_TBUF + ASC_OFFSET); } void |