git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
mips
/
sgi-ip22
/
ip22-setup.c
diff --git
a/arch/mips/sgi-ip22/ip22-setup.c
b/arch/mips/sgi-ip22/ip22-setup.c
index
352a849
..
25097ec
100644
(file)
--- a/
arch/mips/sgi-ip22/ip22-setup.c
+++ b/
arch/mips/sgi-ip22/ip22-setup.c
@@
-4,12
+4,12
@@
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
* Copyright (C) 1997, 1998 Ralf Baechle (ralf@gnu.org)
*/
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
* Copyright (C) 1997, 1998 Ralf Baechle (ralf@gnu.org)
*/
-#include <linux/config.h>
#include <linux/ds1286.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/kdev_t.h>
#include <linux/types.h>
#include <linux/ds1286.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/kdev_t.h>
#include <linux/types.h>
+#include <linux/module.h>
#include <linux/console.h>
#include <linux/sched.h>
#include <linux/tty.h>
#include <linux/console.h>
#include <linux/sched.h>
#include <linux/tty.h>
@@
-28,12
+28,6
@@
#include <asm/sgi/hpc3.h>
#include <asm/sgi/ip22.h>
#include <asm/sgi/hpc3.h>
#include <asm/sgi/ip22.h>
-#ifdef CONFIG_KGDB
-extern void rs_kgdb_hook(int);
-extern void breakpoint(void);
-static int remote_debug = 0;
-#endif
-
unsigned long sgi_gfxaddr;
/*
unsigned long sgi_gfxaddr;
/*
@@
-42,7
+36,6
@@
unsigned long sgi_gfxaddr;
*
* FIXME: provide a mechanism to change the value of stop_a_enabled.
*/
*
* FIXME: provide a mechanism to change the value of stop_a_enabled.
*/
-int serial_console;
int stop_a_enabled;
void ip22_do_break(void)
int stop_a_enabled;
void ip22_do_break(void)
@@
-54,15
+47,15
@@
void ip22_do_break(void)
ArcEnterInteractiveMode();
}
ArcEnterInteractiveMode();
}
+EXPORT_SYMBOL(ip22_do_break);
+
extern void ip22_be_init(void) __init;
extern void ip22_time_init(void) __init;
extern void ip22_be_init(void) __init;
extern void ip22_time_init(void) __init;
-
static int __init ip22
_setup(void)
+
void __init plat_mem
_setup(void)
{
char *ctype;
{
char *ctype;
-#ifdef CONFIG_KGDB
- char *kgdb_ttyd;
-#endif
+ char *cserial;
board_be_init = ip22_be_init;
ip22_time_init();
board_be_init = ip22_be_init;
ip22_time_init();
@@
-81,15
+74,21
@@
static int __init ip22_setup(void)
indy_sc_init();
#endif
indy_sc_init();
#endif
- /* Set EISA IO port base for Indigo2 */
- set_io_port_base(KSEG1ADDR(0x00080000));
-
+ /* Set EISA IO port base for Indigo2
+ * ioremap cannot fail */
+ set_io_port_base((unsigned long)ioremap(0x00080000,
+ 0x1fffffff - 0x00080000));
/* ARCS console environment variable is set to "g?" for
* graphics console, it is set to "d" for the first serial
* line and "d2" for the second serial line.
/* ARCS console environment variable is set to "g?" for
* graphics console, it is set to "d" for the first serial
* line and "d2" for the second serial line.
+ *
+ * Need to check if the case is 'g' but no keyboard:
+ * (ConsoleIn/Out = serial)
*/
ctype = ArcGetEnvironmentVariable("console");
*/
ctype = ArcGetEnvironmentVariable("console");
- if (ctype && *ctype == 'd') {
+ cserial = ArcGetEnvironmentVariable("ConsoleOut");
+
+ if ((ctype && *ctype == 'd') || (cserial && *cserial == 's')) {
static char options[8];
char *baud = ArcGetEnvironmentVariable("dbaud");
if (baud)
static char options[8];
char *baud = ArcGetEnvironmentVariable("dbaud");
if (baud)
@@
-97,13
+96,15
@@
static int __init ip22_setup(void)
add_preferred_console("ttyS", *(ctype + 1) == '2' ? 1 : 0,
baud ? options : NULL);
} else if (!ctype || *ctype != 'g') {
add_preferred_console("ttyS", *(ctype + 1) == '2' ? 1 : 0,
baud ? options : NULL);
} else if (!ctype || *ctype != 'g') {
- /* Use ARC if we don't want serial ('d') or
Newport
('g'). */
+ /* Use ARC if we don't want serial ('d') or
graphics
('g'). */
prom_flags |= PROM_FLAG_USE_AS_CONSOLE;
add_preferred_console("arc", 0, NULL);
}
#ifdef CONFIG_KGDB
prom_flags |= PROM_FLAG_USE_AS_CONSOLE;
add_preferred_console("arc", 0, NULL);
}
#ifdef CONFIG_KGDB
- kgdb_ttyd = prom_getcmdline();
+ {
+ char *kgdb_ttyd = prom_getcmdline();
+
if ((kgdb_ttyd = strstr(kgdb_ttyd, "kgdb=ttyd")) != NULL) {
int line;
kgdb_ttyd += strlen("kgdb=ttyd");
if ((kgdb_ttyd = strstr(kgdb_ttyd, "kgdb=ttyd")) != NULL) {
int line;
kgdb_ttyd += strlen("kgdb=ttyd");
@@
-118,14
+119,14
@@
static int __init ip22_setup(void)
printk(KERN_INFO "KGDB: Using serial line /dev/ttyd%d for "
"session, please connect your debugger\n", line ? 1:2);
printk(KERN_INFO "KGDB: Using serial line /dev/ttyd%d for "
"session, please connect your debugger\n", line ? 1:2);
-
remote_debug
= 1;
+
kgdb_enabled
= 1;
/* Breakpoints and stuff are in sgi_irq_setup() */
}
/* Breakpoints and stuff are in sgi_irq_setup() */
}
+ }
#endif
#endif
-#ifdef CONFIG_VT
-#ifdef CONFIG_SGI_NEWPORT_CONSOLE
- if (ctype && *ctype == 'g'){
+#if defined(CONFIG_VT) && defined(CONFIG_SGI_NEWPORT_CONSOLE)
+ {
ULONG *gfxinfo;
ULONG * (*__vec)(void) = (void *) (long)
*((_PULONG *)(long)((PROMBLOCK)->pvector + 0x20));
ULONG *gfxinfo;
ULONG * (*__vec)(void) = (void *) (long)
*((_PULONG *)(long)((PROMBLOCK)->pvector + 0x20));
@@
-141,9
+142,4
@@
static int __init ip22_setup(void)
}
}
#endif
}
}
#endif
-#endif
-
- return 0;
}
}
-
-early_initcall(ip22_setup);