Re: [PATCH 4/4] ARM: shmobile: ag5evm, ap4: Make use of irq index enum

2011-08-18 Thread Magnus Damm
On Fri, Aug 19, 2011 at 3:39 PM, Simon Horman wrote: > On Fri, Aug 19, 2011 at 02:20:11PM +0900, Simon Horman wrote: >> On Fri, Aug 19, 2011 at 01:16:09PM +0900, Magnus Damm wrote: >> > On Fri, Aug 19, 2011 at 10:10 AM, Simon Horman wrote: >> > > This is intended to make it easier to correctly or

Re: [PATCH 4/4] ARM: shmobile: ag5evm, ap4: Make use of irq index enum

2011-08-18 Thread Magnus Damm
On Fri, Aug 19, 2011 at 2:20 PM, Simon Horman wrote: ... > Moreover, I think that there needs to be some agreement between Guennadi > and yourself with regards to what IRQ combinations are valid before I (or > anyone else) can implement something that is acceptable to you both. And > I think that

Re: [PATCH 4/4] ARM: shmobile: ag5evm, ap4: Make use of irq index enum

2011-08-18 Thread Simon Horman
On Fri, Aug 19, 2011 at 02:20:11PM +0900, Simon Horman wrote: > On Fri, Aug 19, 2011 at 01:16:09PM +0900, Magnus Damm wrote: > > On Fri, Aug 19, 2011 at 10:10 AM, Simon Horman wrote: > > > This is intended to make it easier to correctly order IRQs. > > > > > > As suggested by Guennadi Liakhovetski

Re: [PATCH 2/4] mmc: tmio: Provide separate interrupt handlers

2011-08-18 Thread Magnus Damm
On Fri, Aug 19, 2011 at 1:59 PM, Simon Horman wrote: > On Fri, Aug 19, 2011 at 01:27:41PM +0900, Magnus Damm wrote: >> On Fri, Aug 19, 2011 at 12:30 PM, Simon Horman wrote: >> > On Fri, Aug 19, 2011 at 12:09:50PM +0900, Magnus Damm wrote: >> >> On Fri, Aug 19, 2011 at 10:10 AM, Simon Horman wrot

Re: [PATCH 4/4] ARM: shmobile: ag5evm, ap4: Make use of irq index enum

2011-08-18 Thread Simon Horman
On Fri, Aug 19, 2011 at 01:16:09PM +0900, Magnus Damm wrote: > On Fri, Aug 19, 2011 at 10:10 AM, Simon Horman wrote: > > This is intended to make it easier to correctly order IRQs. > > > > As suggested by Guennadi Liakhovetski. > > > --- a/arch/arm/mach-shmobile/board-ag5evm.c > > +++ b/arch/arm/

Re: [PATCH 2/4] mmc: tmio: Provide separate interrupt handlers

2011-08-18 Thread Simon Horman
On Fri, Aug 19, 2011 at 01:27:41PM +0900, Magnus Damm wrote: > On Fri, Aug 19, 2011 at 12:30 PM, Simon Horman wrote: > > On Fri, Aug 19, 2011 at 12:09:50PM +0900, Magnus Damm wrote: > >> On Fri, Aug 19, 2011 at 10:10 AM, Simon Horman wrote: > >> > Provide separate interrupt handlers which may be

Re: [PATCH 1/4] mmc: tmio: Cache interrupt masks

2011-08-18 Thread Magnus Damm
On Fri, Aug 19, 2011 at 10:10 AM, Simon Horman wrote: > This avoids the need to look up the masks each time an interrupt > is handled. > > As suggested by Guennadi. > > Cc: Guennadi Liakhovetski > Cc: Magnus Damm > Signed-off-by: Simon Horman Good idea, thanks for this! / magnus -- To unsubsc

Re: [PATCH 2/4] mmc: tmio: Provide separate interrupt handlers

2011-08-18 Thread Magnus Damm
On Fri, Aug 19, 2011 at 12:30 PM, Simon Horman wrote: > On Fri, Aug 19, 2011 at 12:09:50PM +0900, Magnus Damm wrote: >> On Fri, Aug 19, 2011 at 10:10 AM, Simon Horman wrote: >> > Provide separate interrupt handlers which may be used by platforms where >> > SDHI has three interrupt sources. >> > >

