[PATCH] mmc: remove MMC_CAP_NEEDS_POLL setting in sdhci_add_host

2012-09-24 Thread yongd
From: yongd In the current code logic, sdhci_add_host() will enable the polling method (set MMC_CAP_NEEDS_POLL) for a removable card (MMC_CAP_ NONREMOVABLE is not set) whose host's internal card detection method is disabled for some reason (SDHCI_QUIRK_BROKEN_CARD_DETECTION is set). However, thi

Re: [PATCH] mmc: sdhci / i.MX esdhc buswidth patches

2012-09-24 Thread Wolfram Sang
On Mon, Sep 24, 2012 at 09:22:22AM +0200, Sascha Hauer wrote: > The first patch is a generic sdhci driver cleanup change, the others > are i.MX specific, adding 8bit bus support and fix version register > readout. > > Sascha > > > S

Re: [PATCH 2/3] mmc: esdhc i.MX: Fix version register read

2012-09-24 Thread Shawn Guo
On Mon, Sep 24, 2012 at 09:22:24AM +0200, Sascha Hauer wrote: > The i.MX ESDHC controller version register is a mess: > > - i.MX25 has a v1 controller which identifies itself as v2 > - i.MX6Q has a v3 controller which identifies itself as v4 > - i.MX35,51,53 have v2 controllers which identify them

Re: [PATCH 1/3] mmc: sdhci: rename platform_8bit_width to platform_bus_width

