From patchwork Thu Nov 15 09:31:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 1748121 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 635EBDF2AB for ; Thu, 15 Nov 2012 09:33:39 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TYvnG-0000Xu-IB; Thu, 15 Nov 2012 09:31:30 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TYvnB-0000Wg-LV for linux-arm-kernel@lists.infradead.org; Thu, 15 Nov 2012 09:31:26 +0000 Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:21e:67ff:fe11:9c5c]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1TYvn3-00088p-VD; Thu, 15 Nov 2012 10:31:17 +0100 Received: from sha by dude.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1TYvn3-0000IA-24; Thu, 15 Nov 2012 10:31:17 +0100 From: Sascha Hauer To: linux-serial@vger.kernel.org Subject: [PATCH 2/3] serial: i.MX: Make console support non optional Date: Thu, 15 Nov 2012 10:31:05 +0100 Message-Id: <1352971866-540-3-git-send-email-s.hauer@pengutronix.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1352971866-540-1-git-send-email-s.hauer@pengutronix.de> References: <1352971866-540-1-git-send-email-s.hauer@pengutronix.de> X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121115_043125_944985_24997F3A X-CRM114-Status: GOOD ( 19.67 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Greg Kroah-Hartman , devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org, Grant Likely , kernel@pengutronix.de, Sascha Hauer , linux-arm-kernel@lists.infradead.org, Alan Cox X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Traditionally console support is optional for serial drivers. This makes it non optional for the i.MX driver since it's not worth asking questions for a feature virtually every user of this driver wants to have. Signed-off-by: Sascha Hauer --- drivers/tty/serial/Kconfig | 16 +--------------- drivers/tty/serial/imx.c | 8 +------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index 2a53be5..919b243 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -541,26 +541,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 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 5981912..07a8ca1 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1192,7 +1192,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; @@ -1348,11 +1347,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, @@ -1360,7 +1354,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)