Re: [PATCH 4/4] ARM: shmobile: ag5evm, ap4: Make use of irq index enum

2011-08-18 Thread Magnus Damm
On Fri, Aug 19, 2011 at 10:10 AM, Simon Horman wrote: > This is intended to make it easier to correctly order IRQs. > > As suggested by Guennadi Liakhovetski. > --- a/arch/arm/mach-shmobile/board-ag5evm.c > +++ b/arch/arm/mach-shmobile/board-ag5evm.c > @@ -352,15 +352,15 @@ static struct resource

Re: [PATCH 2/4] mmc: tmio: Provide separate interrupt handlers

2011-08-18 Thread Simon Horman
On Fri, Aug 19, 2011 at 12:09:50PM +0900, Magnus Damm wrote: > On Fri, Aug 19, 2011 at 10:10 AM, Simon Horman wrote: > > Provide separate interrupt handlers which may be used by platforms where > > SDHI has three interrupt sources. > > > > This patch also removes the commented-out handling of CRC

Re: [PATCH] mmc: sdhi: initialise mmc_data->flags before use

2011-08-18 Thread Simon Horman
On Fri, Aug 19, 2011 at 12:04:06PM +0900, Magnus Damm wrote: > On Fri, Aug 19, 2011 at 10:07 AM, Simon Horman wrote: > > This corrects a logic error that I introduced in > > "mmc: sdhi: Add write16_hook" > > > > Reported-by: Magnus Damm > > Signed-off-by: Simon Horman > > --- > >  drivers/mmc/ho

Re: [PATCH 2/4] mmc: tmio: Provide separate interrupt handlers

2011-08-18 Thread Magnus Damm
On Fri, Aug 19, 2011 at 10:10 AM, Simon Horman wrote: > Provide separate interrupt handlers which may be used by platforms where > SDHI has three interrupt sources. > > This patch also removes the commented-out handling of CRC and other errors. > > Cc: Guennadi Liakhovetski > Cc: Magnus Damm > S

Re: [PATCH] mmc: sdhi: initialise mmc_data->flags before use

2011-08-18 Thread Magnus Damm
On Fri, Aug 19, 2011 at 10:07 AM, Simon Horman wrote: > This corrects a logic error that I introduced in > "mmc: sdhi: Add write16_hook" > > Reported-by: Magnus Damm > Signed-off-by: Simon Horman > --- >  drivers/mmc/host/sh_mobile_sdhi.c |    4 ++-- >  1 files changed, 2 insertions(+), 2 deleti

[PATCH 3/4] mmc: sdhi: Make use of per-source irq handlers

2011-08-18 Thread Simon Horman
Make use of per-source irq handles if the platform (data) has multiple irq sources. Also, as suggested by Guennadi Liakhovetski, add and use defines the index or irqs in platform data. Cc: Guennadi Liakhovetski Cc: Magnus Damm Signed-off-by: Simon Horman --- v6 * As discussed with Guennadi L

[PATCH 4/4] ARM: shmobile: ag5evm, ap4: Make use of irq index enum

2011-08-18 Thread Simon Horman
This is intended to make it easier to correctly order IRQs. As suggested by Guennadi Liakhovetski. Cc: Guennadi Liakhovetski Cc: Magnus Damm Cc: Paul Mundt Signed-off-by: Simon Horman --- Depends on "mmc: sdhi: Make use of per-source irq handlers" v4 * Update for corrected ordering of SH_M

[PATCH 0/4 v6] mmc: tmio, sdhi: provide multiple irq handlers

2011-08-18 Thread Simon Horman
The SDHI driver already supports making use of up to three interrupt sources. This series breaks up the existing interrupt handler into three handlers, one for card access, one for card detect interrupts, and one for SDIO interrupts. A cover-all handler, which makes use of these new broken-out ha

[PATCH 1/4] mmc: tmio: Cache interrupt masks

2011-08-18 Thread Simon Horman
This avoids the need to look up the masks each time an interrupt is handled. As suggested by Guennadi. Cc: Guennadi Liakhovetski Cc: Magnus Damm Signed-off-by: Simon Horman --- * SDCARD portion tested on AP4/Mackerel * SDIO portion untested v3 * As suggested by Guennadi Liakhovetski - Onl