2012-09-24 Thread Sascha Hauer
On Tue, Sep 25, 2012 at 11:35:14AM +0900, Jaehoon Chung wrote: > On 09/24/2012 04:22 PM, Sascha Hauer wrote: > > /* > > * If your platform has 8-bit width support but is not a v3 controller, > > * or if it requires special setup code, you should implement that in > > -* platform_8

Re: [PATCH 1/3] mmc: sdhci: rename platform_8bit_width to platform_bus_width

2012-09-24 Thread Jaehoon Chung
On 09/24/2012 04:22 PM, Sascha Hauer wrote: > The 8bit in the function name is misleading. When set, it will be > used to set the bus width, regardless of whether 8bit or another > bus width is requested, so change the function name to > platform_bus_width. > > Signed-off-by: Sascha Hauer > --- >

RE: [PATCH v3] powerpc/esdhc: disable CMD23 for some Freescale SoCs

2012-09-24 Thread Huang Changming-R66093
> Hi, > > On Fri, Sep 21 2012, r66...@freescale.com wrote: > > --- a/drivers/mmc/host/sdhci-of-esdhc.c > > +++ b/drivers/mmc/host/sdhci-of-esdhc.c > > @@ -143,6 +143,35 @@ static void esdhc_of_resume(struct sdhci_host > > *host) } #endif > > > > +static const

Re: [PATCH v2 6/8] mmc: sdhci-pxav3: controller can't get base clock

2012-09-24 Thread Kevin Liu
2012/9/24 Philip Rakity : > > On Sep 24, 2012, at 1:15 AM, Kevin Liu wrote: > >> From: Kevin Liu >> >> Enable the quirk SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN since >> SD_CAPABILITIES_1[15:8](BASE_FREQ) can't get correct base >> clock value. It return a fixed pre-set value like 200 on >> some sdhci-px

Re: [PATCH v2 6/8] mmc: sdhci-pxav3: controller can't get base clock

2012-09-24 Thread Philip Rakity
On Sep 24, 2012, at 1:15 AM, Kevin Liu wrote: > From: Kevin Liu > > Enable the quirk SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN since > SD_CAPABILITIES_1[15:8](BASE_FREQ) can't get correct base > clock value. It return a fixed pre-set value like 200 on > some sdhci-pxav3 based platforms like MMP3 while

Re: [PATCH v2 5/8] mmc: sdhci: fix null return check of regulator_get

2012-09-24 Thread Philip Rakity
On Sep 24, 2012, at 1:15 AM, Kevin Liu wrote: > From: Kevin Liu > > regulator_get() returns NULL when CONFIG_REGULATOR not defined, > which should not print out the warning. > > Signed-off-by: Bin Wang > Signed-off-by: Kevin Liu > --- > drivers/mmc/host/sdhci.c | 18 -- > 1

Re: [PATCH v3 1/2] mmc: Move mmc_delay() to include/linux/mmc/core.h

2012-09-24 Thread Tabi Timur-B04825
On Mon, Sep 24, 2012 at 8:17 AM, Arnd Bergmann wrote: > >> static inline void mmc_delay(unsigned int ms) >> { >> msleep(ms); >> } > > That would be my preferred choice, unless someone has specific issues with > this. If we're going to do that, then just get rid of mmc_delay and replace

Re: [PATCH v3] powerpc/esdhc: disable CMD23 for some Freescale SoCs

2012-09-24 Thread Kumar Gala
On Sep 23, 2012, at 10:13 PM, Huang Changming-R66093 wrote: > > > Best Regards > Jerry Huang > > >> -Original Message- >> From: linux-mmc-ow...@vger.kernel.org [mailto:linux-mmc- >> ow...@vger.kernel.org] On Behalf Of Huang Changming-R66093 >> Sent: Monday, September 24, 2012 10:37 AM

Re: [PATCH v3 1/2] mmc: Move mmc_delay() to include/linux/mmc/core.h

2012-09-24 Thread Arnd Bergmann
On Monday 24 September 2012, Chunhe Lan wrote: > OK. As you have mentioned, it would been modified to such: > > static inline void mmc_delay(unsigned int ms) > { > if (ms < 1000 / HZ) { > cond_resched(); > msleep(ms); > } else { >

Re: [RFC PATCH 00/13] DMA Engine support for AM33xx

2012-09-24 Thread Matt Porter
On Mon, Sep 24, 2012 at 11:26:55AM +, Hebbar, Gururaja wrote: > On Fri, Sep 21, 2012 at 23:52:11, Porter, Matt wrote: > > On Fri, Sep 21, 2012 at 08:27:07AM +, Hebbar, Gururaja wrote: > > > On Thu, Sep 20, 2012 at 20:13:33, Porter, Matt wrote: > > > > This series adds DMA Engine support for

RE: [RFC PATCH 00/13] DMA Engine support for AM33xx

2012-09-24 Thread Hebbar, Gururaja
On Fri, Sep 21, 2012 at 23:52:11, Porter, Matt wrote: > On Fri, Sep 21, 2012 at 08:27:07AM +, Hebbar, Gururaja wrote: > > On Thu, Sep 20, 2012 at 20:13:33, Porter, Matt wrote: > > > This series adds DMA Engine support for AM33xx, which uses > > > an EDMA DMAC. The EDMA DMAC has been previously

Re: [RFC/PATCH v2 3/3] mmc: sdhci: add asynchronous interrupt support

2012-09-24 Thread Ulf Hansson
On 21 September 2012 05:07, Kevin Liu wrote: > From: Kevin Liu > > If host support asynchronous interrupt and sdio device has enabled it, > then enable/disable asynchronous interrupt on host when enable/disable > sdio irq. > > Signed-off-by: Kevin Liu > --- > drivers/mmc/host/sdhci.c | 15 +++

Re: [RFC/PATCH v2 2/3] mmc: sdio: add asynchronous interrupt support on device

2012-09-24 Thread Ulf Hansson
On 21 September 2012 05:07, Kevin Liu wrote: > From: Kevin Liu > > Enable asynchronous interrupt on device by default if both host > and device support it and clock gating is allowed. > > If asynchronous interrupt is enabled, then no need to switch bus > width to 1bit before suspend. > > Signed-o

[PATCH v2 8/8] mmc: sdhci: enhance preset value function

2012-09-24 Thread Kevin Liu
From: Kevin Liu Preset value support was added by 4d55c5a1. But preset value is enabled after setting clock finished, which means the clock is still set by driver firstly and then switch to preset value at this point. So the driver setting beforehand is useless and unnecessary. What's more, driv

[PATCH v2 7/8] mmc: host: adjust uhs timing value

2012-09-24 Thread Kevin Liu
From: Kevin Liu Both of MMC_TIMING_LEGACY and MMC_TIMING_UHS_SDR12 are defined to 0. And ios->timing is set to MMC_TIMING_LEGACY during power up. But set_ios can't distinguish these two timing if host support spec 3.0. Just adjust timing values to be different can resolve this issue without any o

[PATCH v2 5/8] mmc: sdhci: fix null return check of regulator_get

2012-09-24 Thread Kevin Liu
From: Kevin Liu regulator_get() returns NULL when CONFIG_REGULATOR not defined, which should not print out the warning. Signed-off-by: Bin Wang Signed-off-by: Kevin Liu --- drivers/mmc/host/sdhci.c | 18 -- 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/driv

[PATCH v2 6/8] mmc: sdhci-pxav3: controller can't get base clock

2012-09-24 Thread Kevin Liu
From: Kevin Liu Enable the quirk SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN since SD_CAPABILITIES_1[15:8](BASE_FREQ) can't get correct base clock value. It return a fixed pre-set value like 200 on some sdhci-pxav3 based platforms like MMP3 while return 0 on the other sdhci-pxav3 based platforms. So we ena

[PATCH v2 4/8] mmc: sdhci: keep the saved clock var up to date

2012-09-24 Thread Kevin Liu
From: Kevin Liu The clock rate set to the sdh controller may not exactly as requested by the mmc core, this patch make the clock rate saved in the mmc_ios and sdhci_host updated with the actual setting as in the controller. Thus "/sys/kernel/debug/mmcx/ios" and card detect prints can show the cor

[PATCH v2 3/8] mmc: sdhci: refine code for sd clock disable/enable in set ios

2012-09-24 Thread Kevin Liu
From: Kevin Liu With preset value enabled, there are two continuous times of sd clock disable/enable. They can be combined into one to save time and make code cleaner. Signed-off-by: Kevin Liu --- drivers/mmc/host/sdhci.c | 29 + 1 files changed, 9 insertions(+),

[PATCH v2 2/8] mmc: sdhci: set regulator min/max voltage according to spec

2012-09-24 Thread Kevin Liu
From: Kevin Liu Use voltage range as below rather than a specific value 3.3v: (3.2v, 3.4v) 3.0v: (2.9v, 3.1v) 1.8v: (1.65v, 1.95v) Signed-off-by: Jialing Fu Signed-off-by: Kevin Liu --- drivers/mmc/host/sdhci.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff

[PATCH v2 1/8] mmc: sdhci: fix transfer mode setting bug for cmds w/o data transfer

2012-09-24 Thread Kevin Liu
From: Kevin Liu Commands without data transfer like cmd5/cmd7 will use previous transfer mode setting, which may lead to error since some bits may have been set unexpectedly. For example, cmd5 following cmd18/cmd25 will have timeout error since audo cmd23 has been enabled. Signed-off-by: Jialing

[PATCH v2 0/8] mmc: sdhci: fixes and enhancements

2012-09-24 Thread Kevin Liu
This patchset does as follows: [PATCH v2 1/8] mmc: sdhci: fix transfer mode setting bug for cmds w/o data transfer [PATCH v2 2/8] mmc: sdhci: set regulator min/max voltage according to spec [PATCH v2 3/8] mmc: sdhci: refine code for sd clock disable/enable in set ios [PATCH v2 4/8] mmc: sdhci: ke

[PATCH 1/3] mmc: sdhci: rename platform_8bit_width to platform_bus_width

2012-09-24 Thread Sascha Hauer
The 8bit in the function name is misleading. When set, it will be used to set the bus width, regardless of whether 8bit or another bus width is requested, so change the function name to platform_bus_width. Signed-off-by: Sascha Hauer --- drivers/mmc/host/sdhci-pci.c |4 ++-- drivers/mmc/ho

[PATCH] mmc: sdhci / i.MX esdhc buswidth patches

2012-09-24 Thread Sascha Hauer
The first patch is a generic sdhci driver cleanup change, the others are i.MX specific, adding 8bit bus support and fix version register readout. Sascha Sascha Hauer (3): mmc: sdhci: rename platform_8bit_width to platform_bus_

[PATCH 2/3] mmc: esdhc i.MX: Fix version register read

2012-09-24 Thread Sascha Hauer
The i.MX ESDHC controller version register is a mess: - i.MX25 has a v1 controller which identifies itself as v2 - i.MX6Q has a v3 controller which identifies itself as v4 - i.MX35,51,53 have v2 controllers which identify themselves correctly Additionally on i.MX the register is located at offset

[PATCH 3/3] mmc: esdhc i.MX: Support 8bit mode

2012-09-24 Thread Sascha Hauer
The i.MX esdhc has a nonstandard bit layout for the SDHCI_HOST_CONTROL register. To support 8bit bus width on i.MX populate the platform_bus_width callback. This is tested on an i.MX25, but should according to the datasheets work on the other i.MX using this hardware aswell. The i.MX6, while having