mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 13:34:10 +08:00
Revert "serial: imx: Move imx_port_ucrs_save/restore under CONFIG_CONSOLE_POLL"
This reverts commit cdc8da3998
.
In my attempt to fix a build warning on arm randconfig a build error on
imx_v6_v7_defconfig was introduced, so revert it for now.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
238d9f6e55
commit
44a754117a
@ -268,6 +268,27 @@ static inline int is_imx21_uart(struct imx_port *sport)
|
|||||||
return sport->devdata->devtype == IMX21_UART;
|
return sport->devdata->devtype == IMX21_UART;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Save and restore functions for UCR1, UCR2 and UCR3 registers
|
||||||
|
*/
|
||||||
|
static void imx_port_ucrs_save(struct uart_port *port,
|
||||||
|
struct imx_port_ucrs *ucr)
|
||||||
|
{
|
||||||
|
/* save control registers */
|
||||||
|
ucr->ucr1 = readl(port->membase + UCR1);
|
||||||
|
ucr->ucr2 = readl(port->membase + UCR2);
|
||||||
|
ucr->ucr3 = readl(port->membase + UCR3);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void imx_port_ucrs_restore(struct uart_port *port,
|
||||||
|
struct imx_port_ucrs *ucr)
|
||||||
|
{
|
||||||
|
/* restore control registers */
|
||||||
|
writel(ucr->ucr1, port->membase + UCR1);
|
||||||
|
writel(ucr->ucr2, port->membase + UCR2);
|
||||||
|
writel(ucr->ucr3, port->membase + UCR3);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Handle any change of modem status signal since we were last called.
|
* Handle any change of modem status signal since we were last called.
|
||||||
*/
|
*/
|
||||||
@ -1082,27 +1103,6 @@ imx_verify_port(struct uart_port *port, struct serial_struct *ser)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_CONSOLE_POLL)
|
#if defined(CONFIG_CONSOLE_POLL)
|
||||||
/*
|
|
||||||
* Save and restore functions for UCR1, UCR2 and UCR3 registers
|
|
||||||
*/
|
|
||||||
static void imx_port_ucrs_save(struct uart_port *port,
|
|
||||||
struct imx_port_ucrs *ucr)
|
|
||||||
{
|
|
||||||
/* save control registers */
|
|
||||||
ucr->ucr1 = readl(port->membase + UCR1);
|
|
||||||
ucr->ucr2 = readl(port->membase + UCR2);
|
|
||||||
ucr->ucr3 = readl(port->membase + UCR3);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void imx_port_ucrs_restore(struct uart_port *port,
|
|
||||||
struct imx_port_ucrs *ucr)
|
|
||||||
{
|
|
||||||
/* restore control registers */
|
|
||||||
writel(ucr->ucr1, port->membase + UCR1);
|
|
||||||
writel(ucr->ucr2, port->membase + UCR2);
|
|
||||||
writel(ucr->ucr3, port->membase + UCR3);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int imx_poll_get_char(struct uart_port *port)
|
static int imx_poll_get_char(struct uart_port *port)
|
||||||
{
|
{
|
||||||
struct imx_port_ucrs old_ucr;
|
struct imx_port_ucrs old_ucr;
|
||||||
|
Loading…
Reference in New Issue
Block a user