* added 0.99 linux version
[mascara-docs.git] / i386 / linux / linux-2.3.21 / arch / mips / arc / console.c
blob2e518202814957172b5a4e6c09a8b7b2f696d468
1 /*
2 * console.c: SGI arcs console code.
4 * Copyright (C) 1996 David S. Miller (dm@sgi.com)
5 * Compability with board caches, Ulf Carlsson
7 * $Id: console.c,v 1.2 1999/06/12 18:42:38 ulfc Exp $
8 */
9 #include <linux/config.h>
10 #include <linux/init.h>
11 #include <asm/sgialib.h>
12 #include <asm/bcache.h>
14 /* The romvec is not compatible with board caches. Thus we disable it during
15 * romvec action. Since r4xx0.c is always compiled and linked with your kernel,
16 * this shouldn't cause any harm regardless what MIPS processor you have.
18 * The romvec write and read functions seem to interfere with the serial lines
19 * in some way. You should be careful with them.
21 extern struct bcache_ops *bcops;
23 #ifdef CONFIG_SGI_PROM_CONSOLE
24 void prom_putchar(char c)
25 #else
26 void __init prom_putchar(char c)
27 #endif
29 long cnt;
30 char it = c;
32 bcops->bc_disable();
33 romvec->write(1, &it, 1, &cnt);
34 bcops->bc_enable();
37 #ifdef CONFIG_SGI_PROM_CONSOLE
38 char prom_getchar(void)
39 #else
40 char __init prom_getchar(void)
41 #endif
43 long cnt;
44 char c;
46 bcops->bc_disable();
47 romvec->read(0, &c, 1, &cnt);
48 bcops->bc_enable();
49 return c;