Re: [PATCH v2 1/3] mmc: core: Add mmc_regulator_set_vqmmc()

2014-12-15 Thread Andrew Bresticker
in mmc_regulator_set_vqmmc(). There are cases where the MMC core will try several different voltages and we don't want to pollute the logs. Signed-off-by: Doug Anderson diand...@chromium.org Looks good to me. Reviewed-by: Andrew Bresticker abres...@chromium.org -- To unsubscribe from this list: send

Re: [PATCH v2 2/3] mmc: dw_mmc: Use mmc_regulator_set_vqmmc in start_signal_voltage_switch

2014-12-15 Thread Andrew Bresticker
Hi Doug, On Mon, Dec 15, 2014 at 3:25 PM, Doug Anderson diand...@chromium.org wrote: We've introduced a new helper in the MMC core: mmc_regulator_set_vqmmc(). Let's use this in dw_mmc. Using this new helper has some advantages: 1. We get the mmc_regulator_set_vqmmc() behavior of trying to

Re: [PATCH v3 2/3] mmc: dw_mmc: Use mmc_regulator_set_vqmmc in start_signal_voltage_switch

2014-12-15 Thread Andrew Bresticker
-by: Andrew Bresticker abres...@chromium.org -- To unsubscribe from this list: send the line unsubscribe linux-mmc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] mmc: dw_mmc: Turn the card clock off at suspend time

2014-11-19 Thread Andrew Bresticker
Doug, On Wed, Nov 19, 2014 at 10:51 AM, Doug Anderson diand...@chromium.org wrote: Since the dw_mmc driver was first added to Linux it's had a TODO in it that we should turn off the card clock during suspend. I have no idea for sure why it wasn't done originally, but if I had to guess I'd

Re: [PATCH] mmc: dw_mmc: Turn the card clock off at suspend time

2014-11-19 Thread Andrew Bresticker
Doug, On Wed, Nov 19, 2014 at 11:30 AM, Doug Anderson diand...@chromium.org wrote: Andrew, On Wed, Nov 19, 2014 at 11:03 AM, Andrew Bresticker abres...@chromium.org wrote: Doug, On Wed, Nov 19, 2014 at 10:51 AM, Doug Anderson diand...@chromium.org wrote: Since the dw_mmc driver

[PATCH] mmc: dw_mmc: Add support for IMG Pistachio

2014-11-13 Thread Andrew Bresticker
Add support for the DW MMC host found on the Imagination Pistachio SoC. Like the DW MMC hosts found on SOCFPGA and Rockchip SoCs, the DW MMC host on Pistachio requires the use of SDMMC_CMD_USE_HOLD_REG. Signed-off-by: Andrew Bresticker abres...@chromium.org --- .../devicetree/bindings/mmc/img-dw

[PATCH v2 1/2] mmc: dw_mmc: Add dependency on DMA

2014-08-14 Thread Andrew Bresticker
The dw_mmc drivers rely on the DMA API, so update the Kconfig entry to depend on HAS_DMA. Since the drivers should build on any platform with DMA, allow the driver to compile tested on non-ARC/ARM platforms. Signed-off-by: Andrew Bresticker abres...@chromium.org --- drivers/mmc/host/Kconfig | 3

[PATCH v2 2/2] mmc: dw_mmc: Add support for MIPS

2014-08-14 Thread Andrew Bresticker
There are upcoming MIPS SoCs with dw_mmc hosts. Signed-off-by: Andrew Bresticker abres...@chromium.org --- drivers/mmc/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 385674b..6acc2ab 100644 --- a/drivers

[PATCH] mmc: dw_mmc: Remove architecture dependency

2014-08-13 Thread Andrew Bresticker
The dw_mmc host may also be present on non-ARC/ARM SoCs (e.g. MIPS) and the driver itself does not appear to depend on any particular architecture(s). Signed-off-by: Andrew Bresticker abres...@chromium.org --- drivers/mmc/host/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers

Re: [PATCH] mmc: dw_mmc: Remove architecture dependency

2014-08-13 Thread Andrew Bresticker
In general, it's best to have specific dependencies on the subsystem a driver uses. You probably need something like depends on HAS_IOMEM COMMON_CLK REGULATOR depends on COMPILE_TEST || ARC || ARM || MIPS to cover all the possible cases. The specific options are probably

