From: Kevin Hilman <khilman@kernel.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: arm@kernel.org, agross@codeaurora.org, galak@codeaurora.org,
linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] soc: qcom: do not disable the iface clock in probe
Date: Thu, 25 Sep 2014 15:59:03 -0700 [thread overview]
Message-ID: <7hfvff8fyg.fsf@deeprootsystems.com> (raw)
In-Reply-To: <5422E390.9060802@linaro.org> (Srinivas Kandagatla's message of "Wed, 24 Sep 2014 16:30:24 +0100")
Srinivas Kandagatla <srinivas.kandagatla@linaro.org> writes:
> On 24/09/14 16:22, Kevin Hilman wrote:
>> Srinivas Kandagatla <srinivas.kandagatla@linaro.org> writes:
>>
>>> since commit 31964ffebbb9 ("tty: serial: msm: Remove direct access to GSBI")'
>>> serial hangs if earlyprintk are enabled.
>>>
>>> This hang is noticed only when the GSBI driver is probed and all the
>>> earlyprintks before gsbi probe are seen on the console.
>>> The reason why it hangs is because GSBI driver disables hclk in its
>>> probe function without realizing that the serial IP might be in use by
>>> a bootconsole. As gsbi driver disables the clock in probe the
>>> bootconsole locks up.
>>
>>> Turning off hclk's could be dangerous if there are system components
>>> like earlyprintk using the hclk.
>>
>> This seems rather fragile. Isn't the right fix for these other
>> components to use the clk api to ensure the clock does not get enabled?
> Here we are depending on the bootloader to setup the clocks.
>
> Am not sure if we can really use clk apis at that early stage of bootstrap.
Not that early, but all that matters is that you clk_enable() sometime
before the GSBI driver calls clk_disable().
If the clocks are always enabled by the bootloader, the platforms clock
driver might check for those and ensure they are enabled, so that linux
is aware of it, and bugs like this one are avoided.
IMO, clock enable/disable shuffling in the GSBI driver to avoid UART
console problems is just papering over a bug that's waiting to pop up
elsewhere.
Kevin
prev parent reply other threads:[~2014-09-25 22:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 19:20 [PATCH v2] soc: qcom: do not disable the iface clock in probe Srinivas Kandagatla
2014-09-24 4:39 ` Olof Johansson
2014-09-24 15:22 ` Kevin Hilman
2014-09-24 15:30 ` Srinivas Kandagatla
2014-09-25 22:59 ` Kevin Hilman [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=7hfvff8fyg.fsf@deeprootsystems.com \
--to=khilman@kernel.org \
--cc=agross@codeaurora.org \
--cc=arm@kernel.org \
--cc=galak@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivas.kandagatla@linaro.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).