[PATCH] mmc: dw_mmc: Add external dma interface support

2015-07-29 Thread Shawn Lin
DesignWare MMC Controller can support two types of DMA mode: external dma and internal dma. We get a RK312x platform integrated dw_mmc and ARM pl330 dma controller. This patch add edmac ops to suuport these platforms. I've tested it on RK312x platform with edmac mode and RK3288 platform with idmac

Re: [PATCH 12/17] ARM: dts: am57xx-beagle-x15: Fix regulator populated in MMC1 dt node

2015-07-29 Thread Nishanth Menon
On 07/29/2015 06:09 AM, Kishon Vijay Abraham I wrote: > For beagle x15, both the vdd and io lines are connected to the > same regulator (ldo1_reg). However vmmc_aux is populated to vdd_3v3. > Remove it. > > Signed-off-by: Kishon Vijay Abraham I > --- > arch/arm/boot/dts/am57xx-beagle-x15.dts |

[PATCH v2 1/3] mmc: sdhci: switch from programmable clock mode to divided one if needed

2015-07-29 Thread Ludovic Desroches
In programmable mode, if the clock frequency is too high, the divider can be too small to meet the clock frequency requirement especially to init the SD card. In this case, switch to the divided clock mode. Signed-off-by: Ludovic Desroches --- drivers/mmc/host/sdhci.c | 29 --

[PATCH v2 0/3] introduce driver for the Atmel SDMMC

2015-07-29 Thread Ludovic Desroches
Hi, This set of patches introduce a driver for the new Atmel SDMMC device avaible on SAMA5D2 SoC. There is also a resend of an old patch which has not been taken. Ulf asked for some reviews since it could impact all sdhci devices but nobody did it... This patch is not necessary for patch 2/3. It

[PATCH v2 3/3] MAINTAINERS: add entry for Atmel sdhci-of-at91 driver

2015-07-29 Thread Ludovic Desroches
Add an entry for Atmel SDMMC device. Signed-off-by: Ludovic Desroches --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index e7bdbac..6480ce9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1880,6 +1880,12 @@ L: linux-...@lists.infradead.or

[PATCH v2 2/3] mmc: sdhci-of-at91: introduce driver for the Atmel SDMMC

2015-07-29 Thread Ludovic Desroches
Introduce driver for he Atmel SDMMC available on sama5d2. It is a sdhci compliant controller. Signed-off-by: Ludovic Desroches --- .../devicetree/bindings/mmc/sdhci-atmel.txt| 21 +++ drivers/mmc/host/Kconfig | 8 + drivers/mmc/host/Makefile

Re: [PATCH 01/17] mmc: host: omap_hsmmc: use devm_regulator_get_optional() for vmmc

2015-07-29 Thread Grygorii Strashko
On 07/29/2015 02:09 PM, Kishon Vijay Abraham I wrote: > Since vmmc can be optional for some platforms, use > devm_regulator_get_optional() for vmmc. Now return error only > in the case of -EPROBE_DEFER and for all other cases set > host->vcc to NULL. > > Signed-off-by: Kishon Vijay Abraham I > --

Virtex-5 FPGA PCIE single-function device

2015-07-29 Thread Muni Sekhar
[ Please keep me in CC as I'm not subscribed to the list] Hello, We are using the “Virtex-5 FPGA Integrated Endpoint Block for PCI Express” in Linux platform. It supports only a single-function(Header Type, Bit 7 is zero), but actually it is having different functions in different Bar’s. It has

[PATCH 12/17] ARM: dts: am57xx-beagle-x15: Fix regulator populated in MMC1 dt node

2015-07-29 Thread Kishon Vijay Abraham I
For beagle x15, both the vdd and io lines are connected to the same regulator (ldo1_reg). However vmmc_aux is populated to vdd_3v3. Remove it. Signed-off-by: Kishon Vijay Abraham I --- arch/arm/boot/dts/am57xx-beagle-x15.dts |1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/boot/dts

[PATCH 01/17] mmc: host: omap_hsmmc: use devm_regulator_get_optional() for vmmc

2015-07-29 Thread Kishon Vijay Abraham I
Since vmmc can be optional for some platforms, use devm_regulator_get_optional() for vmmc. Now return error only in the case of -EPROBE_DEFER and for all other cases set host->vcc to NULL. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/omap_hsmmc.c |8 +--- 1 file changed, 5

[PATCH 11/17] mmc: host: omap_hsmmc: don't use ->set_power to set initial regulator state

2015-07-29 Thread Kishon Vijay Abraham I
If the regulator is enabled on boot (checked using regulator_is_enabled), invoke regulator_enable() so that the usecount reflects the correct state of the regulator and then disable the regulator so that the initial state of the regulator is disabled. Avoid using ->set_power, since set_power also t

[PATCH 08/17] mmc: host: omap_hsmmc: add separate functions for enable/disable supply

2015-07-29 Thread Kishon Vijay Abraham I
No functional change. Cleanup omap_hsmmc_set_power by adding separate functions for enable/disable supply and invoke it from omap_hsmmc_set_power. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/omap_hsmmc.c | 101 +++-- 1 file changed, 66 insertio

[PATCH 03/17] mmc: host: omap_hsmmc: cleanup omap_hsmmc_reg_get()

2015-07-29 Thread Kishon Vijay Abraham I
No functional change. Instead of using a local regulator variable in omap_hsmmc_reg_get() for holding the return value of devm_regulator_get_optional() and then assigning to omap_hsmmc_host regulator members: vcc, vcc_aux and pbias, directly use the omap_hsmmc_host regulator members. Signed-off-by

[PATCH 00/17] omap_hsmmc: regulator usage cleanup and fixes

2015-07-29 Thread Kishon Vijay Abraham I
This patch series does the following *) Uses devm_regulator_get_optional() for vmmc and then removes the CONFIG_REGULATOR check altogether. *) return on -EPROBE_DEFER *) enable/disable vmmc_aux regulator based on prior state This series is in preparation for implementing the voltage switch sequ

