[v2, 7/8] mmc: sd: set 4bit bus width after IO signal voltage switching

2015-09-17 Thread Yangbo Lu
IO signal voltage switching is used for UHS speed mode. After the voltage switching, the card is in UHS mode and it's needed to set 4bit bus width before any data transfer command. Signed-off-by: Yangbo Lu --- drivers/mmc/core/sd.c | 9 + 1 file changed, 9

[v2, 8/8] mmc: sdhci-of-esdhc: add SDR50 mode support for SD/MMC Legacy Adapter Card

2015-09-17 Thread Yangbo Lu
The eSDHC is not compatible with SD spec well, so we need to use eSDHC-special code to switch to SDR50 mode. 1. IO signal voltage switching, eSDHC uses SDHC_VS to switch io voltage and it's needed to configure a global utilities register SCFG_SDHCIOVSELCR(if it has) and SDHC_VS signal. 2. Before

Re: [PATCH V3] mmc: block: Add new ioctl to send multi commands

2015-09-17 Thread Ulf Hansson
[...] >>> + /* >>> +* The caller must have CAP_SYS_RAWIO, and must be calling this on >>> the >>> +* whole block device, not on a partition. This prevents overspray >>> +* between sibling partitions. >>> +*/ >>> + if ((!capable(CAP_SYS_RAWIO)) ||

[PATCH 1/2] mmc: sdhci: add quirk SDHCI_QUIRK2_NEED_DELAY_AFTER_INT_CLK_RST

2015-09-17 Thread Ludovic Desroches
The Atmel sdhci device needs a new quirk. sdhci_set_clock set the Clock Control Register to 0 before computing the new value and writing it. It disables the internal clock which causes a reset mecanism. If we write the new value before this reset mecanism is done, it will prevent the stabilisation

Re: [patch] mmc: sdhci-of-at91: remove a line of dead code

2015-09-17 Thread Ludovic Desroches
On Wed, Sep 16, 2015 at 09:19:49AM +0300, Dan Carpenter wrote: > The goto is correct and the unreachable "return -EINVAL" should be > removed. > > Signed-off-by: Dan Carpenter Of course Acked-by: Ludovic Desroches Thanks > > diff --git

Re: [PATCH v2] mmc: pxamci: fix card detect with slot-gpio API

2015-09-17 Thread Ulf Hansson
On 16 September 2015 at 21:16, Robert Jarzmik wrote: > Move pxamci to mmc slot-gpio API to fix interrupt request. > > It fixes the case where the card detection is on a gpio expander, on I2C > for example on zylonite board. In this case, the card detect netsted > interrupt

[PATCH 2/2] mmc: sdhci-of-at91: use SDHCI_QUIRK2_NEED_DELAY_AFTER_INT_CLK_RST quirk

2015-09-17 Thread Ludovic Desroches
The Atmel sdhci device needs the SDHCI_QUIRK2_NEED_DELAY_AFTER_INT_CLK_RST quirk. Without it, the internal clock could never stabilised when changing the sd clock frequency. Signed-off-by: Ludovic Desroches --- drivers/mmc/host/sdhci-of-at91.c | 1 + 1 file changed,

Re: [PATCH] mmc: sdhci: call sdhci_init() before request irq

2015-09-17 Thread Ulf Hansson
On 15 September 2015 at 12:32, Haibo Chen wrote: > sdhci_init() will clear all irqs and set the needed irqs. So > logically sdhci_init() should be called before request irq. > > If not, some irqs may be triggled and handled wrongly. Take > the following into

Re: [RESEND PATCH] mmc: mmc_spi: Export OF module alias information

2015-09-17 Thread Ulf Hansson
On 16 September 2015 at 11:12, Javier Martinez Canillas wrote: > Drivers needs to export the OF id table and this be built into > the module or udev won't have the necessary information to autoload > the driver module when the device is registered via OF. > >

Re: [PATCH 1/2] mmc: wbsd: Remove unneded semicolon

2015-09-17 Thread Ulf Hansson
On 16 September 2015 at 11:30, Javier Martinez Canillas wrote: > It's not needed an is just creating a null statement, so remove it. > > Signed-off-by: Javier Martinez Canillas Thanks, applied for next! Kind regards Uffe > --- > >

Re: [PATCH] mmc: pwrseq: use gpiod_get() instead of index 0

2015-09-17 Thread Ulf Hansson
On 14 September 2015 at 14:00, Javier Martinez Canillas wrote: > The gpiod_get() function expands to gpiod_get_index() with index 0 > so it's better to use it since is easier to read and more concise. > > Signed-off-by: Javier Martinez Canillas

Re: [PATCH v2 1/2] mmc: sdhci-of-arasan: add phy support for sdhci-of-arasan

2015-09-17 Thread Ulf Hansson
On 14 September 2015 at 08:29, Shawn Lin wrote: > This patch adds Generic PHY access for sdhci-of-arasan. Driver > can get PHY handler from dt-binding, and power-on/init the PHY. > Also we add pm ops for PHY here if CONFIG_PM_SLEEP is enabled. > Currently, it's just

[PATCH] mmc: sdhci-pltfm: Use of_property_read_u32 instead of open-coding it

2015-09-17 Thread Tobias Klauser
Use of_property_read_u32 instead of of_get_property with return value checks and endianness conversion. Signed-off-by: Tobias Klauser --- drivers/mmc/host/sdhci-pltfm.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git

Re: [PATCH 2/3] mmc: sd: Allow calling sd mode switch with retries

2015-09-17 Thread Yousong Zhou
On 16 September 2015 at 12:17, Jaehoon Chung wrote: > Hi, Yousong. > > On 09/16/2015 12:09 PM, Yousong Zhou wrote: >> Hi, >> >> On 16 September 2015 at 10:36, Jaehoon Chung wrote: >>> Hi, >>> >>> On 09/10/2015 12:02 PM, Yousong Zhou wrote: On

Re: [PATCH] mmc: sdhci-bcm-kona: fix logic to check for 8-bit data width

2015-09-17 Thread Ulf Hansson
On 16 September 2015 at 11:53, Javier Martinez Canillas wrote: > The driver prints if the data width is 8-bit but it's using a > binary OR instead of a binary AND so it will always report as > "is_8bit=Y" regardless of the flags in host->mmc->caps. > > Signed-off-by:

Re: [PATCH 2/2] mmc: vub300: Remove unneded semicolons

2015-09-17 Thread Ulf Hansson
On 16 September 2015 at 11:30, Javier Martinez Canillas wrote: > They aren't needed and are just creating null statements so remove it. > > Signed-off-by: Javier Martinez Canillas Thanks, applied for next! Kind regards Uffe > > --- > >

Re: [patch] mmc: sdhci-of-at91: remove a line of dead code

2015-09-17 Thread Ulf Hansson
On 16 September 2015 at 08:19, Dan Carpenter wrote: > The goto is correct and the unreachable "return -EINVAL" should be > removed. > > Signed-off-by: Dan Carpenter Thanks, applied for next! Kind regards Uffe > > diff --git

Re: [PATCH 1/2] mmc: core: enable CMD19 tuning for DDR50 mode

2015-09-17 Thread Ulf Hansson
On 15 September 2015 at 09:13, Barry Song <21cn...@gmail.com> wrote: > 2015-08-25 20:05 GMT+08:00 Ulf Hansson : >> On 20 August 2015 at 02:16, Barry Song <21cn...@gmail.com> wrote: >>> 2015-08-18 1:11 GMT+08:00 Ulf Hansson : On 11 August 2015 at

Re: [PATCH] mmc: sdhci-pltfm: Use of_property_read_u32 instead of open-coding it

2015-09-17 Thread Ulf Hansson
On 17 September 2015 at 14:07, Tobias Klauser wrote: > Use of_property_read_u32 instead of of_get_property with return value > checks and endianness conversion. > > Signed-off-by: Tobias Klauser > --- > drivers/mmc/host/sdhci-pltfm.c | 8 +++- > 1

Re: [PATCH v2 1/2] mmc: sdhci-of-arasan: add phy support for sdhci-of-arasan

2015-09-17 Thread Shawn Lin
On 2015/9/17 19:44, Ulf Hansson wrote: On 14 September 2015 at 08:29, Shawn Lin wrote: This patch adds Generic PHY access for sdhci-of-arasan. Driver can get PHY handler from dt-binding, and power-on/init the PHY. Also we add pm ops for PHY here if CONFIG_PM_SLEEP is

Re: [PATCH v2] mmc: sdhci-pltfm: Use of_property_read_u32 instead of open-coding it

2015-09-17 Thread Ulf Hansson
On 17 September 2015 at 15:09, Tobias Klauser wrote: > Use of_property_read_u32 instead of of_get_property with return value > checks and endianness conversion. > > Signed-off-by: Tobias Klauser Thanks, applied for next! Kind regards Uffe > --- > v2:

Re: [PATCH] mmc: sdhci-pltfm: Use of_property_read_u32 instead of open-coding it

2015-09-17 Thread Tobias Klauser
On 2015-09-17 at 14:59:45 +0200, Ulf Hansson wrote: > On 17 September 2015 at 14:07, Tobias Klauser wrote: > > Use of_property_read_u32 instead of of_get_property with return value > > checks and endianness conversion. > > > > Signed-off-by: Tobias

[PATCH v2] mmc: sdhci-pltfm: Use of_property_read_u32 instead of open-coding it

2015-09-17 Thread Tobias Klauser
Use of_property_read_u32 instead of of_get_property with return value checks and endianness conversion. Signed-off-by: Tobias Klauser --- v2: - Directly use plfrm_host->clock in the call to of_property_read_u32(), as suggested by Ulf Hansson.

Re: [PATCH v2] mmc: pxamci: fix card detect with slot-gpio API

2015-09-17 Thread Robert Jarzmik
Ulf Hansson writes: >> + if (gpio_is_valid(gpio_ro)) >> + ret = mmc_gpio_request_ro(mmc, gpio_ro); > > Would it be possible for you to use the mmc_gpiod_request_ro() instead? I don't think so. Most of pxamci users are old platform data based machine

[PATCH 2/3] mmc: moxart: Fix module autoload for OF platform driver

2015-09-17 Thread Luis de Bethencourt
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt --- drivers/mmc/host/moxart-mmc.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 3/3] mmc: omap: Fix module autoload for OF platform driver

2015-09-17 Thread Luis de Bethencourt
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt --- drivers/mmc/host/omap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/omap.c

[PATCH 0/3] mmc: Fix module autoload for OF platform drivers

2015-09-17 Thread Luis de Bethencourt
Hi, These patches add the missing MODULE_DEVICE_TABLE() for OF to export the information so modules have the correct aliases built-in and autoloading works correctly. A longer explanation by Javier Canillas can be found here: https://lkml.org/lkml/2015/7/30/519 Thanks, Luis Luis de Bethencourt

[PATCH 1/3] mmc: mmc_spi: Fix module autoload for OF platform driver

2015-09-17 Thread Luis de Bethencourt
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt --- drivers/mmc/host/mmc_spi.c | 1 + 1 file changed, 1 insertion(+) diff --git