From: timur@codeaurora.org (Timur Tabi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] tty: pl011: Work around QDF2400 E44 stuck BUSY bit
Date: Wed, 8 Feb 2017 17:04:57 -0600 [thread overview]
Message-ID: <5e18324f-d09d-d652-df23-d4a3f8f053fd@codeaurora.org> (raw)
In-Reply-To: <6afb0a98-0973-33ec-0b76-fc6378e64309@codeaurora.org>
On 02/08/2017 04:22 PM, Christopher Covington wrote:
>>> >> - while (pl011_read(uap, REG_FR) & uap->vendor->fr_busy)
>>> >> + while ((pl011_read(uap, REG_FR) ^ uap->vendor->inv_fr)
>>> >> + & uap->vendor->fr_busy)
>> >
>> > I really think the XOR logic needs to be documented wherever it's
>> > used. It's just too confusing.
> References such as the following for basic bit operations like
> setting, clearing, and toggling are easy enough to come by.
>
> http://stackoverflow.com/questions/47981/how-do-you-set-clear-and-toggle-a-single-bit-in-c-c
I know what XOR does. I was thinking a more high-level comment would be
appropriate. With E44, we want to ignore the BUSY bit and use TXFE instead.
So was hoping to a comment that says that:
/* Normally, we poll until BUSY=0, but E44 says we should poll until TXFE=1
instead. So with E44, we set fr_busy to TXFE, but we have to invert it. */
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
next prev parent reply other threads:[~2017-02-08 23:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-08 0:57 [PATCH 1/2] tty: pl011: Work around QDF2400 E44 stuck BUSY bit Christopher Covington
2017-02-08 0:57 ` [PATCH 2/2] tty: pl011: Work around QDF2400 E44 for earlycon Christopher Covington
2017-02-08 4:07 ` Timur Tabi
2017-02-08 4:31 ` Shanker Donthineni
2017-02-14 23:48 ` Christopher Covington
2017-02-08 4:05 ` [PATCH 1/2] tty: pl011: Work around QDF2400 E44 stuck BUSY bit Timur Tabi
2017-02-08 22:22 ` Christopher Covington
2017-02-08 23:04 ` Timur Tabi [this message]
2017-02-14 23:43 ` Christopher Covington
2017-02-08 12:26 ` Robin Murphy
2017-02-08 13:27 ` Timur Tabi
2017-02-08 13:33 ` Mark Rutland
2017-02-08 14:09 ` Timur Tabi
2017-02-08 15:35 ` Marc Zyngier
2017-02-08 16:07 ` Timur Tabi
2017-02-08 21:57 ` Christopher Covington
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=5e18324f-d09d-d652-df23-d4a3f8f053fd@codeaurora.org \
--to=timur@codeaurora.org \
--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).