Re: [patch 7/8] SDHCI: Add change_clock callback for glue drivers

From: Pierre Ossman
Date: Sun Dec 21 2008 - 09:07:59 EST


On Tue, 02 Dec 2008 15:40:25 +0000
Ben Dooks <ben-linux@xxxxxxxxx> wrote:

> Add a change_clock callback to allow drivers to update
> device specific clock selections and control registers
> when there is a change in clock.
>
> Move the main part of sdhci_set_clock() to a new routine
> which can be called by the glue drivers to do the sdhci
> standard clock management.
>
> Update the sdhci-s3c driver to use this to select the
> appropriate clock source when clocks change.
>
> Signed-off-by: Ben Dooks <ben-linux@xxxxxxxxx>
>

I'm still waiting for a proper description of things here.

Looking at the code, it looks like you have multiple clock sources and
selecting the best one dynamically. That's probably a nice feature, but
it should be possible to solve whilst still keeping calls going only
from sdhci to sdhci-s3c.

E.g. we could add a caps field (to keep quirks just for bugs) which
states "has multiple clock sources". Before the core changes the clock,
it calls ops->select_clock(target_hz), which changes clock source and
returns the new base frequency.

Rgds
--
-- Pierre Ossman

WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.

Attachment: signature.asc
Description: PGP signature