serial: imx: Fix warning when !CONFIG_SERIAL_IMX_CONSOLE
Subsystems (2)
Fabio Estevam
reviewerPATCH v3 1/3 serial: imx: Fix warning when !CONFIG_SERIAL_IMX_CONSOLE
From: Fabio Estevam <[email protected]>
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]
imx_port_ucrs_save() and imx_port_ucrs_restore() are only used when CONFIG_CONSOLE_POLL or CONFIG_SERIAL_IMX_CONSOLE are selected, so protect these functions declaration with a proper ifdef.
---
Changes since v2:
- Do the same as in v1
drivers/tty/serial/imx.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/tty/serial/imx.c +2 -0
@@ -272,6 +272,7 @@ static inline int is_imx21_uart(struct imx_port *sport)/* * Save and restore functions for UCR1, UCR2 and UCR3 registers */ +#if defined(CONFIG_CONSOLE_POLL ) || defined(CONFIG_SERIAL_IMX_CONSOLE )static void imx_port_ucrs_save (struct uart_port *port,struct imx_port_ucrs *ucr) {
@@ -289,6 +290,7 @@ static void imx_port_ucrs_restore(struct uart_port *port,writel (ucr->ucr2, port->membase +UCR2 ); writel(ucr->ucr3, port->membase + UCR3); } +#endif /* * Handle any change of modem status signal since we were last called.
Signature · 1 line
1.8.1.2
Fabio Estevam
reviewerPATCH v3 2/3 serial: imx: Allow module build
From: Fabio Estevam <[email protected]>
There is no need to only allow the serial driver to be built-in.
Allow the imx serial driver to be built as a module.
---
Changes since v2:
- Use depends on SERIAL_IMX=y as done on many other serial drivers
drivers/tty/serial/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/Kconfig +2 -2
@@ -551,7 +551,7 @@ config BFIN_UART3_CTSRTS Enable hardware flow control in the driver. config SERIAL_IMX - bool "IMX serial port support" + tristate "IMX serial port support" depends on ARCH_MXC select SERIAL_CORE select RATIONAL
@@ -561,7 +561,7 @@ config SERIAL_IMX config SERIAL_IMX_CONSOLE bool "Console on IMX serial port" - depends on SERIAL_IMX + depends on SERIAL_IMX=y select SERIAL_CORE_CONSOLE help If you have enabled the serial port on the Motorola IMX
Signature · 1 line
1.8.1.2
Fabio Estevam
reviewerPATCH v3 3/3 serial: imx: Improve Kconfig text
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Some improvements in the Kconfig text:
- Vendor is Freescale now
- Provide a better example for the console parameter, which is something like console=ttymxc0
- Do not pass the names of ancient bootloaders
---
Changes since v2:
- Same as v1
drivers/tty/serial/Kconfig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/tty/serial/Kconfig +3 -4
@@ -564,15 +564,14 @@ config SERIAL_IMX_CONSOLE depends on SERIAL_IMX=y select SERIAL_CORE_CONSOLE help - If you have enabled the serial port on the Motorola IMX + If you have enabled the serial port on the Freescale 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.) + "console=ttymxc0". (Try "man bootparam" or see the documentation of + your bootloader about how to pass options to the kernel at boot time.) config SERIAL_UARTLITE tristate "Xilinx uartlite serial port support"
Signature · 1 line
1.8.1.2