[PATCH 2b/3] mmc: omap_hsmmc: use slot-gpio library for gpio support.

2014-12-19 Thread NeilBrown
Using the common code removes some code duplication, and makes it easier to switch to using mmc_of_parse() which will remove more duplication. This uses the new mmc_gpio_request_cd_isr to provide a non-standard interrupt service routine for card-detect interrupts. Signed-off-by: NeilBrown --- d

[PATCH 2a/3] mmc: core: Allow host driver to provide isr for card-detect interrupts.

2014-12-19 Thread NeilBrown
One of the reasons omap_hsmmc doesn't use the slot-gpio library is that it has some non-standard functionality in the card-detect interrupt service routine. To make it possible for omap_hsmmc (and maybe others) to be converted to use slot-gpio, add 'mmc_gpio_request_cd_isr' which provide an altern

Re: [PATCH] mmc: dt: Add property for broken hs200 quirk

2014-12-19 Thread Bjorn Andersson
On Fri, Dec 19, 2014 at 3:38 AM, Ulf Hansson wrote: > On 12 December 2014 at 20:28, Bjorn Andersson > wrote: > > Some more explanation to why this needed would be good. > Because (according to the git log) some of the memories that we mounted in Xperia Z1 does not support HS200 even though they

Re: [PATCH v5 0/4] Fixes for SDIO interrupts for dw_mmc

2014-12-19 Thread Doug Anderson
Ulf, On Fri, Dec 19, 2014 at 2:17 AM, Ulf Hansson wrote: > On 3 December 2014 at 00:42, Doug Anderson wrote: >> Bing Zhao at Marvell found a problem with dw_mmc where interrupts >> weren't firing sometimes. He tracked it down to a read-modify-write >> problem with the INTMASK. These patches fi

Re: [PATCH 2/3] mmc: dw_mmc: Generic MMC tuning with the clock phase framework

2014-12-19 Thread Stephen Boyd
On 12/18/2014 04:20 PM, Doug Anderson wrote: > Alex, > > On Thu, Dec 18, 2014 at 3:01 PM, Alexandru M Stan wrote: >> + blk_test = kmalloc(blksz, GFP_KERNEL); >> + if (!blk_test) >> + return -ENOMEM; >> + >> + ranges = kmalloc(((NUM_PHASES / 2 + 1) * sizeof(ranges)),

Re: [RFC PATCH 00/13] mmc: host: Add facility to support re-tuning

2014-12-19 Thread Ulf Hansson
On 19 December 2014 at 15:07, Adrian Hunter wrote: > On 05/12/14 19:40, Adrian Hunter wrote: >> Hi >> >> Here are some patches to move re-tuning support out of >> sdhci and into the core, and add support for HS400 >> re-tuning. >> >> Currently sdhci does re-tuning transparently by >> calling sdhci

Re: [RFC PATCH 00/13] mmc: host: Add facility to support re-tuning

2014-12-19 Thread Adrian Hunter
On 05/12/14 19:40, Adrian Hunter wrote: > Hi > > Here are some patches to move re-tuning support out of > sdhci and into the core, and add support for HS400 > re-tuning. > > Currently sdhci does re-tuning transparently by > calling sdhci_execute_tuning() from its ->request() > function. > > The

Re: [PATCH V2 0/4] mmc: sdhci: Disable re-tuning for HS400

2014-12-19 Thread Adrian Hunter
On 05/12/14 19:25, Adrian Hunter wrote: > Hi > > Here is V2 of patches to disable re-tuning for HS400. > > As described in patch 4, re-tuning for HS400 has to be done > in HS200 mode, but there is no support for that, so re-tuning > needs to be disabled until support is added. > > Changes in V2:

Re: [PATCH 0/4] mmc: sunxi: General fixup (v2)

2014-12-19 Thread Ulf Hansson
On 16 December 2014 at 15:10, David Lanzendörfer wrote: > Hello > This patchset was inspired questions from 李想 of Allwinner and incorporates as > well suggestions from Hans related to spin locks. > For example have not all attributes of the shared host object been protected > by the spin lock, thi

Re: [PATCH 1/7] mmc: tmio: add .enable_dma

2014-12-19 Thread Ulf Hansson
On 15 December 2014 at 03:27, Kuninori Morimoto wrote: > From: Kuninori Morimoto > > Some controllers need DMA special register/setting. > This patch adds new .enable_dma callback for it. > > Signed-off-by: Kuninori Morimoto > --- > drivers/mmc/host/tmio_mmc_dma.c |3 +++ > include/linux/mf

Re: [PATCH] mmc: dt: Add property for broken hs200 quirk

2014-12-19 Thread Ulf Hansson
On 12 December 2014 at 20:28, Bjorn Andersson wrote: Some more explanation to why this needed would be good. > Signed-off-by: Bjorn Andersson > --- > Documentation/devicetree/bindings/mmc/mmc.txt | 2 ++ This file lists the generic mmc DT bindings, but you want to add a specific binding for sd

Re: [PATCH V2] mmc: mmci: Use pm_runtime_put_noidle() during ->probe()

2014-12-19 Thread Ulf Hansson
On 19 December 2014 at 11:59, Russell King - ARM Linux wrote: > On Fri, Dec 19, 2014 at 11:54:19AM +0100, Ulf Hansson wrote: >> Previously the pm_runtime_put() caused the device to be runtime PM >> suspended, but then immediately being resumed when we add the host. >> >> Prevent this unnecessary r

RE: [PATCH] mmc: sdhci: use pipeline mmc requests to improve performance

2014-12-19 Thread haibo.c...@freescale.com
Ping... > -Original Message- > From: Haibo Chen [mailto:haibo.c...@freescale.com] > Sent: Tuesday, December 09, 2014 5:04 PM > To: ch...@printf.net; ulf.hans...@linaro.org > Cc: linux-mmc@vger.kernel.org; donga...@gmail.com; Chen Haibo-B51421 > Subject: [PATCH] mmc: sdhci: use pipeline mm

Re: [PATCH 1/3] mmc: omap_hsmmc: remove prepare/complete system suspend support.

2014-12-19 Thread Ulf Hansson
On 11 December 2014 at 22:43, NeilBrown wrote: > The only function of these 'prepare' and 'complete' is to > disable the 'card detect' irq during suspend. > > The commit which added this, > commit a48ce884d5819d5df2cf1139ab3c43f8e9e419b3 > mmc: omap_hsmmc: Introduce omap_hsmmc_prepare/complete

Re: [PATCH 2/3] mmc: omap_hsmmc: use slot-gpio library for gpio support.

2014-12-19 Thread Ulf Hansson
On 11 December 2014 at 22:43, NeilBrown wrote: > Using the common code removes some code duplication, and > makes it easier to switch to using mmc_of_parse() which > will remove more duplication. > > As hsmmc has a slightly different interrupt service routine > for card-detect, enhance slot-gpio t

Re: [PATCH V2] mmc: mmci: Use pm_runtime_put_noidle() during ->probe()

2014-12-19 Thread Russell King - ARM Linux
On Fri, Dec 19, 2014 at 11:54:19AM +0100, Ulf Hansson wrote: > Previously the pm_runtime_put() caused the device to be runtime PM > suspended, but then immediately being resumed when we add the host. > > Prevent this unnecessary runtime PM suspend/resume cycle during > ->probe() by using the pm_ru

Re: [PATCH] mmc: toshsd: Fix unbalanced locking

2014-12-19 Thread Ulf Hansson
On 11 December 2014 at 04:10, Axel Lin wrote: > Fix returning IRQ_HANDLED with spin_lock held. > > Signed-off-by: Axel Lin Thanks! Queued for 3.20. Kind regards Uffe > --- > drivers/mmc/host/toshsd.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/

[PATCH V2] mmc: mmci: Use pm_runtime_put_noidle() during ->probe()

2014-12-19 Thread Ulf Hansson
Previously the pm_runtime_put() caused the device to be runtime PM suspended, but then immediately being resumed when we add the host. Prevent this unnecessary runtime PM suspend/resume cycle during ->probe() by using the pm_runtime_put_noidle() variant instead. Signed-off-by: Ulf Hansson --- C

Re: [PATCH -next] mmc: toshsd: use module_pci_driver to simplify the code

2014-12-19 Thread Ulf Hansson
On 9 December 2014 at 02:08, wrote: > From: Wei Yongjun > > Use the module_pci_driver() macro to make the code simpler > by eliminating module_init and module_exit calls. > > Signed-off-by: Wei Yongjun Thanks! Queued for 3.20. Kind regards Uffe > --- > drivers/mmc/host/toshsd.c | 13 +--

Re: [PATCH] mmc: sdhci: Fix FSL ESDHC reset handling quirk

2014-12-19 Thread Ulf Hansson
On 9 December 2014 at 09:40, Alessio Igor Bogani wrote: > The commit 0718e59ae259 ("mmc: sdhci: move FSL ESDHC reset handling quirk into > esdhc code") states that Freescale esdhc is the only controller which needs > the interrupt registers restored after a reset. So it moves > SDHCI_QUIRK_RESTORE

Re: [PATCH v4 0/6] mmc: rtsx: add support for sdio card

2014-12-19 Thread Ulf Hansson
On 5 December 2014 at 06:54, wrote: > From: Micky Ching > > v4: > split patch in more detailed patches. no code changes diff v3. > > v3: > rtsx_pci_sdmmc.c: > - dump_reg_range > - remove unused pointer check > - fix start index > v2: > rtsx_pci.h: > - remove unused rtsx

Re: [PATCH] mmc: mmci: Use pm_runtime_put_noidle() during ->probe()

2014-12-19 Thread Russell King - ARM Linux
On Fri, Dec 19, 2014 at 10:50:22AM +0100, Ulf Hansson wrote: > Previously the pm_runtime_put() caused the device to be runtime PM > suspended, but then immediately being resumed when we add the host. > > Prevent this unnecessary runtime PM suspend/resume cycle during > ->probe() by using the pm_ru

Re: [PATCH v2] mmc: sdhci-sirf: add sirf tuning function (cmd 19)

2014-12-19 Thread Ulf Hansson
On 4 December 2014 at 13:09, Barry Song <21cn...@gmail.com> wrote: > From: Minda Chen > > Add manual tuning function in CSR atlas7 SoC. It is mainly used > for the UHS-I SD card working SDR50 SDR104 mode. > > The tuning principle can be seen in SD spec part1 v3.01 4.2.4.5 > (tuning command). > > S

Re: [PATCH v5 0/4] Fixes for SDIO interrupts for dw_mmc

2014-12-19 Thread Ulf Hansson
On 3 December 2014 at 00:42, Doug Anderson wrote: > Bing Zhao at Marvell found a problem with dw_mmc where interrupts > weren't firing sometimes. He tracked it down to a read-modify-write > problem with the INTMASK. These patches fix the problem. > > Note: I've picked up a > 1-year old series he

[PATCH] mmc: sdhci-pci: Remove redundant runtime PM idle callback

2014-12-19 Thread Ulf Hansson
Signed-off-by: Ulf Hansson --- drivers/mmc/host/sdhci-pci.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 0342775..2842066 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c @@

[PATCH] mmc: mmci: Use pm_runtime_put_noidle() during ->probe()

2014-12-19 Thread Ulf Hansson
Previously the pm_runtime_put() caused the device to be runtime PM suspended, but then immediately being resumed when we add the host. Prevent this unnecessary runtime PM suspend/resume cycle during ->probe() by using the pm_runtime_put_noidle() variant instead. Signed-off-by: Ulf Hansson --- d

[PATCH 2/2] mmc: sdhci-esdhc-imx: Fixup runtime PM conditions during ->probe()

2014-12-19 Thread Ulf Hansson
By configure runtime PM prior we enable the use of it, we close the gap for strange and unhandled conditions. Moreover it makes us rely on the driver core, after finalized ->probe(), to request an inactive device to become runtime PM idle/suspended, which earlier potentially could happen already at

[PATCH 1/2] mmc: sdhci-esdhc-imx: Fixup ->remove()

2014-12-19 Thread Ulf Hansson
Since sdhci_remove_host() access the device, we need to make sure it's runtime PM resumed. To handle clock gating properly in remove, we first have to make sure the clocks are ungated. To fix both these issues, by invoking pm_runtime_get_sync() early in ->remove() callback. Later once we disabled

RE: [RFC PATCH 0/5]mmc: Soft Command queue implementation for eMMC5.1 device

2014-12-19 Thread Dong, Chuanxiao
> -Original Message- > From: Ulf Hansson [mailto:ulf.hans...@linaro.org] > Sent: Friday, December 19, 2014 5:02 PM > To: Dong, Chuanxiao > Cc: linux-mmc > Subject: Re: [RFC PATCH 0/5]mmc: Soft Command queue implementation for > eMMC5.1 device > > On 19 December 2014 at 09:04, Chuanxiao D

Re: [RFC PATCH 0/5]mmc: Soft Command queue implementation for eMMC5.1 device

2014-12-19 Thread Ulf Hansson
On 19 December 2014 at 09:04, Chuanxiao Dong wrote: > Hello, > > Seems community already have some implementation for the eMMC5.1 device > command > queue feature, but that require the eMMC host controller to support CMDQ. In > my > platform, I don't have this kind of eMMC host controller but I

Re: [PATCH 2/3] mmc: dw_mmc: Generic MMC tuning with the clock phase framework

2014-12-19 Thread Ulf Hansson
On 19 December 2014 at 00:01, Alexandru M Stan wrote: > This algorithm will try 5 degree increments, since there's no way to tell > what resolution the underlying phase code uses. As an added bonus, doing many > tunings yields better results since some tests are run more than once(ex: if > the >

[RFC PATCH 5/5] mmc: sdhci: add SW CMDQ support for CHT SDHCI host

2014-12-19 Thread Chuanxiao Dong
Add the CMDQ support to SDHCI host interface and CHT SDHCI host interface Signed-off-by: Chuanxiao Dong --- drivers/mmc/host/sdhci.c | 121 +++-- include/linux/mmc/sdhci.h |1 + 2 files changed, 108 insertions(+), 14 deletions(-) diff --git a/drive

[RFC PATCH 4/5] mmc: core: add support for CMDQ feature in MMC Core stack

2014-12-19 Thread Chuanxiao Dong
CMDQ is a new feature introduced in eMMC5.1, which can be used for helpping improve the read performance. This patch add the support in mmc block layer and core layer. The CMDQ requires to send 4 CMDs and 5 interrupts, thus it has additional SW overhead. When CPU frequence is low, it may impact

[RFC PATCH 3/5] mmc: queue: change mqrq_cur and mqrq_pre to mq qdepth

2014-12-19 Thread Chuanxiao Dong
Use qdepth for mmc request fetching. Currently the request fetching mechanism indicate the qdepth is only 2. Signed-off-by: Chuanxiao Dong --- drivers/mmc/card/block.c | 45 +++ drivers/mmc/card/queue.c | 198 +- drivers/mmc/card/queue.h |

[RFC PATCH 1/5] mmc: replace sbc to precmd and add postcmd

2014-12-19 Thread Chuanxiao Dong
right now we use sbc to present CMD23. If we want sbc to present other cmds, then it is not suitable. So change the name to precmd which means a cmd that needs to be sent before a cmd. So it can sent any command without misunderstanding Signed-off-by: Chuanxiao Dong --- drivers/mmc/card/block.c

[RFC PATCH 2/5] mmc: host: add runtime PM for host class dev

2014-12-19 Thread Chuanxiao Dong
mmc host has a class device which is parent of the card device, also a children of the low level host device. Right now we have runtime pm for card device and low level host device, but nothing for this host class device. So it is impossible to connect the card runtime pm to low level host runtime

[RFC PATCH 0/5]mmc: Soft Command queue implementation for eMMC5.1 device

2014-12-19 Thread Chuanxiao Dong
Hello, Seems community already have some implementation for the eMMC5.1 device command queue feature, but that require the eMMC host controller to support CMDQ. In my platform, I don't have this kind of eMMC host controller but I have a Samsung eMMC5.1 device which can support the Command queue.