Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 1/2] serial: imx: Remove SERIAL_IMX_CONSOLE
@ 2013-06-04 17:08 Fabio Estevam
  2013-06-04 17:08 ` [PATCH v2 2/2] serial: imx: Allow module build Fabio Estevam
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2013-06-04 17:08 UTC (permalink / raw)
  To: gregkh; +Cc: shawn.guo, b35083, kernel, linux-serial, Fabio Estevam

When CONFIG_SERIAL_IMX_CONSOLE is not selected the following build warnings
appear:

drivers/tty/serial/imx.c:274:13: warning: 'imx_port_ucrs_save' defined but not used [-Wunused-function]
drivers/tty/serial/imx.c:283:13: warning: 'imx_port_ucrs_restore' defined but not used [-Wunused-function]

Instead of fixing the warning by protecting mx_port_ucrs_save() and 
imx_port_ucrs_restore() with an "ifdef", let's get rid of the SERIAL_IMX_CONSOLE
option and make the console support always present.

While at it, change the CPU vendor name to Freescale. 

Suggested-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- Fix the warning by removing SERIAL_IMX_CONSOLE

 drivers/tty/serial/Kconfig | 18 ++----------------
 drivers/tty/serial/imx.c   | 10 ++--------
 2 files changed, 4 insertions(+), 24 deletions(-)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 7e7006f..a9ae1cd 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -554,26 +554,12 @@ config SERIAL_IMX
 	bool "IMX serial port support"
 	depends on ARCH_MXC
 	select SERIAL_CORE
+	select SERIAL_CORE_CONSOLE
 	select RATIONAL
 	help
-	  If you have a machine based on a Motorola IMX CPU you
+	  If you have a machine based on a Freescale IMX CPU you
 	  can enable its onboard serial port by enabling this option.
 
-config SERIAL_IMX_CONSOLE
-	bool "Console on IMX serial port"
-	depends on SERIAL_IMX
-	select SERIAL_CORE_CONSOLE
-	help
-	  If you have enabled the serial port on the Motorola IMX
-	  CPU you can make it the console by answering Y to this option.
-
-	  Even if you say Y here, the currently visible virtual console
-	  (/dev/tty0) will still be used as the system console by default, but
-	  you can alter that using a kernel command line option such as
-	  "console=ttySA0". (Try "man bootparam" or see the documentation of
-	  your boot loader (lilo or loadlin) about how to pass options to the
-	  kernel at boot time.)
-
 config SERIAL_UARTLITE
 	tristate "Xilinx uartlite serial port support"
 	depends on PPC32 || MICROBLAZE || MFD_TIMBERDALE
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index a07e94f..d0fcd5e 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -27,7 +27,7 @@
  * Added hardware handshake
  */
 
-#if defined(CONFIG_SERIAL_IMX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
+#if defined(CONFIG_MAGIC_SYSRQ)
 #define SUPPORT_SYSRQ
 #endif
 
@@ -1211,7 +1211,6 @@ static struct uart_ops imx_pops = {
 
 static struct imx_port *imx_ports[UART_NR];
 
-#ifdef CONFIG_SERIAL_IMX_CONSOLE
 static void imx_console_putchar(struct uart_port *port, int ch)
 {
 	struct imx_port *sport = (struct imx_port *)port;
@@ -1374,11 +1373,6 @@ static struct console imx_console = {
 	.data		= &imx_reg,
 };
 
-#define IMX_CONSOLE	&imx_console
-#else
-#define IMX_CONSOLE	NULL
-#endif
-
 static struct uart_driver imx_reg = {
 	.owner          = THIS_MODULE,
 	.driver_name    = DRIVER_NAME,
@@ -1386,7 +1380,7 @@ static struct uart_driver imx_reg = {
 	.major          = SERIAL_IMX_MAJOR,
 	.minor          = MINOR_START,
 	.nr             = ARRAY_SIZE(imx_ports),
-	.cons           = IMX_CONSOLE,
+	.cons           = &imx_console,
 };
 
 static int serial_imx_suspend(struct platform_device *dev, pm_message_t state)
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-06-05  2:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-04 17:08 [PATCH v2 1/2] serial: imx: Remove SERIAL_IMX_CONSOLE Fabio Estevam
2013-06-04 17:08 ` [PATCH v2 2/2] serial: imx: Allow module build Fabio Estevam
2013-06-05  1:36   ` Lu Jingchang-B35083
2013-06-05  1:47     ` Estevam Fabio-R49496
2013-06-05  2:33       ` Lu Jingchang-B35083
2013-06-05  2:44         ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox