Re: [PATCH 1/2] mmc: agressive clocking framework v8

2010-12-22 Thread Chris Ball
Hi Linus, On Wed, Dec 22, 2010 at 09:50:12AM +0100, Linus Walleij wrote: > Sure! Chris do you prefer this one instead? > > From: Linus Walleij > Date: Wed, 22 Dec 2010 09:49:04 +0100 > Subject: [PATCH] mmc: check for > 1 clk_requests > > Since we make sure the clock is enabled in the mmc_host_c

Re: [PATCH 1/2] mmc: agressive clocking framework v8

2010-12-22 Thread Linus Walleij
2010/12/22 David Vrabel : > [Me] >> It should be BUG_ON(host->clk_requests > 1) > > Change to a WARN_ON() perhaps? Sure! Chris do you prefer this one instead? From: Linus Walleij Date: Wed, 22 Dec 2010 09:49:04 +0100 Subject: [PATCH] mmc: check for > 1 clk_requests Since we make sure the clock

Re: [PATCH 1/2] mmc: agressive clocking framework v8

2010-12-22 Thread David Vrabel
On 22/12/2010 08:12, Linus Walleij wrote: > 2010/12/21 Chris Ball : > >> Hi Linus, >> >> On Wed, Nov 03, 2010 at 10:22:50AM +0100, Linus Walleij wrote: >>> +/* >>> + * mmc_host_clk_exit - shut down clock gating code >>> + * @host: host with potential clock to control >>> + */ >>> +static inlin

Re: [PATCH 1/2] mmc: agressive clocking framework v8

2010-12-22 Thread Linus Walleij
2010/12/21 Chris Ball : > Hi Linus, > > On Wed, Nov 03, 2010 at 10:22:50AM +0100, Linus Walleij wrote: >> +/* >> + *   mmc_host_clk_exit - shut down clock gating code >> + *   @host: host with potential clock to control >> + */ >> +static inline void mmc_host_clk_exit(struct mmc_host *host) >> +{

Re: [PATCH 1/2] mmc: agressive clocking framework v8

2010-12-21 Thread Chris Ball
Hi Linus, On Wed, Nov 03, 2010 at 10:22:50AM +0100, Linus Walleij wrote: > +/* > + * mmc_host_clk_exit - shut down clock gating code > + * @host: host with potential clock to control > + */ > +static inline void mmc_host_clk_exit(struct mmc_host *host) > +{ > + /* > + * Wait for any o

Re: [PATCH 1/2] mmc: agressive clocking framework v8

2010-11-24 Thread Chris Ball
On Wed, Nov 24, 2010 at 02:15:57PM +0100, Linus Walleij wrote: > > [   10.136067] mmc0: frequency set to 0 in disable function, this means the > > clock is already disabled. > > It didn't use to be like that back when I first wrote the patch, but > it seems to be like > that nowadays. So yes. Hm

Re: [PATCH 1/2] mmc: agressive clocking framework v8

2010-11-24 Thread Linus Walleij
2010/11/23 Chris Ball : > [   10.136067] mmc0: frequency set to 0 in disable function, this means the > clock is already disabled. > [   10.164089] mmc0: frequency set to 0 in disable function, this means the > clock is already disabled. > [   10.192076] mmc0: frequency set to 0 in disable funct

Re: [PATCH 1/2] mmc: agressive clocking framework v8

2010-11-22 Thread Chris Ball
Hi Linus, Trying out CLKGATE=y on my x86 laptop with sdhci-pci: [ 10.080469] Registered led device: mmc0:: [ 10.080595] mmc0: SDHCI controller on PCI [:0d:00.0] using DMA [ 10.107996] mmc0: frequency set to 0 in disable function, this means the clock is already disabled. [ 10.12216

Re: [PATCH 1/2] mmc: agressive clocking framework v8

2010-11-10 Thread Ohad Ben-Cohen
On Wed, Nov 10, 2010 at 6:25 PM, Linus Walleij wrote: > Not that one, because the only place where ungate is called > is immediately before the request or set_ios(). So the request > or set_ios() will complete How can you assume that ? Nothing prevents a context switch after ungate, and before th

Re: [PATCH 1/2] mmc: agressive clocking framework v8

2010-11-10 Thread Chris Ball
Hi Linus, On Wed, Nov 10, 2010 at 05:25:43PM +0100, Linus Walleij wrote: > Chris, do you want an incremental patch or shall I spin an all-new > v10 patch? I think incremental patches make sense from here on out, now that it's in -next. We can decide whether it's worth performing any rebasing onc

Re: [PATCH 1/2] mmc: agressive clocking framework v8

2010-11-10 Thread Linus Walleij
Ohad Ben-Cohen wrote: > Hi Linus, > On Wed, Nov 3, 2010 at 11:22 AM, Linus Walleij > wrote: > ... >> +static void mmc_host_clk_gate_delayed(struct mmc_host *host) >> +{ >> + unsigned long tick_ns; >> + unsigned long freq = host->ios.clock; >> + unsigned long flags; >> + in

Re: [PATCH 1/2] mmc: agressive clocking framework v8

2010-11-10 Thread Ohad Ben-Cohen
Hi Linus, On Wed, Nov 3, 2010 at 11:22 AM, Linus Walleij wrote: ... > +static void mmc_host_clk_gate_delayed(struct mmc_host *host) > +{ > +       unsigned long tick_ns; > +       unsigned long freq = host->ios.clock; > +       unsigned long flags; > +       int users; > + > +       if (!freq) {

Re: [PATCH 1/2] mmc: agressive clocking framework v8

2010-11-09 Thread Linus Walleij
Chris Ball wrote: > Done -- thanks very much for doing this! I fixed up a compile error > when CONFIG_MMC_CLKGATE=n: Thanks for the cleanup Chris, let's see if this one holds now then... :-) Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a m

Re: [PATCH 1/2] mmc: agressive clocking framework v8

2010-11-08 Thread Chris Ball
Hi Linus, On Mon, Nov 08, 2010 at 11:30:41PM +0100, Linus Walleij wrote: > Chris, can you add v8 to your for-next git? Done -- thanks very much for doing this! I fixed up a compile error when CONFIG_MMC_CLKGATE=n: diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 746730e..8bf

Re: [PATCH 1/2] mmc: agressive clocking framework v8

2010-11-08 Thread Linus Walleij
2010/11/8 Linus Walleij : > Andrew, can you add this v8 version (not the misguided v9!) > version to your patch stack? I'm slow in the head. We have an MMC maintainer now. Chris, can you add v8 to your for-next git? Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscrib

Re: [PATCH 1/2] mmc: agressive clocking framework v8

2010-11-08 Thread Linus Walleij
2010/11/3 Linus Walleij : > This patch modifies 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 opt

[PATCH 1/2] mmc: agressive clocking framework v8

2010-11-03 Thread Linus Walleij
This patch modifies 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 MCI clock to the