[PATCH 10/17] mmc: host: omap_hsmmc: avoid pbias regulator enable on power off

2015-07-29 Thread Kishon Vijay Abraham I
Fix omap_hsmmc_set_power so that pbias regulator is not enabled during power off. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/omap_hsmmc.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c i

[PATCH 02/17] mmc: host: omap_hsmmc: return error from omap_hsmmc_reg_get on -EPROBE_DEFER

2015-07-29 Thread Kishon Vijay Abraham I
EPROBE_DEFER is not fatal and it means the regulator can still be obtained. Hence return error if devm_regulator_get_optional for vmmc_aux and pbias returns -EPROBE_DEFER. This gives omap_hsmmc driver another chance to get these regulators. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/h

[PATCH 04/17] mmc: host: omap_hsmmc: use the ocrmask provided by the vmmc regulator

2015-07-29 Thread Kishon Vijay Abraham I
If the vmmc regulator provides a valid ocrmask, use it. By this even if the pdata has a valid ocrmask, it will be overwritten with the ocrmask of the vmmc regulator. Also remove the unnecessary compatibility check between the ocrmask in the pdata and the ocrmask from the vmmc regulator. Signed-off

[PATCH 06/17] mmc: host: omap_hsmmc: remove unnecessary pbias set_voltage

2015-07-29 Thread Kishon Vijay Abraham I
Remove the unnecessary pbias regulator_set_voltage done after pbias regulator_disable in omap_hsmmc_set_power. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Roger Quadros --- drivers/mmc/host/omap_hsmmc.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b

[PATCH 07/17] mmc: host: omap_hsmmc: return error if any of the regulator APIs fail

2015-07-29 Thread Kishon Vijay Abraham I
Return error if any of the regulator APIs (regulator_enable, regulator_disable, regulator_set_voltage) fails in omap_hsmmc_set_power to avoid undefined behavior. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/omap_hsmmc.c | 52 +++-- 1 file chang

[PATCH 05/17] mmc: host: omap_hsmmc: use mmc_host's vmmc and vqmmc

2015-07-29 Thread Kishon Vijay Abraham I
No functional change. Instead of using our own vcc and vcc_aux members, use vmmc and vqmmc present in mmc_host which is present for the same purpose. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Roger Quadros --- drivers/mmc/host/omap_hsmmc.c | 63 ++-

[PATCH 16/17] mmc: host: omap_hsmmc: remove CONFIG_REGULATOR check

2015-07-29 Thread Kishon Vijay Abraham I
Now that support for platforms which have optional regulator is added, remove CONFIG_REGULATOR check in omap_hsmmc. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/omap_hsmmc.c | 35 +++ 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/d

[PATCH 17/17] mmc: host: omap_hsmmc: use "mmc_of_parse_voltage" to get ocr_avail

2015-07-29 Thread Kishon Vijay Abraham I
From: Roger Quadros For platforms that doesn't have explicit regulator control in MMC, populate voltage-ranges in MMC device tree node and use mmc_of_parse_voltage to get ocr_avail Signed-off-by: Roger Quadros Signed-off-by: Lokesh Vutla Signed-off-by: Murali Karicheri Signed-off-by: Franklin

[PATCH 14/17] mmc: host: omap_hsmmc: use regulator_is_enabled to find pbias status

2015-07-29 Thread Kishon Vijay Abraham I
Use regulator_is_enabled of pbias regulator to find pbias regulator status instead of maintaining a custom bookkeeping pbias_enabled variable. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/omap_hsmmc.c |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dr

