All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jun Sun <jsun@mvista.com>
To: linux-mips@linux-mips.org
Cc: jsun@mvista.com
Subject: [PATCH 2.6] set up conswitchp when CONFIG_VT is set
Date: Wed, 21 Jan 2004 16:20:32 -0800	[thread overview]
Message-ID: <20040121162032.F29705@mvista.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 448 bytes --]


conswitchp needs to be set whenever CONFIG_VT is selected.
Currently this job is done individually by each board in its setup
routine, often in a wrong way.

The right thing to do is to set the pointer in the common code
and remove almost two dozens of duplicated and often wrong settings.

The attached patch is for illustration only.  The removal of board settings
is not complete.

Comments?  Objections and cheers are equally welcome. :)

Jun

[-- Attachment #2: dummy_console.patch --]
[-- Type: text/plain, Size: 2110 bytes --]

diff -Nru linux/arch/mips/ddb5xxx/ddb5074/setup.c.orig linux/arch/mips/ddb5xxx/ddb5074/setup.c
--- linux/arch/mips/ddb5xxx/ddb5074/setup.c.orig	Mon Jan  5 10:33:34 2004
+++ linux/arch/mips/ddb5xxx/ddb5074/setup.c	Wed Jan 21 16:03:33 2004
@@ -10,7 +10,6 @@
 #include <linux/kernel.h>
 #include <linux/kdev_t.h>
 #include <linux/types.h>
-#include <linux/console.h>
 #include <linux/sched.h>
 #include <linux/pci.h>
 #include <linux/ide.h>
@@ -113,10 +112,6 @@
 	ddb_set_pmr(DDB_PCIINIT0, DDB_PCICMD_IO, 0, 0x10);
 	ddb_set_pmr(DDB_PCIINIT1, DDB_PCICMD_MEM, DDB_PCI_MEM_BASE , 0x10);
 
-#ifdef CONFIG_FB
-	conswitchp = &dummy_con;
-#endif
-
 	/* Reboot on panic */
 	panic_timeout = 180;
 }
diff -Nru linux/arch/mips/ddb5xxx/ddb5476/setup.c.orig linux/arch/mips/ddb5xxx/ddb5476/setup.c
--- linux/arch/mips/ddb5xxx/ddb5476/setup.c.orig	Mon Jan  5 10:33:34 2004
+++ linux/arch/mips/ddb5xxx/ddb5476/setup.c	Wed Jan 21 16:03:50 2004
@@ -10,7 +10,6 @@
 #include <linux/kernel.h>
 #include <linux/kdev_t.h>
 #include <linux/types.h>
-#include <linux/console.h>
 #include <linux/sched.h>
 #include <linux/pci.h>
 
@@ -166,10 +165,6 @@
 	/* [jsun] we need to set BAR0 so that SDRAM 0 appears at 0x0 in PCI */
 	/* *(long*)0xbfa00218 = 0x8; */
 
-#ifdef CONFIG_FB
-	conswitchp = &dummy_con;
-#endif
-
 	/* board initialization stuff */
 	ddb5476_board_init();
 }
diff -Nru linux/arch/mips/kernel/setup.c.orig linux/arch/mips/kernel/setup.c
--- linux/arch/mips/kernel/setup.c.orig	Tue Nov 18 10:01:24 2003
+++ linux/arch/mips/kernel/setup.c	Wed Jan 21 16:00:47 2004
@@ -32,6 +32,7 @@
 #include <linux/kdev_t.h>
 #include <linux/root_dev.h>
 #include <linux/highmem.h>
+#include <linux/console.h>
 
 #include <asm/addrspace.h>
 #include <asm/bootinfo.h>
@@ -471,6 +472,15 @@
 	set_c0_status(ST0_CU0|ST0_KX|ST0_SX|ST0_FR);
 #endif
 
+#ifdef CONFIG_VT
+#if defined(CONFIG_VGA_CONSOLE)
+        conswitchp = &vga_con;
+#elif defined(CONFIG_DUMMY_CONSOLE)
+        conswitchp = &dummy_con;
+#endif
+#endif
+
+	/* call board setup routine */
 	do_earlyinitcalls();
 
 	strlcpy(command_line, arcs_cmdline, sizeof(command_line));

             reply	other threads:[~2004-01-22  0:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-22  0:20 Jun Sun [this message]
2004-01-22  9:52 ` [PATCH 2.6] set up conswitchp when CONFIG_VT is set Geert Uytterhoeven
2004-01-22 12:28   ` Ralf Baechle
2004-01-22 12:32     ` Geert Uytterhoeven
2004-01-22 22:18       ` Ralf Baechle
2004-01-22 22:44         ` Jun Sun
2004-01-22 22:44           ` Jun Sun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040121162032.F29705@mvista.com \
    --to=jsun@mvista.com \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.