RE: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23

2015-08-25 Thread LIYONG
Hi Uffe, The bool variable do_rel_wr is used on line 1408 and line 1436: if (brq->data.blocks> 1 || do_rel_wr) { /* SPI multiblock writes terminate using a special * token, not a STOP_TRANSMISSION request. */ if (do_rel_wr)

Re: [PATCH v2] mmc: host: use of_property_read_bool()

2015-08-25 Thread Sergei Shtylyov
On 08/26/2015 12:19 AM, Ulf Hansson wrote: Use more compact of_property_read_bool() calls instead of the of_find_property() calls. Signed-off-by: Sergei Shtylyov Thanks, applied for next! Thanks to you! :-) Next, time please run checkpatch to remove errors/warnings. Hum, I j

Re: [PATCH v2] mmc: host: use of_property_read_bool()

2015-08-25 Thread Ulf Hansson
On 25 August 2015 at 18:32, Sergei Shtylyov wrote: > On 08/25/2015 03:05 PM, Ulf Hansson wrote: > >>> Use more compact of_property_read_bool() calls instead of the >>> of_find_property() >>> calls. > > >>> Signed-off-by: Sergei Shtylyov > > >> Thanks, applied for next! > > >Thanks to you! :-)

Re: [PATCH v2] mmc: host: use of_property_read_bool()

2015-08-25 Thread Sergei Shtylyov
On 08/25/2015 03:05 PM, Ulf Hansson wrote: Use more compact of_property_read_bool() calls instead of the of_find_property() calls. Signed-off-by: Sergei Shtylyov Thanks, applied for next! Thanks to you! :-) Next, time please run checkpatch to remove errors/warnings. Hum, I jus

Re: [PATCH] mmc: sdhci-of-at91: fix platform_no_drv_owner.cocci warnings

2015-08-25 Thread Ulf Hansson
+linux-mmc On 25 August 2015 at 16:13, kbuild test robot wrote: > drivers/mmc/host/sdhci-of-at91.c:180:3-8: No need to set .owner here. The > core will do it. > > Remove .owner field if calls are used which set it automatically > > Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocc

Re: [PATCH 01/11] mmc: omap: fix error return code

