devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yu Tu <yu.tu@amlogic.com>
To: Jiri Slaby <jirislaby@kernel.org>, <linux-serial@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-amlogic@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Subject: Re: [PATCH V5 2/5] tty: serial: meson: Move request the register region.
Date: Tue, 11 Jan 2022 10:48:41 +0800	[thread overview]
Message-ID: <cad33ab0-26d3-5b78-3bcf-62217aa70871@amlogic.com> (raw)
In-Reply-To: <01066e66-5d97-ab40-b4a6-99e962b47073@kernel.org>

Hi Jiri ,
	Thank you very much for your reply.

On 2022/1/10 19:58, Jiri Slaby wrote:
> [ EXTERNAL EMAIL ]
> 
> Hi,
> 
> On 10. 01. 22, 11:42, Yu Tu wrote:
>> This simplifies resetting the UART controller during probe
>> and will make it easier to integrate the common clock code
>> which will require the registers at probe time as well.
> 
> And you are *also* switching devm_request_mem_region+devm_ioremap into 
> devm_ioremap_resource without even noting it here. It should've been 
> done in a separate patch.
> 
I can change it as you suggest。
The switching devm_request_mem_region+devm_ioremap into
devm_ioremap_resource in a separate patch.

> And no, do not resend a new version in the next few days. Having v5 in 
> 20 days is a bit too much. Give maintainers and reviewers some more 
> space to express themselves.
I am so sorry if PATCH is sent too frequently, which has disturbed you.
How often should I send it? Or under what circumstances can I send the 
next version?

>> Signed-off-by: Yu Tu <yu.tu@amlogic.com>
>> ---
>>   drivers/tty/serial/meson_uart.c | 24 ++++++------------------
>>   1 file changed, 6 insertions(+), 18 deletions(-)
>>
>> diff --git a/drivers/tty/serial/meson_uart.c 
>> b/drivers/tty/serial/meson_uart.c
>> index 45e00d928253..7570958d010c 100644
>> --- a/drivers/tty/serial/meson_uart.c
>> +++ b/drivers/tty/serial/meson_uart.c
>> @@ -395,24 +395,11 @@ static int meson_uart_verify_port(struct 
>> uart_port *port,
>>   static void meson_uart_release_port(struct uart_port *port)
>>   {
>> -    devm_iounmap(port->dev, port->membase);
>> -    port->membase = NULL;
>> -    devm_release_mem_region(port->dev, port->mapbase, port->mapsize);
>> +    /* nothing to do */
>>   }
>>   static int meson_uart_request_port(struct uart_port *port)
>>   {
>> -    if (!devm_request_mem_region(port->dev, port->mapbase, 
>> port->mapsize,
>> -                     dev_name(port->dev))) {
>> -        dev_err(port->dev, "Memory region busy\n");
>> -        return -EBUSY;
>> -    }
>> -
>> -    port->membase = devm_ioremap(port->dev, port->mapbase,
>> -                         port->mapsize);
>> -    if (!port->membase)
>> -        return -ENOMEM;
>> -
>>       return 0;
>>   }
>> @@ -733,6 +720,10 @@ static int meson_uart_probe(struct 
>> platform_device *pdev)
>>       if (!port)
>>           return -ENOMEM;
>> +    port->membase = devm_ioremap_resource(&pdev->dev, res_mem);
>> +    if (IS_ERR(port->membase))
>> +        return PTR_ERR(port->membase);
>> +
>>       ret = meson_uart_probe_clocks(pdev, port);
>>       if (ret)
>>           return ret;
>> @@ -754,10 +745,7 @@ static int meson_uart_probe(struct 
>> platform_device *pdev)
>>       platform_set_drvdata(pdev, port);
>>       /* reset port before registering (and possibly registering 
>> console) */
>> -    if (meson_uart_request_port(port) >= 0) {
>> -        meson_uart_reset(port);
>> -        meson_uart_release_port(port);
>> -    }
>> +    meson_uart_reset(port);
>>       ret = uart_add_one_port(&meson_uart_driver, port);
>>       if (ret)
> 
> thanks,

  reply	other threads:[~2022-01-11  2:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 10:42 [PATCH V5 0/5] The UART driver compatible with Yu Tu
2022-01-10 10:42 ` [PATCH V5 1/5] dt-bindings: serial: meson: Drop legacy compatible Yu Tu
2022-01-10 16:18   ` Rob Herring
2022-01-11  7:18     ` Yu Tu
2022-01-10 10:42 ` [PATCH V5 2/5] tty: serial: meson: Move request the register region Yu Tu
2022-01-10 11:58   ` Jiri Slaby
2022-01-11  2:48     ` Yu Tu [this message]
2022-01-13  7:25       ` Jiri Slaby
2022-01-10 10:42 ` [PATCH V5 3/5] tty: serial: meson: Using the common clock code describe Yu Tu
2022-01-10 12:11   ` Jiri Slaby
2022-01-11  3:13     ` Yu Tu
2022-01-10 10:42 ` [PATCH V5 4/5] tty: serial: meson: Make some bit of the REG5 register writable Yu Tu
2022-01-10 10:42 ` [PATCH V5 5/5] tty: serial: meson: Added S4 SOC compatibility Yu Tu

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=cad33ab0-26d3-5b78-3bcf-62217aa70871@amlogic.com \
    --to=yu.tu@amlogic.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jbrunet@baylibre.com \
    --cc=jirislaby@kernel.org \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=narmstrong@baylibre.com \
    --cc=robh+dt@kernel.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).