From: Shawn Guo <shawn.guo@linaro.org>
To: Jingchang Lu <b35083@freescale.com>
Cc: linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, gregkh@linuxfoundation.org,
s.hauer@pengutronix.de
Subject: Re: [PATCH v4] tty: serial: add Freescale lpuart driver support
Date: Fri, 5 Jul 2013 17:14:51 +0800 [thread overview]
Message-ID: <20130705091449.GA20040@S2101-09.ap.freescale.net> (raw)
In-Reply-To: <1369733161-19168-1-git-send-email-b35083@freescale.com>
Jingchang,
On Tue, May 28, 2013 at 05:26:01PM +0800, Jingchang Lu wrote:
> +static void lpuart_setup_watermark(struct lpuart_port *sport)
> +{
> + unsigned char val, old_cr2, cr2;
> +
> + /* set receiver/transmitter trigger level. */
> + old_cr2 = cr2 = readb(sport->port.membase + UARTCR2);
> + cr2 &= ~(UARTCR2_TIE | UARTCR2_TCIE | UARTCR2_TE |
> + UARTCR2_RIE | UARTCR2_RE);
> + writeb(cr2, sport->port.membase + UARTCR2);
> +
> + writeb(2, sport->port.membase + UARTTWFIFO);
> + writeb(1, sport->port.membase + UARTRWFIFO);
> +
> + /* determine FIFO size and enable */
> + val = readb(sport->port.membase + UARTPFIFO);
> +
> + sport->tx_fifo_size = 0x1 << (((val >> UARTPFIFO_TXSIZE_OFF) &
> + UARTPFIFO_FIFOSIZE_MASK) + 1);
> +
> + sport->rx_fifo_size = 0x1 << (((val >> UARTPFIFO_RXSIZE_OFF) &
> + UARTPFIFO_FIFOSIZE_MASK) + 1);
> +
> + writeb(val | UARTPFIFO_TXFE | UARTPFIFO_RXFE,
> + sport->port.membase + UARTPFIFO);
> +
> + /* Flush the Tx and Rx FIFO to a known state */
> + writeb(UARTCFIFO_TXFLUSH | UARTCFIFO_RXFLUSH,
> + sport->port.membase + UARTCFIFO);
> +
> + /* restore CR2 */
> + writeb(old_cr2, sport->port.membase + UARTCR2);
I just noticed that you dropped this CR2 restore since v5 of the patch.
I have a patch enabling low-level debug support for Vybrid. It works
with v4 of your patch but has problem with the v5. The console stops
working as below.
Serial: IMX driver
serial: Freescale lpuart driver
40028000.serial: ttyLP1 at MMIO 0x40028000 (irq = 94) is a FSL_LPUART
console [ttyLP1] enabled, bootconsole disabled
If I have above CR2 restore code added back. The low-level debug
support will just work fine with console.
Is it an accident you removed the code?
Shawn
> +
> +}
next prev parent reply other threads:[~2013-07-05 9:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-28 9:26 [PATCH v4] tty: serial: add Freescale lpuart driver support Jingchang Lu
2013-05-29 3:49 ` Shawn Guo
2013-05-29 6:57 ` Lu Jingchang-B35083
2013-05-29 7:26 ` Shawn Guo
2013-07-05 9:14 ` Shawn Guo [this message]
2013-07-05 9:39 ` Lu Jingchang-B35083
2013-07-05 12:35 ` Shawn Guo
2013-07-08 2:51 ` Lu Jingchang-B35083
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=20130705091449.GA20040@S2101-09.ap.freescale.net \
--to=shawn.guo@linaro.org \
--cc=b35083@freescale.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
/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