[PATCH 2/4] mmc: core: allow non-blocking form of mmc_claim_host

2015-01-30 Thread NeilBrown
Change the handling for the 'abort' flag so that if it is set, but we can claim the host, then do the claim, rather than aborting. When the abort is async this just means that a race between aborting an allowing a claim is resolved slightly differently. Any code must already be able to handle

[PATCH 4/4] mmc: omap_hsmmc: switch to 1-bit before stopping clocks.

2015-01-30 Thread NeilBrown
Make use of the new mmc_sdio_want_no_clocks() call to avoid stopping clocks while SD Card interrupts are enabled and we aren't in 1-bit mode. Also stop clocks immediately in omap_hsmmc_disable_fclk() if 1-bit mode has been entered for this purpose. With this, I can use my libertas wifi with a

[PATCH 1/4] mmc: core: fold mmc_set_bus_width calls into sdio_enable_4bit_bus.

2015-01-30 Thread NeilBrown
Every call to sdio_enable_4bit_bus is followed (on success) but a call to mmc_set_bus_width(). To simplify the code, include those calls directly in sdio_enable_4bit_bus(). Signed-off-by: NeilBrown n...@brown.name --- drivers/mmc/core/sdio.c | 32 1 file

[PATCH 3/4] mmc: sdio: support switching to 1-bit before turning off clocks

2015-01-30 Thread NeilBrown
According to section 7.1.2 of http://www.sandisk.com/media/File/OEM/Manuals/SD_SDIO_specsv1.pdf In the case where the interrupt mechanism is used to wake the host while the card is in a low power state (i.e. no clocks), Both the card and the host shall be placed into the 1-bit SD

[PATCH-v2 0/4] mmc: switch to 1-bit mode which stopping clocks.

2015-01-30 Thread NeilBrown
This is a new version which moves most of the code into mmc/core so it is available to all drivers. I was wrong about not being able to sleep in pm_runtime callbacks. There are spinlocks, but not the ones I thought they were... Anyway, I tried switching to 1-bit mode from within the

Re: [PATCH 1/2] mmc: core: use card pointer as the first parameter of execute_tuning()

2015-01-30 Thread Doug Anderson
Hi, On Thu, Jan 29, 2015 at 4:13 PM, Doug Anderson diand...@chromium.org wrote: I still don't exactly have a warm fuzzy about using the send_status() command like this, but it seems to work (actually, I should verify that myself--I've been taking Addy's word that his solution works). So I

Re: mmc does not work in qemu n900

2015-01-30 Thread Pali Rohár
On Tuesday 27 January 2015 10:17:39 Pali Rohár wrote: On Tuesday 27 January 2015 00:21:04 Aaro Koskinen wrote: Hi, On Mon, Jan 26, 2015 at 10:04:59PM +0100, Pali Rohár wrote: problem? Why any of these two patches fix problem when mmc is not detected by kernel in qemu (machine n900)?

Re: [PATCH] mmc: Add hardware dependencies for sdhci-pxav3 and sdhci-pxav2

2015-01-30 Thread Jean Delvare
Hi Ulf, On Thu, 29 Jan 2015 16:01:48 +0100, Ulf Hansson wrote: On 29 January 2015 at 15:17, Jean Delvare jdelv...@suse.de wrote: On Wed, 28 Jan 2015 15:04:24 +0100, Ulf Hansson wrote: For those SOC that want these drivers, they should be able to select them from their defconfigs. So it

Re: [PATCH 1/4] mmc: core: add support for hardware reset gpio line

2015-01-30 Thread Marek Szyprowski
Hello, On 2015-01-29 11:56, Javier Martinez Canillas wrote: On Thu, Jan 29, 2015 at 10:15 AM, Marek Szyprowski m.szyprow...@samsung.com wrote: Also, I wonder whether we could extend the mmc-pwrseq to cover your case? Did you consider that as an option? I didn't consider mmc-pwrseq yet. For

Re: [PATCH v2] mmc: Resolve BKOPS compatability issue

