From: David Vrabel <david.vrabel@csr.com>
To: Linus Walleij <linus.walleij@stericsson.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, Pierre Ossman <pierre@ossman.eu>,
linux-arm-kernel@lists.arm.linux.org.uk
Subject: Re: [PATCH 1/2] MMC Agressive clocking framework v5
Date: Wed, 22 Jul 2009 13:11:15 +0100 [thread overview]
Message-ID: <4A6701E3.3000204@csr.com> (raw)
In-Reply-To: <1248128808-2241-1-git-send-email-linus.walleij@stericsson.com>
Linus Walleij wrote:
> This patch modified the MMC core code to optionally call the
> set_ios() operation on the driver with the clock frequency set
> to 0 (gate) after a grace period of at least 8 MCLK cycles, then
> restore it (ungate) before any new request. This gives
> the driver the option to shut down the hardware block clock and
> thus (in known designs) the MCI clock to the MMC/SD card when
> the clock frequency is 0, i.e. the core has stated that the MCI
> clock does not need to be generated.
I'm not sure this is the right approach.
1. With some controllers (e.g., PXA270 I think) turning the clock on and
off is slow. This means if you're doing back-to-back commands you
should leave the clock on for best performance. I think there needs to
be a higher level active/idle knob for the user of the card (be it the
block driver or an SDIO function driver) to control whether to idle the
bus clock or controller.
2. Some controllers cannot detect SDIO interrupts if the clock is
stopped. There should either be a distinction between clock off and
clock idle.
3. Regardless of point 1 above. Using a workqueue item in this way
seems overkill. Consider using a timer and simply calling mod_timer()
at the start of every command. When the timer expires, idle the clock.
You will probably need a "command in progress" bit to ensure you don't
idle the clock if the timer expires in the middle of a command.
David
--
David Vrabel, Senior Software Engineer, Drivers
CSR, Churchill House, Cambridge Business Park, Tel: +44 (0)1223 692562
Cowley Road, Cambridge, CB4 0WZ http://www.csr.com/
'member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom'
next prev parent reply other threads:[~2009-07-22 12:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-20 22:26 [PATCH 1/2] MMC Agressive clocking framework v5 Linus Walleij
2009-07-21 20:28 ` Linus Walleij
2009-07-21 20:35 ` Marek Vasut
2009-07-21 22:44 ` Linus Walleij
2009-07-22 0:46 ` Madhusudhan
2009-07-22 12:11 ` David Vrabel [this message]
2009-07-22 22:33 ` Linus Walleij
2009-07-23 14:15 ` David Vrabel
2009-07-23 18:15 ` Adrian Hunter
2009-07-23 20:25 ` Linus Walleij
2009-07-24 22:03 ` Madhusudhan
2009-07-24 22:59 ` Andrew Morton
2009-07-25 11:35 ` Adrian Hunter
2009-07-23 20:30 ` Linus Walleij
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=4A6701E3.3000204@csr.com \
--to=david.vrabel@csr.com \
--cc=akpm@linux-foundation.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=pierre@ossman.eu \
/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