[PATCH 09/17] mmc: host: omap_hsmmc: add separate function to set pbias

2015-07-29 Thread Kishon Vijay Abraham I
No functional change. Cleanup omap_hsmmc_set_power by adding separate functions to set pbias and invoke it from omap_hsmmc_set_power. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/omap_hsmmc.c | 78 + 1 file changed, 48 insertions(+), 30 del

[PATCH 15/17] mmc: host: omap_hsmmc: use ios->vdd for setting vmmc voltage

2015-07-29 Thread Kishon Vijay Abraham I
vdd voltage is set in mmc core to ios->vdd and vmmc should actually be set to this voltage. Modify omap_hsmmc_enable_supply to not take vdd as argument since now it's directly set to the voltage in ios->vdd. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/omap_hsmmc.c |7 ---

[PATCH 13/17] mmc: host: omap_hsmmc: enable/disable vmmc_aux regulator based on prior state

2015-07-29 Thread Kishon Vijay Abraham I
enable vmmc_aux regulator only if it is in disabled state and disable vmmc_aux regulator only if it is in enabled state. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/omap_hsmmc.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.

Re: [PATCH v3 0/6] mmc: imx: a few fixes and new feature

2015-07-29 Thread Dong Aisheng
On Wed, Jul 29, 2015 at 05:03:51PM +0800, Haibo Chen wrote: > Changes for v3: > -Add property describe in binding doc. > > Haibo Chen (6): > mmc: sdhci-esdhc-imx: add imx7d support and support HS400 > mmc: sdhci-esdhc-imx: add tuning-step seting support > ARM: dts: imx7d-sdb: add eMMC5.0 sup

[PATCH v3 3/6] ARM: dts: imx7d-sdb: add eMMC5.0 support

2015-07-29 Thread Haibo Chen
imx7d-sdb board has a eMMC5.0 on usdhc3. This eMMC support HS400. This patch add usdhc3 support for HS400 Signed-off-by: Haibo Chen --- arch/arm/boot/dts/imx7d-sdb.dts | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/imx7d-sdb.dts b/arch/arm/boot/dts/imx7d-sdb

[PATCH v3 0/6] mmc: imx: a few fixes and new feature

2015-07-29 Thread Haibo Chen
Changes for v3: -Add property describe in binding doc. Haibo Chen (6): mmc: sdhci-esdhc-imx: add imx7d support and support HS400 mmc: sdhci-esdhc-imx: add tuning-step seting support ARM: dts: imx7d-sdb: add eMMC5.0 support mmc: sdhci-esdhc-imx: add compatible string in bingding doc mmc:

[PATCH v3 1/6] mmc: sdhci-esdhc-imx: add imx7d support and support HS400

2015-07-29 Thread Haibo Chen
The imx7d usdhc is derived from imx6sx, the difference is that imx7d support HS400. So introduce a new compatible string for imx7d and add HS400 support for imx7d usdhc. Signed-off-by: Haibo Chen --- drivers/mmc/host/sdhci-esdhc-imx.c | 66 ++ 1 file changed,

[PATCH v3 5/6] mmc: sdhci-esdhc-imx: config watermark level and burst length

2015-07-29 Thread Haibo Chen
i.MX7D support eMMC HS400 mode, this mode can run in 8 bit,200MHZ DDR mode. So the I/O speed improve a lot compare to SD3.0 The default burst length is 8, if we don't change this value, in HS400 mode, when we do eMMC read operation, we can find that the clock signal will stop for a period of time.

[PATCH v3 2/6] mmc: sdhci-esdhc-imx: add tuning-step seting support

2015-07-29 Thread Haibo Chen
tuning-step is the delay cell steps in tuning procedure. The default value of tuning-step is 1. For imx6 series usdhc, tuning procedure can be passed when the tuning-step value is 1. But imx7d usdhc need the tuning-step value as 2, otherwise it can't pass the tuning procedure. So this patch add th

[PATCH v3 6/6] mmc: sdhci-esdhc-imx: set back the burst_length_enable bit to 1

2015-07-29 Thread Haibo Chen
Currently we find that if a usdhc is choosed to boot system, then ROM code will set the burst length enable bit of this usdhc as 0. This will make performance drop a lot if this usdhc's burst length is 16. So this patch set back the burst_length_enable bit as 1, which is the default value, and mea

[PATCH v3 4/6] mmc: sdhci-esdhc-imx: add compatible string in bingding doc

2015-07-29 Thread Haibo Chen
Add a required property "fsl,imx7d-usdhc" in binding doc. Add an optional property "fsl,tuning-step" in binding doc. Signed-off-by: Haibo Chen --- Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/f