2015-01-30 Thread Ulf Hansson
On 30 January 2015 at 08:26, Jaehoon Chung jh80.ch...@samsung.com wrote: Hi, Alexey. On 01/29/2015 05:49 PM, Alexey Skidanov wrote: This patch is coming to fix compatibility issue of BKOPS_EN field of EXT_CSD. In eMMC-5.1, BKOPS_EN was changed, and now it has two operational bits: Bit 0 -

Re: [PATCH] mmc: Add hardware dependencies for sdhci-pxav3 and sdhci-pxav2

2015-01-30 Thread Ulf Hansson
On 30 January 2015 at 09:29, Jean Delvare jdelv...@suse.de wrote: Hi Ulf, On Thu, 29 Jan 2015 16:01:48 +0100, Ulf Hansson wrote: On 29 January 2015 at 15:17, Jean Delvare jdelv...@suse.de wrote: On Wed, 28 Jan 2015 15:04:24 +0100, Ulf Hansson wrote: For those SOC that want these drivers,

Re: [PATCH v3 0/6] Add multiple GPIO and external clock to MMC pwrseq_simple

2015-01-30 Thread Ulf Hansson
On 29 January 2015 at 16:00, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: Hello Ulf, Many WLAN chips attached to an SDIO interface needs more than one GPIO for their reset sequence and also an external clock to be operational. Since this is very common, this series extend

Re: [PATCH v3 4/6] mmc: pwrseq_simple: Add optional reference clock support

2015-01-30 Thread Ulf Hansson
On 29 January 2015 at 16:00, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: Some WLAN chips attached to a SDIO interface, need a reference clock. Since this is very common, extend the prseq_simple driver to support an optional clock that is enabled prior the card power up

Re: [PATCH v3 4/6] mmc: pwrseq_simple: Add optional reference clock support

2015-01-30 Thread Javier Martinez Canillas
Hello Ulf, On 01/30/2015 12:17 PM, Ulf Hansson wrote: }; @@ -39,6 +42,11 @@ static void mmc_pwrseq_simple_pre_power_on(struct mmc_host *host) struct mmc_pwrseq_simple *pwrseq = container_of(host-pwrseq, struct mmc_pwrseq_simple, pwrseq); +

Re: [PATCH v3 0/6] Add multiple GPIO and external clock to MMC pwrseq_simple

2015-01-30 Thread Javier Martinez Canillas
Hello Ulf, On 01/30/2015 12:13 PM, Ulf Hansson wrote: Patch #1 extends the simple MMC power sequence DT binding to support more than one GPIO and patch #2 adds the actual implementation. In the same way, patch #3 and #4 extend the simple MMC power sequence DT binding and pwrseq_simple

Re: [PATCH 1/4] mmc: core: add support for hardware reset gpio line

2015-01-30 Thread Ulf Hansson
On 30 January 2015 at 11:37, Marek Szyprowski m.szyprow...@samsung.com wrote: Hello, On 2015-01-29 11:56, Javier Martinez Canillas wrote: On Thu, Jan 29, 2015 at 10:15 AM, Marek Szyprowski m.szyprow...@samsung.com wrote: Also, I wonder whether we could extend the mmc-pwrseq to cover your

Re: [PATCH 1/4] mmc: core: add support for hardware reset gpio line

2015-01-30 Thread Sjoerd Simons
On Fri, 2015-01-30 at 11:37 +0100, Marek Szyprowski wrote: Hello, On 2015-01-29 11:56, Javier Martinez Canillas wrote: On Thu, Jan 29, 2015 at 10:15 AM, Marek Szyprowski m.szyprow...@samsung.com wrote: Also, I wonder whether we could extend the mmc-pwrseq to cover your case? Did you

Re: [PATCH] mmc: Add hardware dependencies for sdhci-pxav3 and sdhci-pxav2

2015-01-30 Thread Jean Delvare
On Fri, 30 Jan 2015 11:43:17 +0100, Ulf Hansson wrote: I did a little more of investigation of what's good practice/policy around your suggested patch. I have changed my mind, I am going to accept your patch as is. Sorry for all the noise and thanks for a good discussion. Applied for