Re: [PATCH V2] mmc:sdhci: Wait longer for command with busy flags

2013-08-08 Thread Zhang Haijun
On 08/09/2013 02:39 PM, Barry Song wrote: 2013/8/9 Haijun Zhang : When command with busy flags send and also data busy end interrupt will be generate, the command will be finished when data transfer complete or data busy state end, Sometimes this will expend more than 10*Hz time to finish this c

Re: [PATCH V2] mmc:sdhci: Wait longer for command with busy flags

2013-08-08 Thread Barry Song
2013/8/9 Haijun Zhang : > When command with busy flags send and also data busy end interrupt > will be generate, the command will be finished when data transfer > complete or data busy state end, Sometimes this will expend more than > 10*Hz time to finish this command, so we should wait longer to d

[PATCH 1/3 V3] mmc:core: parse voltage from device-tree

2013-08-08 Thread Haijun Zhang
Add function to support get voltage from device-tree. If there are voltage-range specified in device-tree node, this function will parse it and return the available voltage mask. Signed-off-by: Haijun Zhang --- changes for V3: - Correct the type of return value. changes for v2: -

[PATCH 2/3 V2] mmc:sdhc: get voltage from sdhc host

2013-08-08 Thread Haijun Zhang
We use host->ocr_mask to hold the voltage get from device-tree node, In case host->ocr_mask was available, we use host->ocr_mask as the final available voltage can be used by MMC/SD/SDIO card. Signed-off-by: Haijun Zhang --- changes for v2: - Change the type of the value drivers/mmc/hos

[PATCH V2] mmc:of_spi: Update the code of getting voltage-ranges

2013-08-08 Thread Haijun Zhang
Using function mmc_of_parse_voltage() to get voltage-ranges. Signed-off-by: Haijun Zhang --- changes for V2: - changed the type of ocr_mask drivers/mmc/host/of_mmc_spi.c | 22 -- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/drivers/mmc/host/of_mmc_s

Re: [PATCH 1/3 V2] mmc:core: parse voltage from device-tree

2013-08-08 Thread Zhang Haijun
On 08/09/2013 08:15 AM, Anton Vorontsov wrote: On Wed, Jul 31, 2013 at 02:25:25PM +0800, Haijun Zhang wrote: Add function to support get voltage from device-tree. If there are voltage-range specified in device-tree node, this function will parse it and return the avail voltage mask. Signed-off-

RE: dw_mmc: Does anyone use multiple slots?

2013-08-08 Thread Seungwon Jeon
On Fri, August 09, 2013, Chris Ball wrote: > On Fri, Aug 09 2013, Olof Johansson wrote: > > On Thu, Aug 8, 2013 at 5:16 PM, Doug Anderson wrote: > > > >> I guess my overall question is: if there are no actual implementations > >> of multislot, shouldn't we kill it and simplify the code a whole lot

Re: [PATCH] mmc: dw_mmc-exynos: Common bindings for dw-mshc timing

2013-08-08 Thread Jaehoon Chung
Hi Dinh On 08/09/2013 07:55 AM, dingu...@altera.com wrote: > From: Dinh Nguyen > > Remove the "samsung" in "samsung,dw-mshc-ciu-div", > "samsung,dw-mshc-sdr-timing", > and "samsung,dw-mshc-ddr-timing". These characteristics are not applicable to > just Samsung platforms, but to any platform tha

[PATCH V2] mmc:sdhci: Wait longer for command with busy flags

2013-08-08 Thread Haijun Zhang
When command with busy flags send and also data busy end interrupt will be generate, the command will be finished when data transfer complete or data busy state end, Sometimes this will expend more than 10*Hz time to finish this command, so we should wait longer to detect command complete timeout e

Re: dw_mmc: Does anyone use multiple slots?

2013-08-08 Thread Chris Ball
Hi, On Fri, Aug 09 2013, Olof Johansson wrote: > On Thu, Aug 8, 2013 at 5:16 PM, Doug Anderson wrote: > >> I guess my overall question is: if there are no actual implementations >> of multislot, shouldn't we kill it and simplify the code a whole lot? >> If someone out there has a real multislot d

Re: [PATCH] mmc:sdhci: Wait longer for command with busy flags

2013-08-08 Thread Anton Vorontsov
On Wed, Jul 31, 2013 at 04:21:44PM +0800, Haijun Zhang wrote: > When command with busy flags send and also data busy end interrupt > will be generate, the command will be finished when data transfer > complete or data busy state end, Sometimes this will expend more than > 10*Hz time to finish this

Re: [PATCH 1/3 V2] mmc:core: parse voltage from device-tree

2013-08-08 Thread Anton Vorontsov
On Wed, Jul 31, 2013 at 02:25:25PM +0800, Haijun Zhang wrote: > Add function to support get voltage from device-tree. > If there are voltage-range specified in device-tree node, this function > will parse it and return the avail voltage mask. > > Signed-off-by: Haijun Zhang > --- > changes for v2

