• Doug Anderson's avatar
    tty/serial: Prevent drop of DCD on suspend for Tegra UARTs · 9636b755
    Doug Anderson authored
    On Tegra UARTs (except UART1), the DTR / DCD / DSR lines are not
    externally accessible.  Instead, the DTR line internally appears to be
    looped back to be the input to the DCD and DSR lines.  The net effect
    of this is that when we drop DTR (like when we suspend), we'll see DCD
    drop too.  ...and when we see DCD drop, we treat that as a hangup.
    
    In order to prevent this hangup from occurring at every sleep, we need
    to force DTR to remain high on Tegra UARTs.
    
    This patch uses the mcr_mask / mcr_force fields, which were originally
    added for the kludge ALPHA_KLUDGE_MCR.  Using these fields does not
    prevent us from removing ALPHA_KLUDGE_MCR--we can just remove the "if"
    tests I have added and always init mcr_mask / mcr_force from the
    serial8250_config.
    
    NOTE: If we have people that are using UARTA on a Tegra and need to
    control DTR, we'll need to either add a separate port type for UARTA
    or we'll need to add some tegra-specific code to detect whether the
    DTR needs to be left high.
    Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    9636b755
8250.h 2.5 KB