[PATCH 2/5] mmc: core: call pm_runtime_put_sync in pm_runtime_get_sync failed case

2013-02-27 Thread Li Fei
Even in failed case of pm_runtime_get_sync, the usage_count is incremented. In order to keep the usage_count with correct value and runtime power management to behave correctly, call pm_runtime_put(_sync) in such case. Signed-off-by Liu Chuansheng Signed-off-by: Li Fei --- drivers/mmc/core/sdi

[PATCH v7 1/2] mmc: core: enhance card removal judgement for slow removal

2013-02-27 Thread Kevin Liu
Function _mmc_detect_card_removed will be called to know whether the card is still present when host->bus_ops->detect is called. In current code, the return value of this function generally only depend on the result of sending cmd13 to card, which may not safe for card with detection support like s

Re: question for mmc_test

2013-02-27 Thread Andy Shevchenko
On Wed, 2013-02-27 at 22:15 -0800, Kevin Liu wrote: > Andy, Added linux-mmc@ ML. > I never used mmc_test.c and I have several questions for it. > 1. I have 3 sdh controllers (sd, emmc, sdio) in system, then which host does > mmc_test test? > 2. I found mmc_test always bind to sdio, so fail to a

[PATCH v2 2/2] mmc: sdhci: add function get_cd

2013-02-27 Thread Kevin Liu
1. mmc_rescan will call get_cd to know whether the card is present before mmc_rescan_try_freq to avoid useless trials during card removal or start host is called when card is not present. 2. get_cd need to be checked to resolve slow card removal issue. Signed-off-by: Kevin Liu --- drivers/mmc/ho

[PATCH v6 1/2] mmc: core: enhance card removal judgement for slow removal

2013-02-27 Thread Kevin Liu
Function _mmc_detect_card_removed will be called to know whether the card is still present when host->bus_ops->detect is called. In current code, the return value of this function generally only depend on the result of sending cmd13 to card, which may not safe for card with detection support like s

Re: [PATCH 2/2] mmc: dw_mmc: exynos: Add pinctrl support

2013-02-27 Thread Linus Walleij
On Mon, Feb 25, 2013 at 5:39 AM, Sachin Kamat wrote: > Just a small clarification needed in this regard. > On systems that do not use pinctrl and need to configure the gpios, we > used to check the return value of devm_pinctrl_get_select_default() > for error and then parse the dt file for gpios

Re: [PATCH 04/12] mmc: mxs-mmc: move to use generic DMA helper

2013-02-27 Thread Arnd Bergmann
On Wednesday 27 February 2013, Shawn Guo wrote: > Required properties: > - compatible: Should be "fsl,-mmc". The supported chips include >imx23 and imx28. > -- interrupts: Should contain ERROR and DMA interrupts > -- fsl,ssp-dma-channel: APBH DMA channel for the SSP > +- interrupts: Should c

[PATCH] mmc: Add in support to expose PRV for v4 MMCs

2013-02-27 Thread Bernie Thompson
The JEDEC MMC v4 spec defines a new PRV value in place of the original fwrev and hwrev specified in v1. We can expose this in the kernel to enable user space to more easily determine the product revision of a given MMC. Signed-off-by: Bernie Thompson --- Documentation/mmc/mmc-dev-attrs.txt | 1 +

[PATCH 04/12] mmc: mxs-mmc: move to use generic DMA helper

2013-02-27 Thread Shawn Guo
With the generic DMA device tree helper supported by mxs-dma driver, client devices only need to call dma_request_slave_channel() for requesting a DMA channel from dmaengine. Since mxs is a DT only platform now, along with the changes, the non-DT case checking in probe function also gets cleaned u

Re: [Question] What does SDHCI_QUIRK_BROKEN_CARD_DETECTION stands for?

2013-02-27 Thread Kevin Liu
2013/2/27 Chris Ball : > Hi, > > On Wed, Feb 27 2013, Kevin Liu wrote: >> Thanks for quick answer! >> Then if broken-cd/SDHCI_QUIRK_BROKEN_CARD_DETECTION is selected, can I >> use host controller Present State Register[18] (offset 0x24) to know >> card status (present or not)? > > sdhci.c: > >

Re: [Question] What does SDHCI_QUIRK_BROKEN_CARD_DETECTION stands for?

2013-02-27 Thread Chris Ball
Hi, On Wed, Feb 27 2013, Kevin Liu wrote: > Thanks for quick answer! > Then if broken-cd/SDHCI_QUIRK_BROKEN_CARD_DETECTION is selected, can I > use host controller Present State Register[18] (offset 0x24) to know > card status (present or not)? sdhci.c: present = mmc_gpio_get_cd(host->mm

Re: [Question] What does SDHCI_QUIRK_BROKEN_CARD_DETECTION stands for?

2013-02-27 Thread Kevin Liu
2013/2/27 Chris Ball : > Hi, > > The CC: list seems excessively long here. > > On Wed, Feb 27 2013, Kevin Liu wrote: >> Who can help to answer below question? >> Which statement is true if quirk SDHCI_QUIRK_BROKEN_CARD_DETECTION is >> selected? >> 1. The host controller Present State Register[18]

Re: [PATCH v4 5/5] ARM: davinci: da850: override mmc DT node device name

2013-02-27 Thread Rob Herring
On 02/15/2013 12:22 AM, Manjunathappa, Prakash wrote: > Populate OF_DEV_AUXDATA with desired device name expected by > davinci_mmc driver. Without this clk_get of davinci_mmc DT driver > fails. > > Signed-off-by: Manjunathappa, Prakash > Cc: linux-mmc@vger.kernel.org > Cc: linux-arm-ker...@lists.

Re: [PATCH v4 1/5] ARM: davinci: mmc: derive version information from device name

2013-02-27 Thread Sekhar Nori
On 2/15/2013 11:51 AM, Manjunathappa, Prakash wrote: > Remove specifying mmc controller IP version information via platform > data, instead specify device name so that driver derives it from > platform_device_id table. Also change the clock node name to match > the changed dev_id. > Tested on da850

Re: [PATCH v4 3/5] mmc: davinci_mmc: add DT support

2013-02-27 Thread Sekhar Nori
On 2/15/2013 11:52 AM, Manjunathappa, Prakash wrote: > Adds device tree support for davinci_mmc. Also add binding documentation. > As of now in non-dma PIO mode and without GPIO card_detect/write_protect > option because of dependencies on EDMA and GPIO module DT support. > > Signed-off-by: Manjun

[PATCH] mmc: core: update the power up time according to spec

2013-02-27 Thread Kevin Liu
According to spec, the maximum power up time is 35ms. Please refer to below spec for sd and emmc: "SD Physical Layer Specification 4.10, chapter 6.4.1.2 Power Up Time of Host." "JEDEC 4.5.1, chapter 10.3.3 Power supply voltages." Signed-off-by: Kevin Liu --- drivers/mmc/core/core.c |5 ++---

[PATCH v5 1/2] mmc: core: enhance card removal judgement for slow removal

2013-02-27 Thread Kevin Liu
Function _mmc_detect_card_removed will be called to know whether the card is still present when host->bus_ops->detect is called. In current code, the return value of this function generally only depend on the result of sending cmd13 to card, which may not safe for card with detection support like s