patch-2.1.115 linux/arch/sparc/kernel/setup.c

Next file: linux/arch/sparc/kernel/signal.c
Previous file: linux/arch/sparc/kernel/rtrap.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.114/linux/arch/sparc/kernel/setup.c linux/arch/sparc/kernel/setup.c
@@ -1,4 +1,4 @@
-/*  $Id: setup.c,v 1.93 1998/03/09 14:03:18 jj Exp $
+/*  $Id: setup.c,v 1.99 1998/07/28 16:52:45 jj Exp $
  *  linux/arch/sparc/kernel/setup.c
  *
  *  Copyright (C) 1995  David S. Miller (davem@caip.rutgers.edu)
@@ -47,7 +47,7 @@
 
 struct screen_info screen_info = {
 	0, 0,			/* orig-x, orig-y */
-	{ 0, 0, },		/* unused */
+	0,			/* unused */
 	0,			/* orig-video-page */
 	0,			/* orig-video-mode */
 	128,			/* orig-video-cols */
@@ -66,9 +66,10 @@
  */
 
 extern unsigned long trapbase;
+extern int serial_console;
 extern void breakpoint(void);
 #if CONFIG_SUN_CONSOLE
-extern void console_restore_palette(void);
+void (*prom_palette)(int);
 #endif
 asmlinkage void sys_sync(void);	/* it's really int */
 
@@ -90,7 +91,8 @@
 			     "nop\n\t" : : "r" (&trapbase));
 
 #ifdef CONFIG_SUN_CONSOLE
-        console_restore_palette ();
+	if (prom_palette)
+		prom_palette(1);
 #endif
 	prom_printf("PROM SYNC COMMAND...\n");
 	show_free_areas();
@@ -217,6 +219,15 @@
 				} else if (!strncmp (commands, "ttyb", 4)) {
 					console_fb = 3;
 					prom_printf ("Using /dev/ttyb as console.\n");
+#if defined(CONFIG_PROM_CONSOLE)
+				} else if (!strncmp (commands, "prom", 4)) {
+					char *p;
+					
+					for (p = commands - 8; *p && *p != ' '; p++)
+						*p = ' ';
+					conswitchp = &prom_con;
+					console_fb = 1;
+#endif
 				} else {
 					console_fb = 1;
 				}
@@ -321,6 +332,9 @@
 	switch(sparc_cpu_model) {
 	case sun4:
 		printk("SUN4\n");
+#ifdef CONFIG_SUN4_FORCECONSOLE
+		register_console(&prom_console);
+#endif
 		packed = 0;
 		break;
 	case sun4c:
@@ -352,6 +366,11 @@
 		break;
 	};
 
+#ifdef CONFIG_DUMMY_CONSOLE
+	conswitchp = &dummy_con;
+#elif defined(CONFIG_PROM_CONSOLE)
+	conswitchp = &prom_con;
+#endif
 	boot_flags_init(*cmdline_p);
 
 	idprom_init();
@@ -410,7 +429,6 @@
 	*memory_start_p = sun_serial_setup(*memory_start_p); /* set this up ASAP */
 #endif
 	{
-		extern int serial_console;  /* in console.c, of course */
 #if !CONFIG_SUN_SERIAL
 		serial_console = 0;
 #else
@@ -464,13 +482,8 @@
 	init_task.mm->context = (unsigned long) NO_CONTEXT;
 	init_task.tss.kregs = &fake_swapper_regs;
 
-	if (!serial_console) {
-#ifdef CONFIG_PROM_CONSOLE
-		conswitchp = &prom_con;
-#elif defined(CONFIG_DUMMY_CONSOLE)
-		conswitchp = &dummy_con;
-#endif
-	}
+	if (serial_console)
+		conswitchp = NULL;
 }
 
 asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int on)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov