Re: [PATCH] mmc: sdhci: don't read cd-gpio while holding spinlock

2014-03-21 Thread Andrew Bresticker
On Thu, Mar 20, 2014 at 11:45 PM, Adrian Hunter wrote: > On 20.03.2014 20:47, Andrew Bresticker wrote: >> mmc_request() reads the cd-gpio via mmc_gpio_get_cd(), which can sleep, >> while holding host->lock. This may result in the following BUG: >> >> BUG: spinlock wrong CPU on CPU#2, kworker/u8

Re: [PATCH 4/9] mmc: omap_hsmmc: use devm_request_mem_region

2014-03-21 Thread Felipe Balbi
On Fri, Mar 21, 2014 at 09:57:52PM +0530, Balaji T K wrote: > On Friday 21 March 2014 09:48 PM, Felipe Balbi wrote: > >On Fri, Mar 21, 2014 at 09:47:33PM +0530, Balaji T K wrote: > >>With devm_request_mem_region conversion release_mem_region can be > >>removed in clean up path > >> > >>Signed-off-b

Re: [PATCH 4/9] mmc: omap_hsmmc: use devm_request_mem_region

2014-03-21 Thread Balaji T K
On Friday 21 March 2014 09:48 PM, Felipe Balbi wrote: On Fri, Mar 21, 2014 at 09:47:33PM +0530, Balaji T K wrote: With devm_request_mem_region conversion release_mem_region can be removed in clean up path Signed-off-by: Balaji T K --- drivers/mmc/host/omap_hsmmc.c | 11 ++- 1 file

Re: [PATCH 4/9] mmc: omap_hsmmc: use devm_request_mem_region

2014-03-21 Thread Felipe Balbi
On Fri, Mar 21, 2014 at 09:47:33PM +0530, Balaji T K wrote: > With devm_request_mem_region conversion release_mem_region can be > removed in clean up path > > Signed-off-by: Balaji T K > --- > drivers/mmc/host/omap_hsmmc.c | 11 ++- > 1 files changed, 2 insertions(+), 9 deletions(-) >

[PATCH 7/9] mmc: omap_hsmmc: Pin remux workaround to support SDIO interrupt on AM335x

2014-03-21 Thread Balaji T K
From: Andreas Fenkart The am335x can't detect pending cirq in PM runtime suspend. This patch reconfigures dat1 as a GPIO before going to suspend. SDIO interrupts are detected with the GPIO, the GPIO will only wake the module from suspend, SDIO irq detection will still happen through the IP block.

[PATCH 9/9] mmc: omap_hsmmc: enable wakeup event for sdio

2014-03-21 Thread Balaji T K
To detect sdio irqs properly without spurious events, OMAP4 needs IWE in CON and CTPL, CLKEXTFREE in HCTL to be set Signed-off-by: Balaji T K --- drivers/mmc/host/omap_hsmmc.c | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/dr

[PATCH 8/9] mmc: omap_hsmmc: Extend debugfs for SDIO IRQ, GPIO and pinmux

2014-03-21 Thread Balaji T K
From: Andreas Fenkart Add SDIO IRQ entries to debugfs entry. Note that PSTATE shows current state of data lines, incl. SDIO IRQ pending Signed-off-by: Andreas Fenkart Signed-off-by: Tony Lindgren Signed-off-by: Balaji T K --- drivers/mmc/host/omap_hsmmc.c | 23 --- 1 fi

[PATCH 6/9] mmc: omap_hsmmc: Enable SDIO interrupt

2014-03-21 Thread Balaji T K
From: Andreas Fenkart There have been various patches floating around for enabling the SDIO IRQ for hsmmc, but none of them ever got merged. Probably the reason for not merging the SDIO interrupt patches has been the lack of wake-up path for SDIO on some omaps that has also needed remuxing the S

[PATCH 3/9] mmc: omap_hsmmc: use devm_request_threaded_irq

2014-03-21 Thread Balaji T K
With devm_request_threaded_irq conversion free_irq can be removed in clean up path Signed-off-by: Balaji T K --- drivers/mmc/host/omap_hsmmc.c |9 +++-- 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 4a3b

[PATCH 5/9] mmc: omap_hsmmc: use devm_ioremap

2014-03-21 Thread Balaji T K
With devm_ioremap conversion iounmap can be removed in clean up path Signed-off-by: Balaji T K --- drivers/mmc/host/omap_hsmmc.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 9952673..38a75bc 100644

[PATCH 4/9] mmc: omap_hsmmc: use devm_request_mem_region

2014-03-21 Thread Balaji T K
With devm_request_mem_region conversion release_mem_region can be removed in clean up path Signed-off-by: Balaji T K --- drivers/mmc/host/omap_hsmmc.c | 11 ++- 1 files changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c

[PATCH 1/9] mmc: omap_hsmmc: use devm_clk_get

2014-03-21 Thread Balaji T K
With devm_clk_get conversion clk_put can be removed in clean up path Signed-off-by: Balaji T K --- drivers/mmc/host/omap_hsmmc.c | 15 --- 1 files changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index e91ee21..57

[PATCH 2/9] mmc: omap_hsmmc: use devm_request_irq

2014-03-21 Thread Balaji T K
With devm_request_irq conversion free_irq can be removed in clean up path Signed-off-by: Balaji T K --- drivers/mmc/host/omap_hsmmc.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 578e983..4a3bb4

[PATCH 0/9] mmc: omap_hsmmc: convert to use devm_* and enable sdio irq

2014-03-21 Thread Balaji T K
Andreas Fenkart (3): mmc: omap_hsmmc: Enable SDIO interrupt mmc: omap_hsmmc: Pin remux workaround to support SDIO interrupt on AM335x mmc: omap_hsmmc: Extend debugfs for SDIO IRQ, GPIO and pinmux Balaji T K (6): mmc: omap_hsmmc: use devm_clk_get mmc: omap_hsmmc: use devm_request_irq

Re: [PATCH v9 resend 1/3] mmc: omap_hsmmc: Enable SDIO interrupt

2014-03-21 Thread Balaji T K
On Friday 21 March 2014 05:50 PM, Andreas Fenkart wrote: Thanks Andreas for the patch series I rebased against latest mmc-next, made few changes to your patch. I have hosted your series along with devm cleanups on a branch[1] for testing [1] git://git.ti.com/~balajitk/ti-linux-kernel/omap-hsmmc.

[PATCH 2/7] mmc: dw_mmc: exynos: don't use if clock isn't available

2014-03-21 Thread Seungwon Jeon
Adds checking whether the clock is valid. Signed-off-by: Seungwon Jeon --- drivers/mmc/host/dw_mmc-exynos.c | 14 +++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c index a67e784..89aa019 100644 ---

[PATCH 5/7] mmc: dw_mmc: exynos: support eMMC's HS400 mode

2014-03-21 Thread Seungwon Jeon
Implements HS400 support for Exynos's host driver. And this patch includes some updates as new mode is added. Signed-off-by: Seungwon Jeon --- drivers/mmc/host/dw_mmc-exynos.c | 140 +++--- drivers/mmc/host/dw_mmc-exynos.h | 14 drivers/mmc/host/dw_mmc.c

[PATCH 6/7] ARM: dts: drop dw-mshc-ciu-div property from Exynos

2014-03-21 Thread Seungwon Jeon
As dw-mshc-ciu-div is strongly close to timing property, it is merged with each timing property. Signed-off-by: Seungwon Jeon --- .../devicetree/bindings/mmc/exynos-dw-mshc.txt | 12 +--- arch/arm/boot/dts/exynos4412-odroidx.dts |5 ++--- arch/arm/boot/dts/exynos4412-

[PATCH 7/7] ARM: dts: add HS400 support for Exynos5420

2014-03-21 Thread Seungwon Jeon
HS400 timing value set is added for SMDK5420. And GPIO line for RCLK should be pull-down state. Signed-off-by: Seungwon Jeon --- .../devicetree/bindings/mmc/exynos-dw-mshc.txt |6 ++ arch/arm/boot/dts/exynos5420-pinctrl.dtsi |7 +++ arch/arm/boot/dts/exynos5420-smdk5

[PATCH 4/7] mmc: dw_mmc: exynos: incorporate ciu_div into timing property

2014-03-21 Thread Seungwon Jeon
ciu_div may not be common value for all speed mode. So, it needs to be attached to CLKSEL timing. Signed-off-by: Seungwon Jeon --- drivers/mmc/host/dw_mmc-exynos.c | 75 ++ drivers/mmc/host/dw_mmc-exynos.h |1 + 2 files changed, 53 insertions(+), 23 dele

[PATCH 3/7] mmc: dw_mmc: exynos: move definitions to header file

