linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Maarten Brock <m.brock@vanmierlo.com>,
	Shubhrajyoti Datta <shubhraj@xilinx.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	<linux-serial@vger.kernel.org>, <jirislaby@kernel.org>,
	<jacmet@sunsite.dk>, git <git@xilinx.com>,
	<michal.simek@xilinx.com>
Subject: Re: [PATCH v2] serial-uartlite: Remove an un-necessary read of control register
Date: Wed, 15 Dec 2021 12:56:24 +0100	[thread overview]
Message-ID: <e30af06d-0701-59b8-cb27-b77978feadac@xilinx.com> (raw)
In-Reply-To: <cd14525f12ea09fe85d9db18712ae20a@vanmierlo.com>



On 11/26/21 15:07, Maarten Brock wrote:
> + Michal
> 
> On 2021-11-24 13:37, Shubhrajyoti Datta wrote:
>>> -----Original Message-----
>>> From: Greg KH <gregkh@linuxfoundation.org>
>>> Sent: Wednesday, November 24, 2021 3:38 PM
>>> To: Shubhrajyoti Datta <shubhraj@xilinx.com>
>>> Cc: linux-serial@vger.kernel.org; jirislaby@kernel.org; jacmet@sunsite.dk; git
>>> <git@xilinx.com>
>>> Subject: Re: [PATCH v2] serial-uartlite: Remove an un-necessary read of control
>>> register
>>>
>>> On Tue, Nov 23, 2021 at 06:43:48PM +0530, Shubhrajyoti Datta wrote:
>>> > The control register is a writeonly register that's why reading it
>>> > doesn't make any sense.
>>> > The manual states "This is a write-only register. Issuing a read
>>> > request to the control register generates the read acknowledgment with zero
>>> data."
>>>
>>> Are you sure this is ok to remove?  Usually you have to do a read after a 
>>> write to
>>> ensure that the write succeeded.
>>>
>>> What ensures that the write succeeded now if you remove this read?
>>
>> I do not find the mention of a read requirement in the manual.
>> Also in the current code in ulite_console_write and in ulite_startup
>> we are writing without a read.
>>
>> Thanks and Regards,
>> Shubhrajyoti
> 
> I suggest to confer with Michal Simek. He introduced the read in 
> ulite_request_port()

 From my perspective that read is not needed and can be removed.

> in the past. The other one in ulite_shutdown() has been there since its 
> inception in
> 2006.

I confirm this. It was originally developed for PPC systems that's why not sure 
if there was any issue on PLB bus. But I expect Grant wanted to make sure that 
disabling port reached IP that's why he read it back that irq can be freed and 
clock disabled.
This is better to keep it there for sure.

Thanks,
Michal

      reply	other threads:[~2021-12-15 11:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 13:13 [PATCH v2] serial-uartlite: Remove an un-necessary read of control register Shubhrajyoti Datta
2021-11-24 10:07 ` Greg KH
2021-11-24 12:37   ` Shubhrajyoti Datta
2021-11-24 12:45     ` Greg KH
2021-11-26 14:07     ` Maarten Brock
2021-12-15 11:56       ` Michal Simek [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=e30af06d-0701-59b8-cb27-b77978feadac@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=git@xilinx.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jacmet@sunsite.dk \
    --cc=jirislaby@kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=m.brock@vanmierlo.com \
    --cc=shubhraj@xilinx.com \
    /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).