From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Chris Ball <chris@printf.net>, linux-mmc <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH] mmc: pxamci: prepare and unprepare the clocks
Date: Mon, 01 Sep 2014 15:28:18 +0200 [thread overview]
Message-ID: <87sikb4gi5.fsf@free.fr> (raw)
In-Reply-To: <CAPDyKFpaX4UHW-_z=yy7UA1Xuv2LZqQkttJ-tWugZYSXD4VwiQ@mail.gmail.com> (Ulf Hansson's message of "Mon, 1 Sep 2014 14:49:03 +0200")
Ulf Hansson <ulf.hansson@linaro.org> writes:
> I understand your concern, but I don't see why there should be any
> major difference in clock management code (clk tree wise), due to this
> patch. It worked before, so likely it will work now!?
It will ony work *differently*, it will change the clock management. It won't
break, but again it's *not* the purpose of the patch. The patch is aimed at
removing a warning.
As for the clock management, it will the change the behaviour :
Let's see the current clock management :
- pxamci_probe()
=> clock is disabled
mmc_add_host()
mmc_start_host()
mmc_power_up() (as pxamci is unaware of caps2)
Here the comment of the function is (drivers/mmc/core/core.c:1534):
"First, we enable power to the card without the clock running"
=> this won't be true if the clock is enabled in pxamci_probe()
mmc_set_ios(host, host->ios.clock=host->f_init)
pxamci_set_ios()
clk_enable()
=> here the clock is enabled, enable_count=1
mmc_host_clk_release()
pxamci_set_ios()
=> here the clock is disabled, enable_count=0
Let's see the your proposal clock management :
- pxamci_probe()
=> clock is enabled
mmc_add_host()
mmc_start_host()
mmc_power_up() (as pxamci is unaware of caps2)
mmc_set_ios(host, host->ios.clock=host->f_init)
pxamci_set_ios()
clk_enable()
=> here the clock is enabled twice, enable_count=2
mmc_host_clk_release()
pxamci_set_ios()
=> here the clock *remains enabled*, enable_count=1
- time passes with clock enabled
So I think there is a difference, unless my understand of the MMC core stack is wrong.
Cheers.
--
Robert
next prev parent reply other threads:[~2014-09-01 13:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-09 19:56 [PATCH] mmc: pxamci: prepare and unprepare the clocks Robert Jarzmik
2014-09-01 9:09 ` Robert Jarzmik
2014-09-01 10:31 ` Ulf Hansson
2014-09-01 12:20 ` Robert Jarzmik
2014-09-01 12:49 ` Ulf Hansson
2014-09-01 13:28 ` Robert Jarzmik [this message]
2014-09-02 7:53 ` Ulf Hansson
2014-09-02 9:02 ` Robert Jarzmik
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=87sikb4gi5.fsf@free.fr \
--to=robert.jarzmik@free.fr \
--cc=chris@printf.net \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@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