2015-08-25 Thread Ulf Hansson
On 23 August 2015 at 02:11, Julia Lawall wrote: > Return a negative error code on failure. > > A simplified version of the semantic match that finds this problem is as > follows: (http://coccinelle.lip6.fr/) > > // > @@ > identifier ret; expression e1,e2; > @@ > ( > if (\(ret < 0\|ret != 0\)) >

Re: [PATCH 06/11] mmc: usdhi6rol0: fix error return code

2015-08-25 Thread Ulf Hansson
On 23 August 2015 at 02:11, Julia Lawall wrote: > Propagate error code on failure. > > A simplified version of the semantic match that finds this problem is as > follows: (http://coccinelle.lip6.fr/) > > // > @@ > identifier ret; expression e1,e2; > @@ > ( > if (\(ret < 0\|ret != 0\)) > { ... re

Re: [REGRESSION] dereference NULL pointer when removing mmc card

2015-08-25 Thread Ulf Hansson
On 22 August 2015 at 09:17, Igor Gnatenko wrote: > mmc0: card 59b4 removed > BUG: unable to handle kernel NULL pointer dereference at 0558 > IP: [] __blkg_lookup+0x26/0x70 > PGD 0 > Oops: [#1] SMP > Modules linked in: rfcomm cmac ccm fuse nf_conntrack_netbios_ns > nf_conntrack_bro

Re: ASPM issues with realtek PCIe card reader 5287 / RTL8411B

2015-08-25 Thread Ulf Hansson
+ Micky Ching, Roger Tseng, Wei Wang, On 23 August 2015 at 20:07, Oliver Freyermuth wrote: > Dear MMC-experts, > > I hope this is the correct place to ask, feel free to direct me to a > bugtracker. If answering, please include me directly (I'm not subscribed). > > I have a Clevo W230SD laptop (s

Re: [PATCH repost] mmc: sh_mmcif: Fix suspend process

2015-08-25 Thread Ulf Hansson
On 23 August 2015 at 14:58, Yoshihiro Kaneko wrote: > From: Koji Matsuoka > > The clock should be enable when SDHI registers are accessed. Yes, correct. But... > > Signed-off-by: Koji Matsuoka > Signed-off-by: Yoshihiro Kaneko > --- > > This patch is based on mmc-next branch of Ulf Hansson's

Re: [PATCH v2 16/16] mmc: host: omap_hsmmc: use "mmc_of_parse_voltage" to get ocr_avail

2015-08-25 Thread Ulf Hansson
On 3 August 2015 at 14:26, Kishon Vijay Abraham I wrote: > From: Roger Quadros > > For platforms that doesn't have explicit regulator control in MMC, > populate voltage-ranges in MMC device tree node and use > mmc_of_parse_voltage to get ocr_avail I don't like this. If we are able to fetch the

Re: [PATCH v2] mmc: sdhci-of-esdhc: add workaround for pre divider initial value

2015-08-25 Thread Ulf Hansson
On 25 August 2015 at 16:00, Joakim Tjernlund wrote: > On Tue, 2015-08-25 at 15:56 +0200, Ulf Hansson wrote: >> On 25 August 2015 at 14:21, Joakim Tjernlund >> wrote: >> > On Tue, 2015-08-25 at 14:05 +0200, Ulf Hansson wrote: >> > > On 11 August 2015 at 04:53, Yangbo Lu wrote: >> > > > For eSDHC(

Re: [PATCH v2 07/11] mmc: host: omap_hsmmc: add tuning support

2015-08-25 Thread Ulf Hansson
On 25 August 2015 at 11:05, Kishon Vijay Abraham I wrote: > From: Balaji T K > > MMC tuning procedure is required to support SD card > UHS1-SDR104 mode and EMMC HS200 mode. > > The tuning function omap_execute_tuning() will only > be called by the MMC/SD core if the corresponding > speed modes ar

Re: [PATCH v2] mmc: sdhci-of-esdhc: add workaround for pre divider initial value

2015-08-25 Thread Joakim Tjernlund
On Tue, 2015-08-25 at 15:56 +0200, Ulf Hansson wrote: > On 25 August 2015 at 14:21, Joakim Tjernlund > wrote: > > On Tue, 2015-08-25 at 14:05 +0200, Ulf Hansson wrote: > > > On 11 August 2015 at 04:53, Yangbo Lu wrote: > > > > For eSDHC(version < 2.3), the pre divider only could divide base clock

Re: [PATCH v2] mmc: sunxi: Don't start commands while the card is busy

2015-08-25 Thread Ulf Hansson
On 25 August 2015 at 14:09, Hans de Goede wrote: > Hi, > > > On 25-08-15 14:05, Ulf Hansson wrote: >> >> On 1 August 2015 at 11:01, Hans de Goede wrote: >>> >>> Hi, >>> >>> On 21-07-15 14:15, Ulf Hansson wrote: On 10 July 2015 at 17:14, Hans de Goede wrote: > > > Some

Re: [PATCH v2] mmc: sdhci-of-esdhc: add workaround for pre divider initial value

2015-08-25 Thread Ulf Hansson
On 25 August 2015 at 14:21, Joakim Tjernlund wrote: > On Tue, 2015-08-25 at 14:05 +0200, Ulf Hansson wrote: >> On 11 August 2015 at 04:53, Yangbo Lu wrote: >> > For eSDHC(version < 2.3), the pre divider only could divide base clock >> > by 2 at least. Add workaround for this to avoid unexpected i

Re: [PATCH v2] mmc: sdhci-of-esdhc: add workaround for pre divider initial value

2015-08-25 Thread Joakim Tjernlund
On Tue, 2015-08-25 at 14:05 +0200, Ulf Hansson wrote: > On 11 August 2015 at 04:53, Yangbo Lu wrote: > > For eSDHC(version < 2.3), the pre divider only could divide base clock > > by 2 at least. Add workaround for this to avoid unexpected issue. > > > > Signed-off-by: Yangbo Lu > > Thanks, appl

Re: Initial signal voltage ?

2015-08-25 Thread Joakim Tjernlund
On Tue, 2015-08-25 at 14:05 +0200, Ulf Hansson wrote: > On 10 August 2015 at 18:50, Joakim Tjernlund > wrote: > > in mmc_power_up() we have: > > /* Try to set signal voltage to 3.3V but fall back to 1.8v or 1.2v > > */ > > if (__mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330)

Re: [PATCH v2] mmc: sunxi: Don't start commands while the card is busy

2015-08-25 Thread Hans de Goede
Hi, On 25-08-15 14:05, Ulf Hansson wrote: On 1 August 2015 at 11:01, Hans de Goede wrote: Hi, On 21-07-15 14:15, Ulf Hansson wrote: On 10 July 2015 at 17:14, Hans de Goede wrote: Some sdio wifi modules have not been working reliable with the sunxi-mmc host code. This turns out to be caus

Re: [linux-sunxi] [PATCH v3 1/3] mmc: sunxi: fix timeout in sunxi_mmc_oclk_onoff

2015-08-25 Thread Ulf Hansson
On 12 August 2015 at 16:49, Hans de Goede wrote: > Hi, > > On 08/12/2015 03:29 PM, Michal Suchanek wrote: >> >> The 250ms timeout is too short. >> >> On my system enabling the oclk takes under 50ms and disabling slightly >> over 100ms when idle. Under load disabling the clock can take over >> 350m

Re: [PATCH v1] mmc: block: skip trim for some kingston eMMCs

2015-08-25 Thread Ulf Hansson
On 12 August 2015 at 07:08, Shawn Lin wrote: > For some mass production of kingston eMMCs which adopt Phison's > firmware will meet an unrecoverable data conrruption occasionally > if performing trim due to a firmware bug confirmed by vendor. We > found it on Intel-C3230RK platform. So we add fixu

Re: [PATCH] mmc: atmel-mci: remove useless include

2015-08-25 Thread Ulf Hansson
On 10 August 2015 at 16:26, Alexandre Belloni wrote: > Definitions from linux/platform_data/atmel.h are not used, remove the > include. > > Signed-off-by: Alexandre Belloni Thanks, applied for next! Kind regards Uffe > --- > drivers/mmc/host/atmel-mci.c | 1 - > 1 file changed, 1 deletion(-)

Re: [PATCH] mmc: block: disable the reliable write If the card does not support CMD23

2015-08-25 Thread Ulf Hansson
On 14 August 2015 at 09:30, wrote: > From: Yong Li > > Signed-off-by: Yong Li > --- > drivers/mmc/card/block.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c > index 452782b..d9e3c45 100644 > --- a/drivers/mmc/card

Re: [PATCH v3] mmc: sdhci: also get preset value and driver type for MMC_DDR52

2015-08-25 Thread Ulf Hansson
On 18 August 2015 at 10:21, Jisheng Zhang wrote: > commit bb8175a8aa42 ("mmc: sdhci: clarify DDR timing mode between > SD-UHS and eMMC") added MMC_DDR52 as eMMC's DDR mode to be > distinguished from SD-UHS, but it missed setting driver type for > MMC_DDR52 timing mode. > > So sometimes we get the

Re: [PATCH] pwrseq: bind pinctrl pins before using the gpios

2015-08-25 Thread Ulf Hansson
On 17 August 2015 at 13:58, Srinivas Kandagatla wrote: > Some of the pin-controllers like the Qualcomms "qcom,pm8921", which > require a pinconf to be setup to use pins as gpios. Using the pins > directly without pinconf setup would result in incorrect output voltage > or load settings. On the oth

Re: [RFC PATCH v1] mmc: sdhci-of-arasan: Add the support for sdhci-5.1

2015-08-25 Thread Ulf Hansson
On 18 August 2015 at 01:40, Shawn Lin wrote: > Hi Ulf, > > > On 2015/8/12 13:07, Michal Simek wrote: >> >> +linux-mmc >> >> On 08/11/2015 04:53 PM, Michal Simek wrote: >>> >>> On 08/11/2015 09:46 AM, Shawn Lin wrote: This patch adds the compatible string in sdhci-of-arasan.c to supp

Re: [PATCH 1/4] mmc: mediatek: Add online-tuning support of EMMC/SD

2015-08-25 Thread Ulf Hansson
On 17 August 2015 at 14:01, Chaotian Jing wrote: > Hi Ulf, > Thanks, please see my comment: > On Mon, 2015-08-17 at 13:31 +0200, Ulf Hansson wrote: >> On 12 August 2015 at 10:24, Chaotian Jing wrote: >> > Schedule a workqueue to do tuning when CRC error >> > Call mmc_hw_reset to re-init card when

Re: [PATCH 3/3] mmc: usdhi6rol0: fix ack register write

2015-08-25 Thread Ulf Hansson
On 19 August 2015 at 15:41, Rabin Vincent wrote: > The intent appears to be to clear only the bits which are set in status > (by setting them to zero in the ack write), like in the other interrupt > handlers, and not to always clear everything (by always writing zero). > Use the correct not operat

Re: [PATCH] mmc: sirf: corrent quirk according to real chips

2015-08-25 Thread Ulf Hansson
On 12 August 2015 at 08:59, Barry Song <21cn...@gmail.com> wrote: > From: Barry Song > > the current quirk set is for an old FPGA, and this patch corrects > quirks according to real SoC. > > Signed-off-by: Barry Song Thanks, applied for next. I took the liberty of changing the prefix of commit m

Re: [PATCH v2 0/3] introduce driver for the Atmel SDMMC

2015-08-25 Thread Ulf Hansson
On 29 July 2015 at 16:22, Ludovic Desroches wrote: > Hi, > > This set of patches introduce a driver for the new Atmel SDMMC device avaible > on SAMA5D2 SoC. > > There is also a resend of an old patch which has not been taken. Ulf asked > for some reviews since it could impact all sdhci devices but

Re: [PATCH 2/3] mmc: usdhi6rol0: fix NULL pointer deref in debug print

2015-08-25 Thread Ulf Hansson
On 19 August 2015 at 15:41, Rabin Vincent wrote: > host->sg is only set when we're transferring multiple blocks. Check for > its availibility before dereferencing it in the timeout work debug > print. > > Signed-off-by: Rabin Vincent Thanks, applied for next! Kind regards Uffe > --- > drive

Re: [PATCH 1/3] mmc: usdhi6rol0: handle probe deferral for regulator

2015-08-25 Thread Ulf Hansson
On 19 August 2015 at 15:41, Rabin Vincent wrote: > We ignore errors from mmc_regulator_get_supply() because the usage of > the regulators is optional for the driver, but we still need to check > for and handle EPROBE_DEFER, like it's done in for example dw_mmc. > Otherwise we might end up not usin

Re: Initial signal voltage ?

2015-08-25 Thread Ulf Hansson
On 10 August 2015 at 18:50, Joakim Tjernlund wrote: > in mmc_power_up() we have: > /* Try to set signal voltage to 3.3V but fall back to 1.8v or 1.2v */ > if (__mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330) == 0) > dev_err(mmc_dev(host), "Initial signal volta

Re: [PATCH v6 0/6] mmc: imx: a few fixes and new feature

2015-08-25 Thread Ulf Hansson
On 11 August 2015 at 13:38, Haibo Chen wrote: > Changes for v6: > -remove duplicate code in esdhc_set_uhs_signaling(). > -fix a typo for patch-2. > -make commit log of patch-3 more specific. > > Haibo Chen (6): > mmc: sdhci-esdhc-imx: add imx7d support and support HS400 > mmc: sdhci-esdhc-imx:

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

2015-08-25 Thread 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 10:41, Barry Song <21cn...@gmail.com> wrote: >>> From: Weijun Yang >>> >>> As SD Specifications Part1 Physical Layer Specification Version >>> 3.01 says, CMD19 tuning

Re: [PATCH] mmc: sdhci: fix dma memory leak in sdhci_pre_req()

2015-08-25 Thread Ulf Hansson
On 25 August 2015 at 04:02, Haibo Chen wrote: > Currently one mrq->data maybe execute dma_map_sg() twice > when mmc subsystem prepare over one new request, and the > following log show up: > sdhci[sdhci_pre_dma_transfer] invalid cookie: 24, next-cookie 25 > > In this condition, mrq->date m

Re: [PATCH v2] mmc: sdhci-of-esdhc: add workaround for pre divider initial value

2015-08-25 Thread Ulf Hansson
On 11 August 2015 at 04:53, Yangbo Lu wrote: > For eSDHC(version < 2.3), the pre divider only could divide base clock > by 2 at least. Add workaround for this to avoid unexpected issue. > > Signed-off-by: Yangbo Lu Thanks, applied for next! Kind regards Uffe > --- > drivers/mmc/host/sdhci-of-

Re: [PATCH v2] mmc: sunxi: Don't start commands while the card is busy

2015-08-25 Thread Ulf Hansson
On 1 August 2015 at 11:01, Hans de Goede wrote: > Hi, > > On 21-07-15 14:15, Ulf Hansson wrote: >> >> On 10 July 2015 at 17:14, Hans de Goede wrote: >>> >>> Some sdio wifi modules have not been working reliable with the sunxi-mmc >>> host code. This turns out to be caused by it starting new comma

Re: [PATCH] mmc: core: Fixed bug in one erase-group budget TRIM

2015-08-25 Thread Ulf Hansson
On 4 August 2015 at 08:58, Robin van der Gracht wrote: > When requesting a trim for several bytes, everything up to the next > erase-group is erased. This causes data corruption. > > Signed-off-by: Robin van der Gracht Thanks, applied for next! Kind regards Uffe > --- > drivers/mmc/core/core.

Re: [PATCH] mmc: sdhci-pci: set the clear transfer mode register quirk for O2Micro

2015-08-25 Thread Ulf Hansson
On 5 August 2015 at 07:46, Adam Lee wrote: > On Mon, Aug 03, 2015 at 02:33:28PM +0800, Adam Lee wrote: >> This patch fixes MMC not working issue on O2Micro/BayHub Host, which >> requires transfer mode register to be cleared when sending no DMA >> command. >> >> Signed-off-by: Peter Guo >> Signed-

Re: [RFC PATCH v3] mmc: sleep notification

2015-08-25 Thread Ulf Hansson
[...] >> >> > The only case where HPI is used in this patch - is during >> >> > sleep_notify >> >> timeout error. >> >> >> >> Why? >> > >> > In case of timeout error, we would like to handle it by sending HPI - to >> > let >> device interrupt/stop the prg state. >> >> Is that according to the spe

Re: [PATCH v2] mmc: host: use of_property_read_bool()

2015-08-25 Thread Ulf Hansson
On 7 August 2015 at 00:06, Sergei Shtylyov wrote: > Use more compact of_property_read_bool() calls instead of the > of_find_property() > calls. > > Signed-off-by: Sergei Shtylyov Thanks, applied for next! Next, time please run checkpatch to remove errors/warnings. Kind regards Uffe > > --- >

Re: [PATCH 3/3] mmc: sdhci-of-esdhc: add workaround for T4240 incorrect HOSTVER value

2015-08-25 Thread Ulf Hansson
On 27 July 2015 at 17:57, Scott Wood wrote: > On Mon, 2015-07-27 at 09:58 +0200, Ulf Hansson wrote: >> On 25 July 2015 at 04:27, Scott Wood wrote: >> > On Tue, 2015-07-21 at 15:02 +0200, Ulf Hansson wrote: >> > > On 21 July 2015 at 11:45, Yangbo Lu wrote: >> > > > For T4240-R1.0-R2.0, the HOSTVE

Re: [PATCH v3 1/2] mmc: sdhci: fix abort due to missing runtime PM

2015-08-25 Thread Ulf Hansson
On 30 July 2015 at 13:37, Stefan Agner wrote: > Hi Ulf, > > What is the status on that? > > -- > Stefan > > On 2015-05-21 09:15, Stefan Agner wrote: >> When using i.MX ESDHC driver, while entering suspend while the device >> is in runtime PM, the sdhci_(suspend|resume)_host function are called >>

Re: [PATCH] mmc: Kconfig: Add dependency on GPIOLIB for MMC_SDHCI

2015-08-25 Thread Ulf Hansson
On 6 August 2015 at 07:39, Michal Simek wrote: > Add GPIOLIB dependency for MMC_SDHCI. > > Problem was observed after adding the patch > "mmc: sdhci-of-arasan: Call OF parsing for MMC" > (sha1: 16b23787fc709fe60c5d2bd05927b1a3da33d4e9) which calls > mmc_of_parse() -> mmc_gpiod_request_cd() (slot-g

Re: [PATCH V3 0/8 RESEND] Add password protected lock/unlock support for SD/MMC

2015-08-25 Thread Ulf Hansson
[...] >> >> I lot have happened since 2006 and I don't know the history to why >> this was rejected. Was it just that nobody cares to review it or >> something else? > > It was never rejected, it just didn't get enough review interest. Okay, I will do my best to make sure we get consensus in how

Re: [PATCH v2] mmc: tmio: Fix timeout value for command request

2015-08-25 Thread Ulf Hansson
On 19 July 2015 at 18:39, Yoshihiro Kaneko wrote: > From: Takeshi Kihara > > Fix the problem which timeout occurs at the time of command request with > several cards. > > The timeout value was insufficient as a verification of several cards, > so it was changed 5 seconds from 2 seconds. > > Signe

Re: Re: [v4,1/6] mmc: dt: add DT binding for big endian controller

2015-08-25 Thread Ulf Hansson
On 25 August 2015 at 12:27, Lu Y.B. wrote: > Please see my comments below. > >> -Original Message- >> From: Li Yang-Leo-R58472 >> Sent: Tuesday, August 25, 2015 6:56 AM >> To: Lu Yangbo-B47093 >> Cc: linux-mmc@vger.kernel.org; ulf.hans...@linaro.org; >> devicet...@vger.kernel.org >> Subjec

Re: [PATCH v2 00/16] omap_hsmmc: regulator usage cleanup and fixes

2015-08-25 Thread Ulf Hansson
On 3 August 2015 at 14:26, Kishon Vijay Abraham I wrote: > Changes from v1: > *) return on -EPROBE_DEFER and other fatal errors. (Don't return only >if the return value is -ENODEV) > *) Remove the beagle x15 dts patch. It can be part of a different >series. > *) Avoid using regulator_is_en

[PATCH v2 01/11] mmc: host: omap_hsmmc: Support vmmc_aux to switch to 1.8v

2015-08-25 Thread Kishon Vijay Abraham I
Add support for vmmc_aux to switch to 1.8v. Also use "iov" instead of "vdd" to indicate io voltage. This is in preparation for adding support for io signal voltage switch. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/omap_hsmmc.c | 48 +++-- 1

[PATCH v2 02/11] mmc: host: omap_hsmmc: separate setting voltage capabilities from bus power

2015-08-25 Thread Kishon Vijay Abraham I
Added a separate function to set the voltage capabilities of the host controller. Voltage capabilities should be set only once during controller initialization but bus power can be changed every time there is a voltage switch and whenever a different card is inserted. This allows omap_hsmmc_conf_bu

[PATCH v2 04/11] mmc: host: omap_hsmmc: add voltage switch support for UHS SD card

2015-08-25 Thread Kishon Vijay Abraham I
From: Balaji T K UHS sd card i/o data line can operate at 3V and 1.8V on UHS speed modes. Add support for signal voltage switch and check for card_busy. Signed-off-by: Balaji T K Signed-off-by: Sourav Poddar [kis...@ti.com : cleanup the voltage switch sequence] Signed-off-by: Kishon Vijay Abra

[PATCH v2 06/11] mmc: host: omap_hsmmc: set timing in the UHSMS field

2015-08-25 Thread Kishon Vijay Abraham I
Add a separate function to set the UHSMS field to one of SDR104, SDR50, DDR50, SDR25 or SDR12 depending on the inserted SD card. This is required for tuning to succeed in the case of SDR104/HS200 or SDR50. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/omap_hsmmc.c | 49 +++

[PATCH v2 05/11] mmc: host: omap_hsmmc: set clk rate to the max frequency

2015-08-25 Thread Kishon Vijay Abraham I
Set the clock rate of the functional clock to the max frequency that is passed to the driver either using pdata or dt. Also remove unnecessary setting of host->fclk to NULL. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/omap_hsmmc.c | 13 - 1 file changed, 12 insertio

[PATCH v2 03/11] mmc: host: omap_hsmmc: program HCTL based on signal_voltage set by mmc core

2015-08-25 Thread Kishon Vijay Abraham I
HCTL is now set based on ios.signal_voltage set by mmc core and not hardcoded to 3V0 if OMAP_HSMMC_SUPPORTS_DUAL_VOLT is set. If OMAP_HSMMC_SUPPORTS_DUAL_VOLT is set, it means HCTL can be set to either 3V0 or 1V8. And it should be set to 3V0 or 1V8 depending on ios.signal_voltage. Also it is now se

[PATCH v2 11/11] mmc: host: omap_hsmmc: add software timer when timeout greater than hardware capablility

2015-08-25 Thread Kishon Vijay Abraham I
From: Mugunthan V N DRA7 Errata No i834: When using high speed HS200 and SDR104 cards, the functional clock for MMC module will be 192MHz. At this frequency, the maximum obtainable timeout (DTO =0xE) in hardware is (1/192MHz)*2^27 = 700ms. Commands taking longer than 700ms will be affected by thi

[PATCH v2 09/11] mmc: host: omap_hsmmc: Allow io voltage switch even for fixed vdd

2015-08-25 Thread Kishon Vijay Abraham I
Now that vmmc regulator is made optional, do not bail out if vmmc regulator is not found. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/omap_hsmmc.c |7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 9ab0f

[PATCH v2 08/11] mmc: host: omap_hsmmc: Workaround for errata id i802

2015-08-25 Thread Kishon Vijay Abraham I
According to errata i802, DCRC error interrupts (MMCHS_STAT[21] DCRC=0x1) can occur during the tuning procedure. The DCRC interrupt, occurs when the last tuning block fails (the last ratio tested). The delay from CRC check until the interrupt is asserted is bigger than the delay until assertion of

[PATCH v2 10/11] mmc: host: omap_hsmmc: remove incorrect voltage switch sequence

2015-08-25 Thread Kishon Vijay Abraham I
ios->vdd is set only in mmc_power_up and mmc_power_off and not in mmc_select_voltage as mentioned in the code comment. This seems to be legacy code that has been carried for a long time without being tested. This will be replaced with a proper voltage switch sequence and populated in start_signal_v

[PATCH v2 00/11] omap_hsmmc: voltage switching and tuning

2015-08-25 Thread Kishon Vijay Abraham I
Patch series implements voltage switching and tuning for omap_hsmmc driver. Changes from v1: *) rebased on top of [1] *) Patch breaking omap3 beagle xm is fixed. (set clk rate patch was breaking beagle xm) [1] -> https://lkml.org/lkml/2015/8/21/125 Did basic read/write test in J6, J6 Eco, Bea

[PATCH v2 07/11] mmc: host: omap_hsmmc: add tuning support

2015-08-25 Thread Kishon Vijay Abraham I
From: Balaji T K MMC tuning procedure is required to support SD card UHS1-SDR104 mode and EMMC HS200 mode. The tuning function omap_execute_tuning() will only be called by the MMC/SD core if the corresponding speed modes are supported by the OMAP silicon which is set in the mmc host "caps" field