Re: [PATCH v2 1/3] mmc: tegra: disable UHS modes

2014-05-22 Thread Andrew Bresticker
Hi Stephen/Andrew, I tried to include the v2 of patch1 and patch2 in PR I just sent to Chris - but needed to omit them due to conflicts. Could you please re-base them on top of my PR and resend them? I suppose Chris can take them separately once he pulled my PR. Will do. Thanks, Andrew --

[PATCH v3 2/2] mmc: tegra: fix reporting of base clock frequency

2014-05-22 Thread Andrew Bresticker
(), which simply does a clk_get_rate(), as the get_max_clock() callback. Signed-off-by: Andrew Bresticker abres...@chromium.org Tested-by: Stephen Warren swar...@nvidia.com Acked-by: Stephen Warren swar...@nvidia.com --- Changes from v2: - rebased on mmc-next Changes from v1: - fixed up commit message

[PATCH v3 1/2] mmc: tegra: disable UHS modes

2014-05-22 Thread Andrew Bresticker
Program TEGRA_SDHCI_VENDOR_MISC_CTRL so that UHS modes aren't advertised in SDHCI_CAPABILITIES_1. While the Tegra SDHCI controller does support these modes, they require Tegra-specific tuning and calibration routines which the driver does not support yet. Signed-off-by: Andrew Bresticker abres

Re: [PATCH RESEND] mmc: core: Improve support for deferred regulators