2014-03-21 Thread Seungwon Jeon
Moves some parts related to definition to header file Signed-off-by: Seungwon Jeon --- drivers/mmc/host/dw_mmc-exynos.c | 46 --- drivers/mmc/host/dw_mmc-exynos.h | 55 ++ 2 files changed, 61 insertions(+), 40 deletions(-) crea

[PATCH 1/7] mmc: dw_mmc: fix the max_blk_count in IDMAC

2014-03-21 Thread Seungwon Jeon
Even though 1MB is reserved for descriptor table in IDMAC, the dw_mmc host driver is allowed to receive only maximum 128KB block length in one request. This is caused by setting improper max_blk_count. It needs to be e adjusted so that descriptor table is used fully. It is found that the performanc

[PATCH 0/7] mmc: dw_mmc: update host driver including HS400 support

2014-03-21 Thread Seungwon Jeon
This patch-set includes several driver's updates. Specially, HS400 mode is enabled for eMMC5.0 spec. Seungwon Jeon (7): mmc: dw_mmc: fix the max_blk_count in IDMAC mmc: dw_mmc: exynos: don't use if clock isn't available mmc: dw_mmc: exynos: move definitions to header file mmc: dw_mmc: exyn

Re: [PATCH v3 4/5] mmc: rework selection of bus speed mode

2014-03-21 Thread Ulf Hansson
On 14 March 2014 13:16, Seungwon Jeon wrote: > Current implementation for bus speed mode selection is too > complicated. This patch is to simplify the codes and remove > some duplicate parts. Really appreciate you taking on this task! > > The following changes are including: > * Adds functions f

Backporting eMMC v5 support to Linux 3.4

2014-03-21 Thread Hans-Christian Egtvedt
Hello, I have a device, which has received an eMMC v5 device, and thus the 3.4 kernel the vendor provides does not identify the flash chip anymore. Looking at the kernel history, it seems very easy to backport support for it. Would it be as easy as cherry picking commit 6636bad8? mmc: core: Upd

[PATCH v9 resend 0/3] mmc: omap_hsmmc: Enable SDIO IRQ.

2014-03-21 Thread Andreas Fenkart
Resend of v8, with Chris Ball on cc and following changes. v9 - extended comment about why wake-irq is needed - drop double '(' ')' around card_detect_irq - drop final '.' in in subject line of patch v8 - rebased on top of Tony Lindgren changes - improved changelog describing the earlier work

[PATCH v9 resend 3/3] mmc: omap_hsmmc: Extend debugfs for SDIO IRQ, GPIO and pinmux

2014-03-21 Thread Andreas Fenkart
Add SDIO IRQ entries to debugfs entry. Note that PSTATE shows current state of data lines, incl. SDIO IRQ pending Signed-off-by: Andreas Fenkart Signed-off-by: Tony Lindgren diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 2307c78..681bf68 100644 --- a/drivers/mm

[PATCH v9 resend 1/3] mmc: omap_hsmmc: Enable SDIO interrupt

2014-03-21 Thread Andreas Fenkart
There have been various patches floating around for enabling the SDIO IRQ for hsmmc, but none of them ever got merged. Probably the reason for not merging the SDIO interrupt patches has been the lack of wake-up path for SDIO on some omaps that has also needed remuxing the SDIO DAT1 line to a GPIO

[PATCH v9 resend 2/3] mmc: omap_hsmmc: Pin remux workaround to support SDIO interrupt on AM335x

2014-03-21 Thread Andreas Fenkart
The am335x can't detect pending cirq in PM runtime suspend. This patch reconfigures dat1 as a GPIO before going to suspend. SDIO interrupts are detected with the GPIO, the GPIO will only wake the module from suspend, SDIO irq detection will still happen through the IP block. Idea of remuxing the p

[PATCH] mmc: dw_mmc: Support setting the ciu-div on exynos

2014-03-21 Thread Yuvaraj Kumar C D
From: Doug Anderson The existing dw_mmc code for exynos5250/exynos5420 read the ciu-div property from the device tree and used it in calculations, but didn't actually ever set it in hardware. That means that if the hardware value set by the firmware didn't match what was in the device tree that

[PATCH] mmc: core: add DT bindings for eMMC HS400 1.8/1.2V

2014-03-21 Thread Seungwon Jeon
Provide the option to configure these speed modes per host, for those host driver's that can't distinguish this in runtime. Specially, if host can support HS400, it means that host can also support HS200. Signed-off-by: Seungwon Jeon --- Note: Depending on [PATCH v3 5/5] mmc: add support