Re: dw_mmc: Does anyone use multiple slots?

2013-08-08 Thread Olof Johansson
On Thu, Aug 8, 2013 at 5:16 PM, Doug Anderson wrote: > I guess my overall question is: if there are no actual implementations > of multislot, shouldn't we kill it and simplify the code a whole lot? > If someone out there has a real multislot device they can step back in > and do it more correctly

dw_mmc: Does anyone use multiple slots?

2013-08-08 Thread Doug Anderson
Hi, A quick question: does anyone know of any hardware that actually implements multiple slots per host on the dw_mmc controller? When working on the driver I often find myself running into questions about how things should work on the theoretical "multiple slot" dw_mmc implementation. ...and I

Re: [PATCH] mmc:of_spi: Update the code of getting voltage-ranges

2013-08-08 Thread Anton Vorontsov
On Wed, Jul 31, 2013 at 02:25:27PM +0800, Haijun Zhang wrote: > int num_ranges; > + u32 ocr_mask; > int i; > int ret = -EINVAL; > > @@ -102,26 +103,11 @@ struct mmc_spi_platform_data *mmc_spi_get_pdata(struct > spi_device *spi) > if (!oms) > return NULL;

Re: [PATCHv2] ARM: socfpga: dts: Add support for SD/MMC

2013-08-08 Thread Dinh Nguyen
On Thu, 2013-08-08 at 15:13 -0600, Stephen Warren wrote: > On 08/08/2013 02:54 PM, Dinh Nguyen wrote: > > On Thu, 2013-08-08 at 14:37 -0600, Stephen Warren wrote: > >> On 08/08/2013 02:32 PM, Dinh Nguyen wrote: > >>> On Thu, 2013-08-08 at 14:14 -0600, Stephen Warren wrote: > On 08/05/2013 02:4

[PATCH] mmc: dw_mmc-exynos: Common bindings for dw-mshc timing

2013-08-08 Thread dinguyen
From: Dinh Nguyen Remove the "samsung" in "samsung,dw-mshc-ciu-div", "samsung,dw-mshc-sdr-timing", and "samsung,dw-mshc-ddr-timing". These characteristics are not applicable to just Samsung platforms, but to any platform that uses the Synopsis SD/MMC IP. Signed-off-by: Dinh Nguyen CC: Arnd Berg

Re: [PATCHv2] ARM: socfpga: dts: Add support for SD/MMC

2013-08-08 Thread Stephen Warren
On 08/08/2013 02:54 PM, Dinh Nguyen wrote: > On Thu, 2013-08-08 at 14:37 -0600, Stephen Warren wrote: >> On 08/08/2013 02:32 PM, Dinh Nguyen wrote: >>> On Thu, 2013-08-08 at 14:14 -0600, Stephen Warren wrote: On 08/05/2013 02:43 PM, dingu...@altera.com wrote: > From: Dinh Nguyen > >>>

Re: [PATCH] mmc: change mmc_gpio_get_cd to call non-sleep gpio

2013-08-08 Thread Christian Daudt
On 13-08-08 02:06 PM, Guennadi Liakhovetski wrote: On Thu, 8 Aug 2013, Christian Daudt wrote: Given that mmc_gpio_get_cd can be called in softirq context (by sdhci_tasklet_card -> sdhci_card_event -> sdhci_do_get_cd -> mmc_gpio_get_cd ), it is necessary for it to use gpio_get_value instead of g

Re: [PATCH] mmc: change mmc_gpio_get_cd to call non-sleep gpio

2013-08-08 Thread Guennadi Liakhovetski
On Thu, 8 Aug 2013, Christian Daudt wrote: > Given that mmc_gpio_get_cd can be called in softirq > context (by sdhci_tasklet_card -> sdhci_card_event -> > sdhci_do_get_cd -> mmc_gpio_get_cd ), it is necessary > for it to use gpio_get_value instead of > gpio_get_value_cansleep > Note that at presen

Re: [PATCHv2] ARM: socfpga: dts: Add support for SD/MMC

2013-08-08 Thread Dinh Nguyen
On Thu, 2013-08-08 at 14:37 -0600, Stephen Warren wrote: > On 08/08/2013 02:32 PM, Dinh Nguyen wrote: > > On Thu, 2013-08-08 at 14:14 -0600, Stephen Warren wrote: > >> On 08/05/2013 02:43 PM, dingu...@altera.com wrote: > >>> From: Dinh Nguyen > >>> > >>> Add bindings for SD/MMC for SOCFPGA. > >>>

[PATCH] mmc: change mmc_gpio_get_cd to call non-sleep gpio