2014-04-29 Thread Andrew Bresticker
On Tue, Apr 29, 2014 at 10:00 AM, Tim Kryger tim.kry...@linaro.org wrote: On Fri, Apr 25, 2014 at 2:33 PM, Andrew Bresticker abres...@chromium.org wrote: - if (IS_ERR(supply)) - return PTR_ERR(supply); + if (IS_ERR(mmc-supply.vmmc)) { + if (PTR_ERR

Re: [PATCH RESEND] mmc: core: Improve support for deferred regulators

2014-04-25 Thread Andrew Bresticker
Hi Tim, It is important that callers of mmc_regulator_get_supply know if either vmmc or vqmmc are present but not yet available. To support this need, modify this function to return zero except when either of the regulator get operations fail with -EPROBE_DEFER. Current callers don't check

Re: [PATCH] sdhci: Forward EPROBE_DEFER on vmmc and vqmmc regulators

2014-04-16 Thread Andrew Bresticker
Hi Mike, On Mon, Apr 7, 2014 at 6:11 AM, Mike Looijmans mike.looijm...@topic.nl wrote: On 04/07/2014 02:51 PM, Arnd Bergmann wrote: On Monday 07 April 2014 14:32:20 Mike Looijmans wrote: On 04/07/2014 02:25 PM, Arnd Bergmann wrote: Judging from the kernel output, regulator_get_optional

Re: [PATCH 4/4] ARM: tegra: fix Venice2 VQMMC regulators

2014-04-16 Thread Andrew Bresticker
On Wed, Apr 16, 2014 at 9:19 AM, Stephen Warren swar...@wwwdotorg.org wrote: On 04/15/2014 06:29 PM, Andrew Bresticker wrote: sdhci@0,700b0600 { status = okay; bus-width = 8; + vqmmc-supply = vddio_1v8; It turns out this bit isn't needed

[PATCH v2 3/3] ARM: tegra: fix Venice2 SD card VQMMC supply

2014-04-16 Thread Andrew Bresticker
VDDIO_SDMMC3 is the VQMMC (I/O) supply, not the VMMC (core) supply, for the SD slot on Venice2. Signed-off-by: Andrew Bresticker abres...@chromium.org --- Changes from v1: - removed vqmmc supply for eMMC --- arch/arm/boot/dts/tegra124-venice2.dts | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2 2/3] mmc: tegra: fix reporting of base clock frequency

2014-04-16 Thread Andrew Bresticker
(), which simply does a clk_get_rate(), as the get_max_clock() callback. Signed-off-by: Andrew Bresticker abres...@chromium.org --- Changes from v1: - fixed up commit message per Stephen's suggestions --- drivers/mmc/host/sdhci-tegra.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions

[PATCH v2 0/3] Tegra SD/MMC fixes

2014-04-16 Thread Andrew Bresticker
in downstream kernels). This depends on the following patches which fix an issue where the eMMC's power supply gets toggled, causing eMMC failures: http://patchwork.ozlabs.org/patch/339386/ http://patchwork.ozlabs.org/patch/339710/ Tested on Tegra124-based Venice2 and Norrin boards. Andrew

[PATCH v2 1/3] mmc: tegra: disable UHS modes

2014-04-16 Thread Andrew Bresticker
Program TEGRA_SDHCI_VENDOR_MISC_CTRL so that UHS modes aren't advertised in SDHCI_CAPABILITIES_1. While the Tegra SDHCI controller does support these modes, they require Tegra-specific tuning and calibration routines which the driver does not support yet. Signed-off-by: Andrew Bresticker abres

Re: [PATCH 2/4] mmc: tegra: fix reporting of base clock frequency

2014-04-15 Thread Andrew Bresticker
On Tue, Apr 15, 2014 at 11:25 AM, Stephen Warren swar...@wwwdotorg.org wrote: On 04/14/2014 07:42 PM, Andrew Bresticker wrote: Tegra SDHCI controllers, by default, report a base clock frequency of 208Mhz in SDHCI_CAPABILTIES which may or may not be equal to the actual base clock frequency

Re: [PATCH 3/4] mmc: sdhci: defer probing on regulator_get_optional() failures

2014-04-15 Thread Andrew Bresticker
On Tue, Apr 15, 2014 at 12:03 PM, Tim Kryger tim.kry...@linaro.org wrote: On Mon, Apr 14, 2014 at 6:42 PM, Andrew Bresticker abres...@chromium.org wrote: If regulator_get_optional() returns EPROBE_DEFER, it indicates that the regulator may show up later (e.g. the DT property is present

Re: [PATCH 3/4] mmc: sdhci: defer probing on regulator_get_optional() failures

2014-04-15 Thread Andrew Bresticker
On Tue, Apr 15, 2014 at 11:28 AM, Stephen Warren swar...@wwwdotorg.org wrote: On 04/14/2014 07:42 PM, Andrew Bresticker wrote: If regulator_get_optional() returns EPROBE_DEFER, it indicates that the regulator may show up later (e.g. the DT property is present but the corresponding regulator

Re: [PATCH 3/4] mmc: sdhci: defer probing on regulator_get_optional() failures

2014-04-15 Thread Andrew Bresticker
On Mon, Apr 14, 2014 at 11:06 PM, Alexandre Courbot gnu...@gmail.com wrote: On Tue, Apr 15, 2014 at 10:42 AM, Andrew Bresticker abres...@chromium.org wrote: If regulator_get_optional() returns EPROBE_DEFER, it indicates that the regulator may show up later (e.g. the DT property is present

Re: [PATCH 4/4] ARM: tegra: fix Venice2 VQMMC regulators

2014-04-15 Thread Andrew Bresticker
sdhci@0,700b0600 { status = okay; bus-width = 8; + vqmmc-supply = vddio_1v8; It turns out this bit isn't needed as the initialization failures are instead due to +3V3_RUN toggling, which Stephen has fixed:

[PATCH 0/4] Tegra SD/MMC fixes

2014-04-14 Thread Andrew Bresticker
in downstream kernels). Tested on Tegra124-based Venice2 and Norrin boards. Andrew Bresticker (4): mmc: tegra: disable UHS modes mmc: tegra: fix reporting of base clock frequency mmc: sdhci: defer probing on regulator_get_optional() failures ARM: tegra: fix Venice2 VQMMC regulators arch/arm

[PATCH 2/4] mmc: tegra: fix reporting of base clock frequency

2014-04-14 Thread Andrew Bresticker
SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN and supply a get_max_clock() callback to get the actual rate of the base clock. Signed-off-by: Andrew Bresticker abres...@chromium.org --- drivers/mmc/host/sdhci-tegra.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b

[PATCH 4/4] ARM: tegra: fix Venice2 VQMMC regulators

2014-04-14 Thread Andrew Bresticker
VDDIO_SDMMC3 is the VQMMC supply, not the VMMC supply, for the SD slot. Add 1.8V_VDDIO as the VQMMC supply for the eMMC. Signed-off-by: Andrew Bresticker abres...@chromium.org --- arch/arm/boot/dts/tegra124-venice2.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch

[PATCH 1/4] mmc: tegra: disable UHS modes

2014-04-14 Thread Andrew Bresticker
Program TEGRA_SDHCI_VENDOR_MISC_CTRL so that UHS modes aren't advertised in SDHCI_CAPABILITIES_1. While the Tegra SDHCI controller does support these modes, they require Tegra-specific tuning and calibration routines which the driver does not support yet. Signed-off-by: Andrew Bresticker abres

[PATCH 3/4] mmc: sdhci: defer probing on regulator_get_optional() failures

2014-04-14 Thread Andrew Bresticker
leaks in the error paths in sdhci_add_host(). Signed-off-by: Andrew Bresticker abres...@chromium.org --- drivers/mmc/host/sdhci.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 9a79fc4..e87c5d3 100644

Re: [PATCH V2] mmc: sdhci: don't read cd-gpio while holding spinlock

2014-03-24 Thread Andrew Bresticker
On Sun, Mar 23, 2014 at 11:19 PM, Adrian Hunter adrian.hun...@intel.com wrote: On 24.03.2014 03:43, Andrew Bresticker wrote: sdhci_request() and sdhci_card_event() read the cd-gpio via mmc_gpio_get_cd(), which can sleep, while holding host-lock. This may result in the following BUG: BUG

[PATCH V2] mmc: sdhci: don't read cd-gpio while holding spinlock

2014-03-23 Thread Andrew Bresticker
acquiring the spinlock instead. Signed-off-by: Andrew Bresticker abres...@chromium.org --- drivers/mmc/host/sdhci.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 04a5e25..328b250 100644 --- a/drivers/mmc/host/sdhci.c

Re: [PATCH] mmc: sdhci: don't read cd-gpio while holding spinlock

2014-03-21 Thread Andrew Bresticker
On Thu, Mar 20, 2014 at 11:45 PM, Adrian Hunter adrian.hun...@intel.com wrote: On 20.03.2014 20:47, Andrew Bresticker wrote: mmc_request() reads the cd-gpio via mmc_gpio_get_cd(), which can sleep, while holding host-lock. This may result in the following BUG: BUG: spinlock wrong CPU on CPU

[PATCH] mmc: sdhci: don't read cd-gpio while holding spinlock

2014-03-20 Thread Andrew Bresticker
instead. Signed-off-by: Andrew Bresticker abres...@chromium.org --- drivers/mmc/host/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 04a5e25..f2ef978 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c

[PATCH] mmc: sdhci: fix possible scheduling while atomic

2014-01-17 Thread Andrew Bresticker
sdhci_execute_tuning() takes host-lock without disabling interrupts. Use spin_lock_irq{save,restore} instead so that we avoid taking an interrupt and scheduling while holding host-lock. Signed-off-by: Andrew Bresticker abres...@chromium.org --- drivers/mmc/host/sdhci.c | 13 +++-- 1 file

Re: [PATCH] mmc: sdhci: fix possible scheduling while atomic

2014-01-17 Thread Andrew Bresticker
On Fri, Jan 17, 2014 at 2:58 PM, Philip Rakity prak...@nvidia.com wrote: On Jan 17, 2014, at 7:57 PM, Andrew Bresticker abres...@chromium.org wrote: sdhci_execute_tuning() takes host-lock without disabling interrupts. Use spin_lock_irq{save,restore} instead so that we avoid taking

Re: [PATCH] mmc: sdhci: fix possible scheduling while atomic

2014-01-17 Thread Andrew Bresticker
wrote: On Jan 17, 2014, at 7:57 PM, Andrew Bresticker abres...@chromium.org wrote: sdhci_execute_tuning() takes host-lock without disabling interrupts. Use spin_lock_irq{save,restore} instead so that we avoid taking an interrupt and scheduling while holding host-lock. Signed-off-by: Andrew

Re: [PATCH] mmc: sdhci: fix possible scheduling while atomic

2014-01-17 Thread Andrew Bresticker
On Fri, Jan 17, 2014 at 3:40 PM, Chris Ball ch...@printf.net wrote: Hi, adding Aisheng, On Fri, Jan 17 2014, Andrew Bresticker wrote: On Fri, Jan 17, 2014 at 3:11 PM, John Tobias john.tobias...@gmail.com wrote: There's an existing patch for that... http://www.spinics.net/lists/arm-kernel