linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: LW@KARO-electronics.de (Lothar Waßmann)
To: linux-arm-kernel@lists.infradead.org
Subject: Rogue low pulse on TXD created by amba-pl011.c during startup
Date: Fri, 28 Feb 2014 15:54:03 +0100	[thread overview]
Message-ID: <20140228155403.2bed6fe5@ipc1.ka-ro> (raw)

Hi,

The following portion of the code in drivers/tty/serial/amba_pl011.c
produces a low pulse (actually a NUL character with 5 bits and maximum
baud rate) on the serial output each time the startup function is
called.
 1516)	static int pl011_startup(struct uart_port *port)
[...]
 1537)	/*
 1538)	 * Provoke TX FIFO interrupt into asserting.
 1539)	 */
 1540)	cr = UART01x_CR_UARTEN | UART011_CR_TXE | UART011_CR_LBE;
 1541)	writew(cr, uap->port.membase + UART011_CR);
 1542)	writew(0, uap->port.membase + UART011_FBRD);
 1543)	writew(1, uap->port.membase + UART011_IBRD);
 1544)	writew(0, uap->port.membase + uap->lcrh_rx);
 1545)	if (uap->lcrh_tx != uap->lcrh_rx) {
 1546)		int i;
 1547)		/*
 1548)		 * Wait 10 PCLKs before writing LCRH_TX register,
 1549)		 * to get this delay write read only register 10 times
 1550)		 */
 1551)          for (i = 0; i < 10; ++i)
 1552)			writew(0xff, uap->port.membase + UART011_MIS);
 1553)		writew(0, uap->port.membase + uap->lcrh_tx);
 1554)	}
 1555)	writew(0, uap->port.membase + UART01x_DR);
** This write causes the NUL character to be sent.
 1556)	while (readw(uap->port.membase + UART01x_FR) & UART01x_FR_BUSY)
 1557)		barrier();

Can anyone enlighten me what this is meant to achieve?
The git history doesn't provide any clue, since this code was already
in the initial commit.
I also found no clue in the i.MX28 Reference Manual and the ARM
PrimeCell UART (PL011) ? Reference Manual (DDI0183.pdf).

The code does not work without this block of code (on an i.MX28).

Does anybody have an idea how to prevent the rogue
pulse from being sent on the TX line?


Lothar Wa?mann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________

             reply	other threads:[~2014-02-28 14:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28 14:54 Lothar Waßmann [this message]
2014-02-28 15:22 ` Rogue low pulse on TXD created by amba-pl011.c during startup Rob Herring

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=20140228155403.2bed6fe5@ipc1.ka-ro \
    --to=lw@karo-electronics.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).