Re: [PATCH] mmc, sh: use a consistent pr_ prefix

2010-11-10 Thread Guennadi Liakhovetski
On Wed, 10 Nov 2010, Simon Horman wrote: > On Wed, Nov 10, 2010 at 08:00:49PM +0900, Paul Mundt wrote: > > On Wed, Nov 10, 2010 at 07:27:44PM +0900, Simon Horman wrote: > > > Use pr_fmt to set the prefix for pr_ messages. > > > I believe this method is common in other > > > source files in the ker

Re: [PATCH (1/5)] mmc: sdhci-pltfm calls the sdhci_alloc_host with pdev->dev

2010-11-10 Thread Wolfram Sang
> > Removing the dev.parent-branch will break some PCI-based solutions. > Hmm, I suspected this :-(. Unfortunately I need to not pass the parent > for the problem described in the patch. > How to proceed? Do I have to re-introduce the sdhci-stm driver? The current mainline code does not work for y

[PATCH 6/6] ARM: mach-shmobile: enable MMCIF DMA on ap4evb

2010-11-10 Thread Guennadi Liakhovetski
Have to add DMA slave configuration to enable DMA for the sh7372 MMCIF controller. Signed-off-by: Guennadi Liakhovetski --- arch/arm/mach-shmobile/board-ap4evb.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/m

[PATCH 5/6] mmc: sh_mmcif: add DMA support

2010-11-10 Thread Guennadi Liakhovetski
The MMCIF controller on sh-mobile platforms can use the DMA controller for data transfers. Interface to the SH dmaengine driver to enable DMA. Signed-off-by: Guennadi Liakhovetski --- ...This has been a nice exception: just one missing piece of the datasheet puzzle had to be guessed and it work

[PATCH 4/6] dma: shdma: increase the number of DMA descriptors and add a MODULE_ALIAS()

2010-11-10 Thread Guennadi Liakhovetski
Currently shdma only works, if it manages to allocate DMA descriptors for all sg elements during the prepare stage. Allocation is carried out from a static pool of 32 DMA descriptors. This is not enough for, e.g., MMC, where up to 61 sg elements can be sent at once. Ideally we should be able to reu

[PATCH 3/6] mmc: sh_mmcif: cosmetic clean up

2010-11-10 Thread Guennadi Liakhovetski
Replace pr_* with respective dev_*, sort headers alphabetically, remove an unused struct member, superfluous variable initialisations and type-casts. Signed-off-by: Guennadi Liakhovetski --- drivers/mmc/host/sh_mmcif.c | 63 -- 1 files changed, 30 insert

[PATCH 2/6] ARM: mach-shmobile: add DMA defines for MMCIF on sh7372

2010-11-10 Thread Guennadi Liakhovetski
Add DMA slave IDs and slave definitions for MMCIF on sh7372. Signed-off-by: Guennadi Liakhovetski --- arch/arm/mach-shmobile/include/mach/sh7372.h |2 ++ arch/arm/mach-shmobile/setup-sh7372.c| 10 ++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/arch/arm/m

[PATCH 1/6] mmc: sh_mmcif: switch to completion, fix flags

2010-11-10 Thread Guennadi Liakhovetski
In sh_mmcif.c an event is used as a completion, switch over. When a wait_for_completion*_timeout() returns, it suffices to check the remaining time, setting an additional flag before waking up the waiting task only reduces the race window, but does not eliminate it. This patch switches the driver t

[PATCH 0/6] MMC: DMA for SH MMCIF

2010-11-10 Thread Guennadi Liakhovetski
This patch series slightly cleans up the sh_mmcif MMC driver and adds a DMA capability to it. One of the patches is not directly related, but is required for a proper DMA functionality. Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-tech

Re: [PATCH 2/5] mmc: do not clear the host->pm_flags when suspend

2010-11-10 Thread Peppe CAVALLARO
Hi Ohad, On 11/10/2010 9:28 PM, Ohad Ben-Cohen wrote: > > Hi Giuseppe, > > On Wed, Nov 10, 2010 at 5:28 PM, Giuseppe CAVALLARO > wrote: > > HC driver will be able to use the pm_flags to > > undestand if the system can be woken-up by the driver. > > So the mmc_suspend_host hasn't to reset this fie

Re: [PATCH (1/5)] mmc: sdhci-pltfm calls the sdhci_alloc_host with pdev->dev

2010-11-10 Thread Peppe CAVALLARO
Hi Wolfram On 11/10/2010 4:43 PM, Wolfram Sang wrote: > Hi, > > thanks for the work in general, just... > >> -if (pdev->dev.parent) >> -host = sdhci_alloc_host(pdev->dev.parent, 0); >> -else >> -host = sdhci_alloc_host(&pdev->dev, 0); >> - >> +host = sdhci_alloc

Re: A MMC card transfer issue

2010-11-10 Thread Tomoya MORINAGA
Hi Park, Though I tried to patch yours to "sdhci.c" of linux-2.6.36, but it seems your patch has already patched in linux-2.6.36. Using this linux, MMC card is not recognized. Inserting the MMC card, I saw the following erro message. [ 11.035441] sdhci: Secure Digital Host Controller Interfac

Re: [PATCH 1/1]sdhci-pxa: support tune_timming for various cards

2010-11-10 Thread Philip Rakity
We should rename sdhci-pxa.c to sdhci-mmp2.c and adjust Kconfig and the makefile accordingly since it is clear code is clearly processor dependent or The additional changes to support the pxa family of chips should be posted to the web. On Nov 10, 2010, at 6:08 PM, zhangfei gao wrote: > On

Re: [PATCH 1/1]sdhci-pxa: support tune_timming for various cards

2010-11-10 Thread zhangfei gao
On Wed, Nov 10, 2010 at 4:58 PM, Philip Rakity wrote: > > > >> +#define SD_CLOCK_AND_BURST_SIZE_SETUP          0x10A > > This offset is only for MMP2.  On other pxa processors use a  different > offset.  sdhci-pxa.c needs changing to support other pxa soc chips. The first stage is only consider

Re: [PATCH 2/5] mmc: do not clear the host->pm_flags when suspend

2010-11-10 Thread Ohad Ben-Cohen
Hi Giuseppe, On Wed, Nov 10, 2010 at 5:28 PM, Giuseppe CAVALLARO wrote: > HC driver will be able to use the pm_flags to > undestand if the system can be woken-up by the driver. > So the mmc_suspend_host hasn't to reset this field > in the host structure. > > Signed-off-by: Giuseppe Cavallaro > -

RE: [RFC] mmc: agressive clocking framework v8 [h/w approach]

2010-11-10 Thread Philip Rakity
The following patch is on top of v8 to support hardware clock gating. I do not have hardware to test this code until next week. Comments welcome. Will revise once it is tested. Philip diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 8bf542c..5339fa8 100644 --- a/driver

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/5)] mmc: sdhci-pltfm calls the sdhci_alloc_host with pdev->dev

