summaryrefslogtreecommitdiffstats
path: root/arch/mips64
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-08-27 00:03:21 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-08-27 00:03:21 +0000
commit20fa7e4ec02342c73bec73511be611ff0b46bf68 (patch)
tree2ca54a6bf83c9e1239160663c783b9660a1d720c /arch/mips64
parent3a2ae21f6fc1c3a4dcd6c247b818682f562d6a90 (diff)
Desinfect console code from #ifdefmania.
Diffstat (limited to 'arch/mips64')
-rw-r--r--arch/mips64/arc/Makefile1
-rw-r--r--arch/mips64/arc/console.c30
-rw-r--r--arch/mips64/kernel/setup.c7
-rw-r--r--arch/mips64/sgi-ip27/Makefile9
-rw-r--r--arch/mips64/sgi-ip27/ip27-console.c56
-rw-r--r--arch/mips64/sgi-ip27/ip27-setup.c4
6 files changed, 68 insertions, 39 deletions
diff --git a/arch/mips64/arc/Makefile b/arch/mips64/arc/Makefile
index 039caf88d..ca655299f 100644
--- a/arch/mips64/arc/Makefile
+++ b/arch/mips64/arc/Makefile
@@ -1,4 +1,3 @@
-# $Id: Makefile,v 1.1 1999/08/20 21:13:32 ralf Exp $
#
# Makefile for the ARC prom monitor library routines under Linux.
#
diff --git a/arch/mips64/arc/console.c b/arch/mips64/arc/console.c
index 6d6442799..31af388dc 100644
--- a/arch/mips64/arc/console.c
+++ b/arch/mips64/arc/console.c
@@ -1,39 +1,13 @@
-/* $Id: console.c,v 1.3 1999/10/19 20:51:44 ralf Exp $
- *
+/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
- * ARC console code.
- *
* Copyright (C) 1996 David S. Miller (dm@sgi.com)
*/
-#include <linux/config.h>
#include <linux/init.h>
#include <asm/sgialib.h>
-#ifdef CONFIG_SGI_IP27
-
-#include <asm/sn/addrs.h>
-#include <asm/sn/sn0/hub.h>
-#include <asm/sn/klconfig.h>
-#include <asm/ioc3.h>
-#include <asm/sn/sn_private.h>
-
-void prom_putchar(char c)
-{
- struct ioc3 *ioc3;
- struct ioc3_uartregs *uart;
-
- ioc3 = (struct ioc3 *)KL_CONFIG_CH_CONS_INFO(master_nasid)->memory_base;
- uart = &ioc3->sregs.uarta;
-
- while ((uart->iu_lsr & 0x20) == 0);
- uart->iu_thr = c;
-}
-
-#else /* CONFIG_SGI_IP27 */
-
void prom_putchar(char c)
{
ULONG cnt;
@@ -42,8 +16,6 @@ void prom_putchar(char c)
ArcWrite(1, &it, 1, &cnt);
}
-#endif /* CONFIG_SGI_IP27 */
-
char __init prom_getchar(void)
{
ULONG cnt;
diff --git a/arch/mips64/kernel/setup.c b/arch/mips64/kernel/setup.c
index 54f9a4989..bc0f45e70 100644
--- a/arch/mips64/kernel/setup.c
+++ b/arch/mips64/kernel/setup.c
@@ -1,5 +1,4 @@
-/* $Id: setup.c,v 1.9 2000/03/14 01:39:27 ralf Exp $
- *
+/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
@@ -125,7 +124,7 @@ static struct console ip27_prom_console = {
NULL,
NULL,
NULL,
- CON_CONSDEV | CON_ENABLED,
+ CON_PRINTBUFFER,
-1,
0,
NULL
@@ -223,6 +222,6 @@ void __init setup_arch(char **cmdline_p)
for (i = 0; i < (1 << KPTBL_PAGE_ORDER); pmd++,i++,pte+=PTRS_PER_PTE)
pmd_val(*pmd) = (unsigned long)pte;
#ifdef CONFIG_SGI_IP27
- register_console(&ip27_prom_console);
+// register_console(&ip27_prom_console);
#endif
}
diff --git a/arch/mips64/sgi-ip27/Makefile b/arch/mips64/sgi-ip27/Makefile
index 162eb7245..cab7e6be5 100644
--- a/arch/mips64/sgi-ip27/Makefile
+++ b/arch/mips64/sgi-ip27/Makefile
@@ -1,4 +1,3 @@
-# $Id: Makefile,v 1.3 2000/02/04 08:41:40 kanoj Exp $
#
# Makefile for the IP27 specific kernel interface routines under Linux.
#
@@ -8,9 +7,9 @@
.S.o:
$(CC) $(CFLAGS) -c $< -o $*.o
-L_TARGET = ip27.a
-L_OBJS = ip27-berr.o ip27-irq.o ip27-irq-glue.o ip27-klconfig.o \
- ip27-memory.o ip27-pci.o ip27-pci-dma.o ip27-reset.o ip27-setup.o \
- ip27-timer.o ip27-init.o ip27-nmi.o ip27-klnuma.o
+O_TARGET = ip27.a
+O_OBJS = ip27-berr.o ip27-console.o ip27-irq.o ip27-init.o ip27-irq-glue.o \
+ ip27-klconfig.o ip27-klnuma.o ip27-memory.o ip27-nmi.o ip27-pci.o \
+ ip27-pci-dma.o ip27-reset.o ip27-setup.o ip27-timer.o
include $(TOPDIR)/Rules.make
diff --git a/arch/mips64/sgi-ip27/ip27-console.c b/arch/mips64/sgi-ip27/ip27-console.c
new file mode 100644
index 000000000..a1bf912b9
--- /dev/null
+++ b/arch/mips64/sgi-ip27/ip27-console.c
@@ -0,0 +1,56 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#include <linux/init.h>
+#include <linux/console.h>
+#include <asm/sn/addrs.h>
+#include <asm/sn/sn0/hub.h>
+#include <asm/sn/klconfig.h>
+#include <asm/ioc3.h>
+#include <asm/sn/sn_private.h>
+
+void ip27_putchar(char c)
+{
+ struct ioc3 *ioc3;
+ struct ioc3_uartregs *uart;
+
+ ioc3 = (struct ioc3 *)KL_CONFIG_CH_CONS_INFO(master_nasid)->memory_base;
+ uart = &ioc3->sregs.uarta;
+
+ while ((uart->iu_lsr & 0x20) == 0);
+ uart->iu_thr = c;
+}
+
+static void
+ip27prom_console_write(struct console *con, const char *s, unsigned n)
+{
+ char c;
+
+ while (n--) {
+ c = *(s++);
+ if (c == '\n')
+ ip27_putchar('\r');
+ ip27_putchar(c);
+ }
+}
+
+static struct console ip27_prom_console = {
+ "prom",
+ ip27prom_console_write,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ CON_PRINTBUFFER,
+ -1,
+ 0,
+ NULL
+};
+
+__init void ip27_setup_console(void)
+{
+ register_console(&ip27_prom_console);
+}
diff --git a/arch/mips64/sgi-ip27/ip27-setup.c b/arch/mips64/sgi-ip27/ip27-setup.c
index 1525855e8..e50dbc479 100644
--- a/arch/mips64/sgi-ip27/ip27-setup.c
+++ b/arch/mips64/sgi-ip27/ip27-setup.c
@@ -254,11 +254,15 @@ void __init pcibr_setup(cnodeid_t nid)
}
}
+extern void ip27_setup_console(void);
+
void __init ip27_setup(void)
{
nasid_t nid;
hubreg_t p, e;
+ ip27_setup_console();
+
num_bridges = 0;
/*
* hub_rtc init and cpu clock intr enabled for later calibrate_delay.