From: Karthik Ramasubramanian <kramasub@codeaurora.org>
To: Stephen Boyd <swboyd@chromium.org>,
andy.gross@linaro.org, corbet@lwn.net, david.brown@linaro.org,
gregkh@linuxfoundation.org, mark.rutland@arm.com,
robh+dt@kernel.org, wsa@the-dreams.de
Cc: linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, linux-i2c@vger.kernel.org,
linux-serial@vger.kernel.org, jslaby@suse.com,
evgreen@chromium.org, acourbot@chromium.org,
Girish Mahadevan <girishm@codeaurora.org>,
Sagar Dharia <sdharia@codeaurora.org>,
Doug Anderson <dianders@google.com>
Subject: Re: [PATCH v4 4/6] tty: serial: msm_geni_serial: Add serial driver support for GENI based QUP
Date: Thu, 22 Mar 2018 16:16:09 -0600 [thread overview]
Message-ID: <484ecaa1-d72c-cf32-8128-ec3469ba084c@codeaurora.org> (raw)
In-Reply-To: <152165280040.91116.1976061062009791598@swboyd.mtv.corp.google.com>
On 3/21/2018 11:20 AM, Stephen Boyd wrote:
> Quoting Karthik Ramasubramanian (2018-03-20 15:53:25)
>>
>>
>> On 3/20/2018 9:37 AM, Stephen Boyd wrote:
>>> Quoting Karthikeyan Ramasubramanian (2018-03-14 16:58:49)
>>>> diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
>>>> new file mode 100644
>>>> index 0000000..1442777
>>>> --- /dev/null
>>>> +++ b/drivers/tty/serial/qcom_geni_serial.c
>>>> @@ -0,0 +1,1158 @@
>>>> +
>
>>>
>>> Can you also support the OF_EARLYCON_DECLARE method of console writing
>>> so we can get an early printk style debug console?
>> Do you prefer that as part of this patch itself or is it ok if I upload
>> the earlycon support once this gets merged.
>
> I think this already got merged? So just split it out into another patch
> would be fine. I see the config is already selecting the earlycon
> support so it must be planned.
Yes it is definitely in the plan. Since the serial driver got merged, I
will address the pending comments in this patch series. I will upload
the early console support in another patch.
>
>>>
>>>
>>>> +
>>>> +static int __maybe_unused qcom_geni_serial_sys_resume_noirq(struct device *dev)
>>>> +{
>>>> + struct platform_device *pdev = to_platform_device(dev);
>>>> + struct qcom_geni_serial_port *port = platform_get_drvdata(pdev);
>>>> + struct uart_port *uport = &port->uport;
>>>> +
>>>> + if (console_suspend_enabled && uport->suspended) {
>>>> + uart_resume_port(uport->private_data, uport);
>>>> + disable_irq(uport->irq);
>>>
>>> I missed the enable_irq() part. Is this still necessary?
>> Suspending the uart console port invokes the uart port shutdown
>> operation. The shutdown operation disables and frees the concerned IRQ.
>> Resuming the uart console port invokes the uart port startup operation
>> which requests for the IRQ. The request_irq operation auto-enables the
>> IRQ. In addition, resume_noirq implicitly enables the IRQ. This leads to
>> an unbalanced IRQ enable warning.
>>
>> This disable_irq() helps with suppressing that warning.
>
> That's not obvious so we need a big comment here.
>
> I thought we would move this to the normal suspend/resume callbacks and
> skip the noirq variants. That would make this disable_irq() unnecessary
> then?
For a non-console UART(eg. 4-wire UART), to reduce the wakeup latency
_noirq variant is used so that the resources can be turned on as soon as
possible. The idea is to use the same suspend and resume operation for
both debug-uart and regular uart. Hence using the _noirq variant.
I will add a detailed comment regarding why we are disabling the IRQ.
>
> BTW, free_irq() should disable the irq itself, so it looks odd to have a
> disable_irq() followed directly by a free_irq().
I will update to just free_irq.
>
Regards,
Karthik.
--
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2018-03-22 22:16 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-14 23:58 [PATCH v4 0/6] Introduce GENI SE Controller Driver Karthikeyan Ramasubramanian
2018-03-14 23:58 ` [PATCH v4 1/6] dt-bindings: soc: qcom: Add device tree binding for GENI SE Karthikeyan Ramasubramanian
2018-03-18 12:52 ` Rob Herring
2018-03-20 15:39 ` Stephen Boyd
2018-03-14 23:58 ` [PATCH v4 2/6] soc: qcom: Add GENI based QUP Wrapper driver Karthikeyan Ramasubramanian
2018-03-14 23:58 ` [PATCH v4 3/6] i2c: i2c-qcom-geni: Add bus driver for the Qualcomm GENI I2C controller Karthikeyan Ramasubramanian
2018-03-19 21:08 ` Doug Anderson
2018-03-20 22:10 ` Karthik Ramasubramanian
2018-03-20 22:23 ` Sagar Dharia
2018-03-14 23:58 ` [PATCH v4 4/6] tty: serial: msm_geni_serial: Add serial driver support for GENI based QUP Karthikeyan Ramasubramanian
2018-03-20 15:37 ` Stephen Boyd
2018-03-20 22:53 ` Karthik Ramasubramanian
2018-03-21 17:20 ` Stephen Boyd
2018-03-22 22:16 ` Karthik Ramasubramanian [this message]
2018-03-20 18:39 ` Evan Green
2018-03-20 23:44 ` Karthik Ramasubramanian
2018-03-21 0:18 ` Evan Green
2018-03-14 23:58 ` [PATCH v4 5/6] arm64: dts: sdm845: Add serial console support Karthikeyan Ramasubramanian
2018-03-20 19:39 ` Stephen Boyd
2018-03-21 8:37 ` Rajendra Nayak
2018-03-14 23:58 ` [PATCH v4 6/6] arm64: dts: sdm845: Add I2C controller support Karthikeyan Ramasubramanian
2018-03-16 23:54 ` Doug Anderson
2018-03-19 22:15 ` Sagar Dharia
2018-03-19 23:56 ` Doug Anderson
2018-03-20 7:45 ` Stephen Boyd
2018-03-20 22:16 ` Sagar Dharia
2018-03-21 3:47 ` Doug Anderson
2018-03-21 16:07 ` Sagar Dharia
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=484ecaa1-d72c-cf32-8128-ec3469ba084c@codeaurora.org \
--to=kramasub@codeaurora.org \
--cc=acourbot@chromium.org \
--cc=andy.gross@linaro.org \
--cc=corbet@lwn.net \
--cc=david.brown@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@google.com \
--cc=evgreen@chromium.org \
--cc=girishm@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=sdharia@codeaurora.org \
--cc=swboyd@chromium.org \
--cc=wsa@the-dreams.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;
as well as URLs for NNTP newsgroup(s).