mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@nvidia.com>
To: Doug Anderson <dianders@chromium.org>,
	Jiri Slaby <jirislaby@gmail.com>, Olof Johansson <olof@lixom.net>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
	Alan Cox <alan@linux.intel.com>,
	Allen Martin <AMartin@nvidia.com>,
	Tom Warren <TWarren@nvidia.com>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] tty/serial: Prevent drop of DCD on suspend for Tegra UARTs
Date: Thu, 13 Oct 2011 10:57:59 -0700	[thread overview]
Message-ID: <74CDBE0F657A3D45AFBB94109FB122FF173BE1A0C6@HQMAIL01.nvidia.com> (raw)
In-Reply-To: <1318377943-24519-1-git-send-email-dianders@chromium.org>

Doug Anderson wrote at Tuesday, October 11, 2011 6:06 PM:
> 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.

I did some research on the HW, and here's how everything is hooked up
in Tegra20 and Tegra30. Later chips may have this fixed, or at least
configurable; I don't know the details yet.

All 5 UARTs support the modem signals in the HW block.

In UART A, you can mux the modem signals out using the pinmux. If the
pinmux /doesn't/ route the signals out, the DSR and DCD signals are tied
to an /active/ state.

In UART B, the DTR output is indeed wired back into the DSR and DCD
inputs, as you discovered.

In UARTs C, D, and E, the DSR and DCD signals are tied to an /inactive/
state.

So, I think this particular WAR is only needed on UART B.

-- 
nvpublic


      parent reply	other threads:[~2011-10-13 17:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-12  0:05 Doug Anderson
2011-10-12 11:56 ` Alan Cox
2011-10-13 17:57 ` Stephen Warren [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74CDBE0F657A3D45AFBB94109FB122FF173BE1A0C6@HQMAIL01.nvidia.com \
    --to=swarren@nvidia.com \
    --cc=AMartin@nvidia.com \
    --cc=TWarren@nvidia.com \
    --cc=alan@linux.intel.com \
    --cc=dianders@chromium.org \
    --cc=gregkh@suse.de \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=olof@lixom.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®