2010-11-10 Thread Wolfram Sang
Hi, thanks for the work in general, just... > - if (pdev->dev.parent) > - host = sdhci_alloc_host(pdev->dev.parent, 0); > - else > - host = sdhci_alloc_host(&pdev->dev, 0); > - > + host = sdhci_alloc_host(&pdev->dev, 0); > if (IS_ERR(host)) { >

[PATCH 4/5] mmc: sdhci-pci invokes the sdhci_enable_irq_wakeups with SDHCI_WAKE_ON_INT

2010-11-10 Thread Giuseppe CAVALLARO
Signed-off-by: Giuseppe Cavallaro --- drivers/mmc/host/sdhci-pci.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 59f3de5..8634fb1 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pc

[PATCH 5/5] mmc: sdhci-pltfm can wake up.

2010-11-10 Thread Giuseppe CAVALLARO
Signed-off-by: Giuseppe Cavallaro --- drivers/mmc/host/sdhci-pltfm.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index 4e881a5..6ea32e1 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/

[PATCH 3/5] mmc_sdhci: improve the wake-up support

2010-11-10 Thread Giuseppe CAVALLARO
This patch reworks the wake-up support in the sdhci driver. It is now able to wake-up the system on: Card interrupts, Card insertion and Card removal events. This has been tested on ST STB where can make sense to wake-up the box as soon as a card is inserted. Signed-off-by: Giuseppe Cavallaro ---

[RFC] improve the SDHCI wakeup support.

2010-11-10 Thread Giuseppe CAVALLARO
Hello. The following patches, currently built against an ST Kernel "2.6.32", show how to improve the wakeup support in the SDHCI device driver. Note: I'm going to rework them, for example, against the mmc-next after performing the review process and, obviously, if you think that they can be actua

[PATCH (1/5)] mmc: sdhci-pltfm calls the sdhci_alloc_host with pdev->dev

2010-11-10 Thread Giuseppe CAVALLARO
ST targets use the sdhci-pltfm driver but there are some problems when re-insert the driver on our platforms. Within sdhci-pltfm d.d. the pdata->init invokes own platform function to claim some resource (based on devres): see the example code below: static int mmc_pad_resources(struct sdhci_host *

[PATCH 2/5] mmc: do not clear the host->pm_flags when suspend

2010-11-10 Thread Giuseppe CAVALLARO
HC driver will be able to use the pm_flags to undestand if the system can be woken-up by the driver. So the mmc_suspend_host hasn't to reset this field in the host structure. Signed-off-by: Giuseppe Cavallaro --- drivers/mmc/core/core.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-)

[RFC] improve the SDHCI wakeup support.

2010-11-10 Thread Giuseppe CAVALLARO
Hello. The following patches, currently built against an ST Kernel "2.6.32", show how to improve the wakeup support in the SDHCI device driver. Note: I'm going to rework them, for example, against the mmc-next after performing the review process and, obviously, if you think that they can be actua

Re: [PATCH] mmc, sh: use a consistent pr_ prefix

2010-11-10 Thread Simon Horman
On Wed, Nov 10, 2010 at 08:00:49PM +0900, Paul Mundt wrote: > On Wed, Nov 10, 2010 at 07:27:44PM +0900, Simon Horman wrote: > > Use pr_fmt to set the prefix for pr_ messages. > > I believe this method is common in other > > source files in the kernel tree. > > > pr_fmt() is ok when you have no bet

Re: [PATCH v2] mmc, sh: Move constants to sh_mmcif.h

2010-11-10 Thread Simon Horman
On Wed, Nov 10, 2010 at 06:32:23PM +0900, Paul Mundt wrote: > On Tue, Nov 09, 2010 at 05:47:02PM +0900, Simon Horman wrote: > > This moves some constants from sh_mmcif.c to sh_mmcif.h > > so that they can be used in sh_mmcif_boot_init(). > > > > It also alters the definition of SOFT_RST_OFF from (

[PATCH] mmc, sh: use a consistent pr_ prefix

2010-11-10 Thread Simon Horman
Use pr_fmt to set the prefix for pr_ messages. I believe this method is common in other source files in the kernel tree. Cc: Yusuke Goda Signed-off-by: Simon Horman --- drivers/mmc/host/sh_mmcif.c | 52 +- 1 files changed, 26 insertions(+), 26 deletions

Re: [PATCH v2] mmc, sh: Move constants to sh_mmcif.h

2010-11-10 Thread Paul Mundt
On Tue, Nov 09, 2010 at 05:47:02PM +0900, Simon Horman wrote: > This moves some constants from sh_mmcif.c to sh_mmcif.h > so that they can be used in sh_mmcif_boot_init(). > > It also alters the definition of SOFT_RST_OFF from (0 << 31) to > ~SOFT_RST_ON (= ~(1 << 31)). The former seems bogus. Th

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) {

[PATCH 1/1]sdhci-pxa: support tune_timming for various cards

2010-11-10 Thread Philip Rakity
> +#define SD_CLOCK_AND_BURST_SIZE_SETUP 0x10A This offset is only for MMP2. On other pxa processors use a different offset. sdhci-pxa.c needs changing to support other pxa soc chips. The value only needs setting at initialization time or sdhci reset (RESET_ALL) -- To unsubscrib

Re: [PATCH] mmc, sh: use a consistent pr_ prefix

2010-11-10 Thread Paul Mundt
On Wed, Nov 10, 2010 at 07:27:44PM +0900, Simon Horman wrote: > Use pr_fmt to set the prefix for pr_ messages. > I believe this method is common in other > source files in the kernel tree. > pr_fmt() is ok when you have no better options, but in this case you have the struct device working for you