Skip to contentSkip to conversation

serial/imx.c : wrong baudrate at resume if console is on UART

DISCUSSION Eric Bénard 1 participant 2 messages May 27, 2010 – May 31, 2010 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

Hi,

while testing suspend/resume on i.MX27, I meet a problem on resume : if the console is on the UART the baudrate it not restored properly (I get random bitrate between 50 to 2Mbps). Here is a patch to add pm to the uart_ops (but the problem occurs also without this patch) :
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-May/016495.html

What is strange is that giving wrong structures (platform_device instead of device) in suspend/resume functions as in following patch "fix" the problem :
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-May/015985.html

Do you have any idea of what could be wrong there ?

Many thanks,
Eric

#1 lore raw

Hi,

Quoted 6 lines · Eric Bénard

while testing suspend/resume on i.MX27, I meet a problem on resume : if the console is on the UART the baudrate it not restored properly (I get random bitrate between 50 to 2Mbps). Here is a patch to add pm to the uart_ops (but the problem occurs also without this patch) :
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-May/016495.html

I've noticed that commenting out the following line in serial_core.c "fix" the problem :

drivers/serial/serial_core.c +1 -1
index 7f28307..c63476e 100644
@@ -2092,7 +2092,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_
         */
        if (uart_console(uport)) {
                uart_change_pm(state, 0);
-               uport->ops->set_termios(uport, &termios, NULL);
+//             uport->ops->set_termios(uport, &termios, NULL);
                console_start(uport->cons);
        }
 

Do you have a hint of why the baudrate is not properly restored for the console or where I should dig to fix this in serial/imx.c ?

Thanks
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html