* [PATCH] KS8695: make add_preferred_console() and device name configurable
@ 2010-09-27 12:59 Yegor Yefremov
0 siblings, 0 replies; only message in thread
From: Yegor Yefremov @ 2010-09-27 12:59 UTC (permalink / raw)
To: linux-arm-kernel
add_preferred_console() makes sense only when bootloader doesn't
provide "console" parameter or KS8695s serial port is the only
UART provided on the system. Otherwise the external UART will
be omitted even if proper "console" parameter is provided.
This patch makes add_preferred_console() configurable and port
name is now configurable too.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Index: b/drivers/serial/Kconfig
===================================================================
--- a/drivers/serial/Kconfig 2010-08-27 01:47:12.000000000 +0200
+++ b/drivers/serial/Kconfig 2010-09-13 12:31:26.000000000 +0200
@@ -426,6 +426,20 @@
receives all kernel messages and warnings and which allows
logins in single user mode).
+config SERIAL_KS8695_CONSOLE_NAME
+ string "Console device name"
+ depends on SERIAL_KS8695_CONSOLE=y
+ default "ttyAM"
+ help
+ Specify console device name
+
+config SERIAL_KS8695_CONSOLE_PREFFERED
+ bool "Add KS8695 console as preffered one"
+ depends on SERIAL_KS8695_CONSOLE=y
+ help
+ Adds specified console device name as a preffered console, so any
+ console=x kernel parameter will be ignored
+
config SERIAL_CLPS711X
tristate "CLPS711X serial port support"
depends on ARM && ARCH_CLPS711X
Index: b/drivers/serial/serial_ks8695.c
===================================================================
--- a/drivers/serial/serial_ks8695.c 2010-08-27 01:47:12.000000000 +0200
+++ b/drivers/serial/serial_ks8695.c 2010-09-13 12:23:33.000000000 +0200
@@ -38,7 +38,7 @@
#define SERIAL_KS8695_MAJOR 204
#define SERIAL_KS8695_MINOR 16
-#define SERIAL_KS8695_DEVNAME "ttyAM"
+#define SERIAL_KS8695_DEVNAME CONFIG_SERIAL_KS8695_CONSOLE_NAME
#define SERIAL_KS8695_NR 1
@@ -650,7 +650,9 @@
static int __init ks8695_console_init(void)
{
+#ifdef CONFIG_SERIAL_KS8695_CONSOLE_PREFFERED
add_preferred_console(SERIAL_KS8695_DEVNAME, 0, NULL);
+#endif
register_console(&ks8695_console);
return 0;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-09-27 12:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-27 12:59 [PATCH] KS8695: make add_preferred_console() and device name configurable Yegor Yefremov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).