[PATCH 2/4] mmc: tmio: Provide separate interrupt handlers

2011-08-18 Thread Simon Horman
Provide separate interrupt handlers which may be used by platforms where SDHI has three interrupt sources. This patch also removes the commented-out handling of CRC and other errors. Cc: Guennadi Liakhovetski Cc: Magnus Damm Signed-off-by: Simon Horman --- * SDCARD portion tested on AP4/Mack

[PATCH] mmc: sdhi: initialise mmc_data->flags before use

2011-08-18 Thread Simon Horman
This corrects a logic error that I introduced in "mmc: sdhi: Add write16_hook" Reported-by: Magnus Damm Signed-off-by: Simon Horman --- drivers/mmc/host/sh_mobile_sdhi.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/

Tools to read eMMC registers?

2011-08-18 Thread J Freyensee
Are there any tools, software (free or proprietary but preferably Linux-based) or hardware probes, that can read eMMC registers? If so, would you be able to provide a link to it? Thanks, I appreciate it! -- J (James/Jay) Freyensee Storage Technology Group Intel Corporation -- To unsubscribe

[PATCH v2 2/3] mmc: prevent aggressive clock gating to race with ios updates

2011-08-18 Thread Mika Westerberg
We have seen at least two different races when clock gating kicks in in a middle of ios structure update. First one happens when ios->clock is changed outside of aggressive clock gating framework, for example via mmc_set_clock(). The race might happen when we run following code: mmc_set_ios():

[PATCH v2 0/3] mmc: fixes for aggressive clock gating framework

2011-08-18 Thread Mika Westerberg
Hi, This is an updated series which should fix few races seen when aggressive clock gating is active. The first patch actually just renames the gating functions to make their use-cases a bit more clear. Second and third patches fix the races itself. Previous version of the series can be seen her

[PATCH v2 3/3] mmc: use non-reentrant workqueue for clock gating

2011-08-18 Thread Mika Westerberg
The default multithread workqueue can cause the same work to be executed concurrently on a different CPUs. This isn't really suitable for clock gating as it might already gated the clock and gating it twice results both host->clk_old and host->ios.clock to be set to 0. To prevent this from happeni

[PATCH v2 1/3] mmc: rename mmc_host_clk_{ungate|gate} to mmc_host_clk_{hold|release}

2011-08-18 Thread Mika Westerberg
As per suggestion by Linus Walleij: > If you think the names of the functions are confusing then > you may rename them, say like this: > > mmc_host_clk_ungate() -> mmc_host_clk_hold() > mmc_host_clk_gate() -> mmc_host_clk_release() > > Which

Re: [PATCH 1/2] mmc: add functions to enable/disable aggressive clock gating

2011-08-18 Thread Mika Westerberg
On Thu, Aug 18, 2011 at 02:11:23PM +0300, Andy Shevchenko wrote: > Mika, do the patches to check host->clock in > (mmc|sdhci)_set_data_timeout() become useless after? > If so, probably you could revert them as well. IMHO these functions should work also when the clock is gated, so I suggest that

Re: [PATCH 1/2] mmc: add functions to enable/disable aggressive clock gating

2011-08-18 Thread Andy Shevchenko
On Thu, Aug 18, 2011 at 1:34 PM, Mika Westerberg wrote: > I'll prepare a new series which uses mmc_host_clk_{ungate|gate}(). Mika, do the patches to check host->clock in (mmc|sdhci)_set_data_timeout() become useless after? If so, probably you could revert them as well. -- With Best Regards, Andy

Re: [PATCH 1/2] mmc: add functions to enable/disable aggressive clock gating

2011-08-18 Thread Mika Westerberg
On Wed, Aug 17, 2011 at 03:19:14PM +0300, Mika Westerberg wrote: > On Wed, Aug 17, 2011 at 09:51:31AM +0200, Linus Walleij wrote: > > > > I would suggest that in all patches using these functions, try > > to replace: > > > > mmc_host_clk_disable() -> mmc_host_clk_ungate() > > mmc_host_clk_enable(