2013-08-08 Thread Christian Daudt
Given that mmc_gpio_get_cd can be called in softirq context (by sdhci_tasklet_card -> sdhci_card_event -> sdhci_do_get_cd -> mmc_gpio_get_cd ), it is necessary for it to use gpio_get_value instead of gpio_get_value_cansleep Note that at present sdhci_card_event gets called both from mmc_gpio_cd_irq

Re: [PATCHv2] ARM: socfpga: dts: Add support for SD/MMC

2013-08-08 Thread Stephen Warren
On 08/08/2013 02:32 PM, Dinh Nguyen wrote: > On Thu, 2013-08-08 at 14:14 -0600, Stephen Warren wrote: >> On 08/05/2013 02:43 PM, dingu...@altera.com wrote: >>> From: Dinh Nguyen >>> >>> Add bindings for SD/MMC for SOCFPGA. >>> Add "syscon" to the "altr,sys-mgr" binding. >> >>> diff --git a/Documen

Re: [PATCHv2] ARM: socfpga: dts: Add support for SD/MMC

2013-08-08 Thread Dinh Nguyen
On Thu, 2013-08-08 at 14:14 -0600, Stephen Warren wrote: > On 08/05/2013 02:43 PM, dingu...@altera.com wrote: > > From: Dinh Nguyen > > > > Add bindings for SD/MMC for SOCFPGA. > > Add "syscon" to the "altr,sys-mgr" binding. > > > diff --git a/Documentation/devicetree/bindings/mmc/socfpga-dw-msh

Re: [PATCHv2] ARM: socfpga: dts: Add support for SD/MMC

2013-08-08 Thread Stephen Warren
On 08/05/2013 02:43 PM, dingu...@altera.com wrote: > From: Dinh Nguyen > > Add bindings for SD/MMC for SOCFPGA. > Add "syscon" to the "altr,sys-mgr" binding. > diff --git a/Documentation/devicetree/bindings/mmc/socfpga-dw-mshc.txt > b/Documentation/devicetree/bindings/mmc/socfpga-dw-mshc.txt >

Re: [PATCH v3 02/12] ARM: edma: Don't clear EMR of channel in edma_stop

2013-08-08 Thread Sekhar Nori
On Monday 05 August 2013 09:44 PM, Joel Fernandes wrote: > We certainly don't want error conditions to be cleared any other > place but the EDMA error handler, as this will make us 'forget' > about missed events we might need to know errors have occurred. > > This fixes a race condition where the

[PATCH 1/2] dw_mmc-pci: get resources from a proper BAR

2013-08-08 Thread Andy Shevchenko
There is a typo when the mapped space is from BAR 2, but BAR 0 is used instead. This patch fixes the typo. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/dw_mmc-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/dw_mmc-pci.c b/drivers/mmc/host/dw_mmc-

[PATCH 2/2] dw_mmc-pci: enable bus-mastering mode

2013-08-08 Thread Andy Shevchenko
This patch enables bus-mastering mode for MMC controller to allow IDMAC transfers. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/dw_mmc-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/host/dw_mmc-pci.c b/drivers/mmc/host/dw_mmc-pci.c index 7d148d6..f70546a 100644 --

[PATCH v3 05/14] sh: ecovec24: Remove mmcif .down_pwr() callback

2013-08-08 Thread Laurent Pinchart
The callback isn't used by the mmcif driver, don't initialize it in board code. Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski --- arch/sh/boards/mach-ecovec24/setup.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/board

[PATCH v3 11/14] mmc: sh_mobile_sdhi: Remove .get_cd() callback from platform data

2013-08-08 Thread Laurent Pinchart
All platforms pass the CD GPIO number to the driver in the .cd_gpio field. The .get_cd() callback isn't used anymore, remove it. Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski --- drivers/mmc/host/sh_mobile_sdhi.c | 9 - include/linux/mmc/sh_mobile_sdhi.h | 1 - 2 file

[PATCH v3 03/14] ARM: ep93xx: vision_ep9307: Use MMC CD and RO GPIO

2013-08-08 Thread Laurent Pinchart
Pass the CD and RO GPIO numbers to the MMC SPI driver and remove the custom .get_cd() and .get_ro() callback functions. Signed-off-by: Laurent Pinchart Acked-by: H Hartley Sweeten --- arch/arm/mach-ep93xx/vision_ep9307.c | 57 1 file changed, 5 insertions(+)

[PATCH v3 07/14] ARM: shmobile: ag5evm: Remove SDHI .set_pwr() callback

2013-08-08 Thread Laurent Pinchart
The SHDI platform data .set_pwr() callback is used to control the vmmc/vqmmc power supplies. As the power supplies already register control GPIOs there's no need to perform the operation manually. Remove the callback functions. Signed-off-by: Laurent Pinchart --- arch/arm/mach-shmobile/board-ag5

