Skip to content

Commit 44a7541

Browse files
fabio.estevam@freescale.comgregkh
authored andcommitted
Revert "serial: imx: Move imx_port_ucrs_save/restore under CONFIG_CONSOLE_POLL"
This reverts commit cdc8da3. 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 <[email protected]> Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 238d9f6 commit 44a7541

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

drivers/tty/serial/imx.c

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,27 @@ static inline int is_imx21_uart(struct imx_port *sport)
268268
return sport->devdata->devtype == IMX21_UART;
269269
}
270270

271+
/*
272+
* Save and restore functions for UCR1, UCR2 and UCR3 registers
273+
*/
274+
static void imx_port_ucrs_save(struct uart_port *port,
275+
struct imx_port_ucrs *ucr)
276+
{
277+
/* save control registers */
278+
ucr->ucr1 = readl(port->membase + UCR1);
279+
ucr->ucr2 = readl(port->membase + UCR2);
280+
ucr->ucr3 = readl(port->membase + UCR3);
281+
}
282+
283+
static void imx_port_ucrs_restore(struct uart_port *port,
284+
struct imx_port_ucrs *ucr)
285+
{
286+
/* restore control registers */
287+
writel(ucr->ucr1, port->membase + UCR1);
288+
writel(ucr->ucr2, port->membase + UCR2);
289+
writel(ucr->ucr3, port->membase + UCR3);
290+
}
291+
271292
/*
272293
* Handle any change of modem status signal since we were last called.
273294
*/
@@ -1082,27 +1103,6 @@ imx_verify_port(struct uart_port *port, struct serial_struct *ser)
10821103
}
10831104

10841105
#if defined(CONFIG_CONSOLE_POLL)
1085-
/*
1086-
* Save and restore functions for UCR1, UCR2 and UCR3 registers
1087-
*/
1088-
static void imx_port_ucrs_save(struct uart_port *port,
1089-
struct imx_port_ucrs *ucr)
1090-
{
1091-
/* save control registers */
1092-
ucr->ucr1 = readl(port->membase + UCR1);
1093-
ucr->ucr2 = readl(port->membase + UCR2);
1094-
ucr->ucr3 = readl(port->membase + UCR3);
1095-
}
1096-
1097-
static void imx_port_ucrs_restore(struct uart_port *port,
1098-
struct imx_port_ucrs *ucr)
1099-
{
1100-
/* restore control registers */
1101-
writel(ucr->ucr1, port->membase + UCR1);
1102-
writel(ucr->ucr2, port->membase + UCR2);
1103-
writel(ucr->ucr3, port->membase + UCR3);
1104-
}
1105-
11061106
static int imx_poll_get_char(struct uart_port *port)
11071107
{
11081108
struct imx_port_ucrs old_ucr;

0 commit comments

Comments
 (0)