[PATCH v3 12/14] mmc: sh_mobile_sdhi: Remove .set_pwr() callback from platform data

2013-08-08 Thread Laurent Pinchart
The .set_pwr() callback isn't used anymore as all platforms register GPIO-controlled regulators. Remove it. Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski --- drivers/mmc/host/sh_mobile_sdhi.c | 9 - include/linux/mmc/sh_mobile_sdhi.h | 1 - 2 files changed, 10 deletio

[PATCH v3 09/14] mmc: sh_mmcif: Remove .down_pwr() callback from platform data

2013-08-08 Thread Laurent Pinchart
The callback isn't used by the driver and isn't initialized by board code. Remove it. Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski --- include/linux/mmc/sh_mmcif.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h i

[PATCH v3 13/14] mmc: tmio-mmc: Remove .get_cd() callback from platform data

2013-08-08 Thread Laurent Pinchart
All platforms pass the CD GPIO number to the driver in the .cd_gpio field. The .get_cd() callback isn't used anymore, remove it Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski --- drivers/mmc/host/tmio_mmc_pio.c | 16 +--- include/linux/mfd/tmio.h| 1 - 2 fi

[PATCH v3 01/14] mmc: slot-gpio: Add debouncing capability to mmc_gpio_request_cd()

2013-08-08 Thread Laurent Pinchart
Add a debounce parameter to the mmc_gpio_request_cd() function that enables GPIO debouncing when set to a non-zero value. This can be used by MMC host drivers to enable debouncing on the card detect signal. Signed-off-by: Laurent Pinchart Reviewed-by: H Hartley Sweeten --- drivers/mmc/core/host

[PATCH v3 14/14] mmc: tmio-mmc: Remove .set_pwr() callback from platform data

2013-08-08 Thread Laurent Pinchart
The .set_pwr() callback isn't used anymore as all platforms register GPIO-controlled regulators. Remove it. Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski --- drivers/mmc/host/tmio_mmc.h | 1 - drivers/mmc/host/tmio_mmc_pio.c | 7 --- include/linux/mfd/tmio.h| 1

[PATCH v3 04/14] sh: ecovec24: Use MMC/SDHI CD and RO GPIO

2013-08-08 Thread Laurent Pinchart
Pass the CD and RO GPIO numbers to the MMC SPI and SDHI drivers and remove the custom .get_cd() and .get_ro() callback functions. Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski --- arch/sh/boards/mach-ecovec24/setup.c | 42 +++- 1 file changed, 8

[PATCH v3 08/14] mmc: mmc_spi: Remove platform data .get_cd() and .get_ro() callbacks

2013-08-08 Thread Laurent Pinchart
All platforms now pass the CD and RO GPIOs to the MMC SPI driver, those callbacks are not used anymore. Remove them. Signed-off-by: Laurent Pinchart Reviewed-by: H Hartley Sweeten --- drivers/mmc/host/mmc_spi.c | 24 ++-- include/linux/spi/mmc_spi.h | 9 - 2 files

[PATCH v3 10/14] mmc: sh_mmcif: Remove .set_pwr() callback from platform data

2013-08-08 Thread Laurent Pinchart
The .set_pwr() callback isn't used anymore as all platforms register GPIO-controlled regulators. Remove it. Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakhovetski --- drivers/mmc/host/sh_mmcif.c | 3 --- include/linux/mmc/sh_mmcif.h | 1 - 2 files changed, 4 deletions(-) diff --git a

[PATCH v3 02/14] mmc: mmc_spi: Support CD/RO GPIOs

2013-08-08 Thread Laurent Pinchart
Add support for passing CD/RO GPIO numbers directly to the mmc_spi driver instead of relying solely on board code callbacks to retrieve the CD/RO signals values. The driver will enable debouncing on the card detect GPIO if the cd_debounce field is set to a non-zero value. Signed-off-by: Laurent Pi

[PATCH v3 00/14] Remove platform callbacks from mmc_spi, sh_mmcif and sh_mobile_sdhi drivers

2013-08-08 Thread Laurent Pinchart
Hello, This patch set replaces callbacks to board code with regulators and GPIOs in the mmc_spi, sh_mmcif and sh_mobile_sdhi MMC drivers. Most of the required infrastructure is in place already on the drivers side, except for CD debouncing support in the MMC core and CD/RO GPIOs support in the mm

[PATCH v3 06/14] sh: ecovec24: Remove MMCIF and SDHI .set_pwr() callbacks

2013-08-08 Thread Laurent Pinchart
The MMCIF and SHDI platform data .set_pwr() callbacks are used to control the vmmc/vqmmc power supplies. As the power supplies already register control GPIOs there's no need to perform the operation manually. Remove the callback functions. Signed-off-by: Laurent Pinchart Acked-by: Guennadi Liakho