Re: [RFC PATCH 1/7] mmc: sdhci: add quirk for broken 3.0V support

2014-06-20 Thread Anton Vorontsov
On Fri, Jun 20, 2014 at 05:35:22PM +0800, Vincent Yang wrote: > This patch defines a quirk for platforms unable > to enable 3.0V support. > It is a preparation and will be used by Fujitsu > SDHCI controller f_sdh30 driver. > > Signed-off-by: Vincent Yang I don't think you need this patch. Instea

Re: [PATCH 2/3 V3] mmc:sdhc: get voltage from sdhc host

2013-08-22 Thread Anton Vorontsov
ned-off-by: Haijun Zhang > --- Reviewed-by: Anton Vorontsov -- 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 3/3 V3] mmc:esdhc: add support to get voltage from device-tree

2013-08-22 Thread Anton Vorontsov
et from host capacity register. > > Signed-off-by: Haijun Zhang Acked-by: Anton Vorontsov -- 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 V3] mmc:of_spi: Update the code of getting voltage-ranges

2013-08-22 Thread Anton Vorontsov
On Mon, Aug 12, 2013 at 09:39:05AM +0800, Haijun Zhang wrote: > Using function mmc_of_parse_voltage() to get voltage-ranges. > > Signed-off-by: Haijun Zhang > --- Acked-by: Anton Vorontsov -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in th

Re: [PATCH 1/3 V5] mmc:core: parse voltage from device-tree

2013-08-22 Thread Anton Vorontsov
On Wed, Aug 14, 2013 at 01:46:11PM +0800, Haijun Zhang wrote: > Add function to support get voltage from device-tree. > If there are voltage-range specified in device-tree node, this function > will parse it and return the available voltage mask. > > Signed-off-by: Haijun Zhang

Re: [PATCH 1/3 V3] mmc:core: parse voltage from device-tree

2013-08-09 Thread Anton Vorontsov
On Fri, Aug 09, 2013 at 11:11:01AM +0800, Haijun Zhang wrote: > Add function to support get voltage from device-tree. > If there are voltage-range specified in device-tree node, this function > will parse it and return the available voltage mask. > > Signed-off-by: Haijun Zhang > --- > changes fo

Re: [PATCH] mmc:sdhci: Wait longer for command with busy flags

2013-08-08 Thread Anton Vorontsov
On Wed, Jul 31, 2013 at 04:21:44PM +0800, Haijun Zhang wrote: > When command with busy flags send and also data busy end interrupt > will be generate, the command will be finished when data transfer > complete or data busy state end, Sometimes this will expend more than > 10*Hz time to finish this

Re: [PATCH 1/3 V2] mmc:core: parse voltage from device-tree

2013-08-08 Thread Anton Vorontsov
On Wed, Jul 31, 2013 at 02:25:25PM +0800, Haijun Zhang wrote: > Add function to support get voltage from device-tree. > If there are voltage-range specified in device-tree node, this function > will parse it and return the avail voltage mask. > > Signed-off-by: Haijun Zhang > --- > changes for v2

Re: [PATCH] mmc:of_spi: Update the code of getting voltage-ranges

2013-08-08 Thread Anton Vorontsov
s unspecified\n"); > + ocr_mask = mmc_of_parse_voltage(np); > + if (ocr_mask <= 0) '< 0' check for an unsigned type? :) I'd write just !ocr_mask... But other than that the patch looks good to me... Reviewed-by: Anton Vorontsov Thanks! >

Re: [PATCH 2/2 V2] mmc: esdhc: get voltage from dts file

2013-07-26 Thread Anton Vorontsov
lse we still read > from capacity or from other provider. > > Signed-off-by: Haijun Zhang > Signed-off-by: Anton Vorontsov Development process nitpick... The code originated from me, but I did not sign off this patch... Per Documentation/SubmittingPatches: The Signed-off-by: tag i

Re: [PATCH 2/2] mmc: esdhc: get voltage from dts file

2013-07-26 Thread Anton Vorontsov
On Mon, Jul 22, 2013 at 09:41:34PM -0500, Scott Wood wrote: [...] > >> > +static void esdhc_get_voltage(struct sdhci_host *host, > >> > +struct platform_device *pdev) > >> > +{ > >> > +} > >> > >> Don't duplicate this code. Move it somewhere common and share it. > >[Ha

Re: [PATCH 3/4 V2] mmc: esdhc: Add quirks to support T4240QDS board

2013-07-15 Thread Anton Vorontsov
knows better, otherwise read capabilities from the register. Anton > Thanks. > > Regards > Haijun. > > > > -Original Message- > > From: linux-mmc-ow...@vger.kernel.org [mailto:linux-mmc- > > ow...@vger.kernel.org] On Behalf Of Anton Vorontsov > &

Re: [PATCH 3/4 V2] mmc: esdhc: Add quirks to support T4240QDS board

2013-07-12 Thread Anton Vorontsov
On Mon, Jul 08, 2013 at 12:18:39PM -0500, Scott Wood wrote: > On 07/08/2013 02:16:04 AM, Haijun Zhang wrote: > >On T4240QDS board controllers has an unusable ADMA engine, so use > >SDMA instead. > >Also 3.0v is support on T4240QDS board even if the capacity > >detailed only 1.8v > >support. Without

Re: [PATCH 2/2] MMC: P2020 SDHC: Fix bug when writing to SDHCI_HOST_CONTROL register

2013-06-13 Thread Anton Vorontsov
.of_node; > + if (of_device_is_compatible(np, "fsl,p2020-esdhc")) { > + /* Freescale messed up with P2020 as it has a non-standard > + * host control register > + */ Ditto. Otherwise, it looks good. Thanks! Reviewed-by: Anton Vorontsov > + h

Re: [PATCH 1/2] MMC: P2020 SDHC: Add support for 8-bit bus width and non-removable card

2013-06-13 Thread Anton Vorontsov
pdata); > + struct sdhci_host *host; > + int ret = 0; No need for the 0 initializer. Otherwise it looks OK, thanks! Reviewed-by: Anton Vorontsov -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majord...@vger.k

Re: [PATCH] Powerpc/eSDHC: Calculate the applicable mmc erase timeout value

2012-11-28 Thread Anton Vorontsov
ere are any negative impact on esdhc-imx please let me know. > > Signed-off-by: Haijun Zhang > Signed-off-by: Jerry Huang Looks good, thanks. Reviewed-by: Anton Vorontsov > --- > changes for v5: > - Split two variable in their own line > changes for v4: > - A

Re: [PATCH 1/2 v4] Powerpc/eSDHC: Calculate the applicable mmc erase timeout value

2012-11-28 Thread Anton Vorontsov
ere are any negative impact on esdhc-imx please let me know. > > Signed-off-by: Haijun Zhang > Signed-off-by: Jerry Huang > CC: Anton Vorontsov > --- > changes for v4: > - Apply the timeout clk after the card setup and reuse quirk > changes for v3: > -

Re: [PATCH] Powerpc eSDHC: Convert the cmd_timeou_ms to u64 to avoid overflow

2012-11-26 Thread Anton Vorontsov
On Mon, Nov 26, 2012 at 04:35:58PM +0800, Haijun Zhang wrote: > Convert the cmd_timeou_ms to u64 to avoid overflow > > Signed-off-by: Jerry Huang > Signed-off-by: Haijun Zhang Reviewed-by: Anton Vorontsov But I think you should merge the two patches... Thanks, >

Re: [PATCH] Use u64 to calculate the timeout value to avoid overflow

2012-11-26 Thread Anton Vorontsov
On Mon, Nov 26, 2012 at 04:35:59PM +0800, Haijun Zhang wrote: > As data timeout_ns use u64 to avoid overflow. > So we use macro div_u64 to perform a division. [...] > --- a/drivers/mmc/host/atmel-mci.c > +++ b/drivers/mmc/host/atmel-mci.c > @@ -593,17 +593,16 @@ static void atmci_timeout_timer(unsi

Re: [PATCH 2/2] Powerpc/eSDHC: Add limit to data and erase timeout value calculation

2012-11-18 Thread Anton Vorontsov
y too larg timeout value for host to response, So limit > > > the maximum data transfer timeout value and maximum erase timeout > > > value to aviod timeout issue. > > > > > > Signed-off-by: Haijun Zhang > > > Signed-off-by: Jerry Huang > > > S

Re: [PATCH 2/2] Powerpc/eSDHC: Add limit to data and erase timeout value calculation

2012-11-18 Thread Anton Vorontsov
ff-by: Jerry Huang > Signed-off-by: Anton Vorontsov Ditto about the sign-off, it's inappropriate in this case. [...] > @@ -721,6 +722,10 @@ void mmc_set_data_timeout(struct mmc_data *data, const > struct mmc_card *card) > data-

Re: [PATCH] Powerpc eSDHC: Use u64 to calculate the timeout value to avoid overflow

2012-11-18 Thread Anton Vorontsov
g > Signed-off-by: Haijun Zhang > Signed-off-by: Anton Vorontsov Nope, you should not put my Signed-off-by here, I didn't sign on the patch, neither I'm in patch's delivery path. Preserving my exact tags (Acked-by or Reviewed-by) is important, they all have different meani

Re: [PATCH 3/4 v5] SDHCI: add sdhci_get_cd callback to detect the card

2012-11-18 Thread Anton Vorontsov
On Mon, Nov 19, 2012 at 03:15:53AM +, Huang Changming-R66093 wrote: [...] > > > > @@ -1573,6 +1573,26 @@ static int sdhci_get_ro(struct mmc_host *mmc) > > > > return ret; > > > > } > > > > > > > > +/* Return values for the sdjco_get_cd callback: > > > > + * 0 for a absent card > > >

Re: [PATCH 2/4 v4] MMC/SD: Add callback function to detect card

2012-11-18 Thread Anton Vorontsov
On Tue, Oct 30, 2012 at 04:12:47PM +0800, r66...@freescale.com wrote: [..] > If the card is present, 1 will return, if the card is absent, 0 will return. > If the controller will not support this feature, -ENOSYS will return. > > Signed-off-by: Jerry Huang > CC: Anton Vorontsov &

Re: [PATCH 3/4 v5] SDHCI: add sdhci_get_cd callback to detect the card

2012-11-18 Thread Anton Vorontsov
allback) > > + */ Incorrect style. > > +static int sdhci_get_cd(struct mmc_host *mmc) { ditto > > + struct sdhci_host *host = mmc_priv(mmc); > > + unsigned long flags; > > + int present = -ENOSYS; if (!host->ops->get_cd) return -

Re: [PATCH 4/4 v4] ESDHC: add callback esdhc_of_get_cd to detect card

2012-11-18 Thread Anton Vorontsov
ops sdhci_esdhc_ops = { > > .get_max_clock = esdhc_of_get_max_clock, > > .get_min_clock = esdhc_of_get_min_clock, > > .platform_init = esdhc_of_platform_init, > > + .get_cd = esdhc_of_get_cd, > > #ifdef CONFIG_PM > > .platform_suspend = esdhc_of_sus

Re: [PATCH 2/2 V2] Powerpc/eSDHC: Add limit to data and erase timeout value calculation

2012-11-18 Thread Anton Vorontsov
ff-by: Jerry Huang > CC: Anton Vorontsov > --- > changes for v2: > - Add limit to data and erase timeout value calculation > - split the V1 patch into two V2 patchs. > > drivers/mmc/core/core.c | 27 --- > 1 files changed, 16 inse

Re: [PATCH 1/2 V2] Powerpc/eSDHC: Calculate the applicable mmc erase timeout value

2012-11-18 Thread Anton Vorontsov
oid timeout error. > > Signed-off-by: Haijun Zhang > Signed-off-by: Jerry Huang > CC: Anton Vorontsov > --- > changes for v2: > - Recompute the timeout value and max_discard_to for mmc erase > - split the V1 patch into two V2 patchs. Oh, I see. A new versi

Re: [PATCH] Powerpc eSDHC: Use u64 to calculate the timeout value to avoid overflow

2012-11-18 Thread Anton Vorontsov
g > Signed-off-by: Haijun Zhang > CC: Anton Vorontsov > --- > drivers/mmc/core/core.c | 21 - > drivers/mmc/host/sdhci.c |6 +++--- > include/linux/mmc/core.h |2 +- > 3 files changed, 12 insertions(+), 17 deletions(-) > > diff --git a/

Re: [PATCH] Powerpc/esdhc: Calculate the applicable timeout value for mmc erase

2012-11-18 Thread Anton Vorontsov
oid timeout error. > > Signed-off-by: Haijun Zhang > Signed-off-by: Jerry Huang > CC: Anton Vorontsov > --- [...] > --- a/drivers/mmc/host/sdhci.c > +++ b/drivers/mmc/host/sdhci.c > @@ -2560,6 +2560,16 @@ int sdhci_add_host(struct sdhci_host *host) > } els

Re: [PATCH V2 0/3] mmc: remove MMC_CAP_NEEDS_POLL setting in sdhci_add_host

2012-10-30 Thread Anton Vorontsov
ich, to me, still makes more sense (of course :). Anyways, I'm not opposed either, so hopefully it works: Reviewed-by: Anton Vorontsov Thanks! Anton. -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majord...@vger.kernel.org Mor

Re: [PATCH] powerpc/esdhc: enable the card insert/remove interrupt

2012-10-26 Thread Anton Vorontsov
Hello Huang, On Fri, Oct 26, 2012 at 02:42:36AM +, Huang Changming-R66093 wrote: > For the current polling mode, driver will send CMD13 to poll the card status > periodically , which will cause too many interrupts. > Once I sent patches to detect the card when using polling mode last year: >

Re: [PATCH] powerpc/esdhc: enable the card insert/remove interrupt

2012-10-25 Thread Anton Vorontsov
e boards, but left others to suffer. Ideally, the best fix would be to also make the card polling cheap. Anyways, using (d) clause of the "Reviewer's statement of oversight", I can easily give this: Reviewed-by: Anton Vorontsov :) Thanks! [...] > > > IIRC, the

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

2012-10-25 Thread Anton Vorontsov
MD23, > even on the SoCs which declares CMD23 is supported. > Therefore, we'll not use CMD23. > > Signed-off-by: Jerry Huang > Signed-off-by: Shaohui Xie > CC: Chris Ball > --- Looks perfect, thanks a lot! Acked-by: Anton Vorontsov -- To unsubscribe from this list: sen

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

2012-10-24 Thread Anton Vorontsov
Sorry for the late reply, Huang. On Tue, Oct 09, 2012 at 06:24:13AM +, Huang Changming-R66093 wrote: [...] > > > +static void esdhc_of_detect_limitation(struct platform_device *pdev, > > > + struct sdhci_pltfm_data *pdata) { Wrong indentation. Should be one more tab, at least (or align

Re: [PATCH] powerpc/esdhc: enable the card insert/remove interrupt

2012-10-23 Thread Anton Vorontsov
e the default card detect to interrupt mode, > if the board can't support this mode, we still use the poll mode. > > Signed-off-by: Jerry Huang > CC: Anton Vorontsov > CC: Chris Ball > --- IIRC, the card detection is broken SOC-revision-wise, not board-wise. So the chang

Re: [PATCH] mmc: remove MMC_CAP_NEEDS_POLL setting in sdhci_add_host

2012-09-26 Thread Anton Vorontsov
On Tue, Sep 25, 2012 at 02:13:10AM -0700, Yong Ding wrote: [...] > So, in all, u are right if with my current patch, some host drivers need > some improvement to add MMC_CAP_NEEDS_POLL when it is actually needed. > But I think this shall be the right way to follow. Or, we might enable > polling for

Re: [PATCH] mmc: remove MMC_CAP_NEEDS_POLL setting in sdhci_add_host

2012-09-25 Thread Anton Vorontsov
On Tue, Sep 25, 2012 at 02:34:07PM +0800, yongd wrote: > From: yongd [...] > And the better one to decide whether we use polling or not should be > the host driver itself. Actually, some host driver has already been > like this. Eg, in drivers/mmc/host/Au1xmmc.c, polling will be enabled > only aft

Re: [PATCH V4] Powerpc eSDHC Recover from the ADMA error

2012-09-19 Thread Anton Vorontsov
On Thu, Sep 20, 2012 at 10:19:23AM +0800, haijun.zh...@freescale.com wrote: > From: Haijun Zhang > > Signed-off-by: Haijun Zhang > Signed-off-by: Jerry Huang > CC: Anton Vorontsov > --- This one looks perfect, thanks! Acked-by: Anton Vorontsov > changes for

Re: [PATCH V3] Powerpc eSDHC Recover from the ADMA error

2012-09-19 Thread Anton Vorontsov
On Wed, Sep 19, 2012 at 05:22:39PM +0800, haijun.zh...@freescale.com wrote: > From: Haijun Zhang > > Signed-off-by: Haijun Zhang > Signed-off-by: Jerry Huang > CC: Anton Vorontsov [...] > --- > changes for v3: > - Correct the if statement in function workgr

Re: [PATCH V2] Powerpc eSDHC Recover from the ADMA error

2012-09-18 Thread Anton Vorontsov
at Block Gap. > This issue will impact the eSDHC IP VVN2.3. > > > Signed-off-by: Haijun Zhang > Signed-off-by: Jerry Huang > CC: Anton Vorontsov > --- > changes for v2: > - Invert the condition of the if statement in function workground Hm. [...] > +stat

Re: [PATCH] Powerpc eSDHC Recover from the ADMA error

2012-09-18 Thread Anton Vorontsov
at Block Gap. > This issue will impact the eSDHC IP VVN2.3. > > > Signed-off-by: Haijun Zhang > Signed-off-by: Jerry Huang > CC: Anton Vorontsov > --- [...] > +static void esdhci_of_adma_workaround(struct sdhci_host *host, u32 intmask) > +{ > + u32 tmp = in_be32

Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23

2012-09-11 Thread Anton Vorontsov
On Wed, Sep 12, 2012 at 03:19:18AM +, Huang Changming-R66093 wrote: [...] > I don't think it is the best way to do it. For the VVN2.2 or older, > some silicon support this feature (mpc8536 and p2020), but other > silicones don't support it (e.g. p4080, p102x). Though, the current > p5/p4/p3 h

Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23

2012-09-11 Thread Anton Vorontsov
On Tue, Sep 11, 2012 at 12:54:29AM -0700, Anton Vorontsov wrote: > On Tue, Sep 11, 2012 at 03:12:44PM +0800, chang-ming.hu...@freescale.com > wrote: > > From: Jerry Huang > > > > Below SOCs don't support the cmd23 command for MMC card, > > therefore, disable

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

2012-09-11 Thread Anton Vorontsov
eclare CMD23 is supported, > so we'll not use CMD23. > > Signed-off-by: Jerry Huang > Signed-off-by: Shaohui Xie This looks OK. For sdhci-pltfm, Acked-by: Anton Vorontsov Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a

Re: [PATCH 3/3] MMC/esdhc: introduce the 'sdhci,no-cmd23'

2012-09-11 Thread Anton Vorontsov
On Tue, Sep 11, 2012 at 03:12:45PM +0800, chang-ming.hu...@freescale.com wrote: > From: Jerry Huang > > Some controller can't support CMD23, therefore introduce this property. > > Signed-off-by: Jerry Huang Acked-by: Anton Vorontsov Thank you! -- To unsubscribe from this

Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23

2012-09-11 Thread Anton Vorontsov
On Tue, Sep 11, 2012 at 03:12:44PM +0800, chang-ming.hu...@freescale.com wrote: > From: Jerry Huang > > Below SOCs don't support the cmd23 command for MMC card, > therefore, disable it in device tree: > P1020, P1021, P1022, P1024, P1025 and P4080 > > Signed-off-by: Jer

Re: [PATCH] eSDHC: Add ADMA mode support for eSDHC

2012-08-05 Thread Anton Vorontsov
e for FSL eSDHC controller. It looks OK, thanks! Acked-by: Anton Vorontsov -- Anton Vorontsov Email: cbouatmai...@gmail.com -- 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 4/5 v4] ESDHC: Workaround for data crc error on p1010rdb

2012-01-13 Thread Anton Vorontsov
gher than expected clocks, then this code would be a correct workaround. Otherwise, if HW generates correct/precise clock, then you probably would rather not permit high clocks at all... but then you limit max freq to 20 MHz. :-( Oh well, if the patch works for your HW, I'm fine with it. Acked-by

Re: [PATCH 1/5 v2] ESDHC: add PIO mode support

2012-01-13 Thread Anton Vorontsov
On Fri, Jan 13, 2012 at 02:35:57AM +, Huang Changming-R66093 wrote: > Hi, Anton, > Could you have any comment about this serial patch? Acked-by: Anton Vorontsov Thanks! > Thanks > Jerry Huang > > -Original Message- > > From: Huang Changming-R66093 > >

Re: [PATCH 2/5 v2] ESDHC: set the timeout to the max value

2012-01-13 Thread Anton Vorontsov
e_is_compatible(np, "fsl,p2020-rev1-esdhc")) > > host->quirks |= SDHCI_QUIRK_BROKEN_DMA; > > > > + if (of_device_is_compatible(np, "fsl,p2020-esdhc") > > + || of_device_is_compatible(np, "fsl,p1010-es

Re: [PATCH 3/5 v4] ESDHC: Power management for ESDHC

2012-01-13 Thread Anton Vorontsov
On Fri, Jan 13, 2012 at 02:36:50AM +, Huang Changming-R66093 wrote: > Hi, Anton, > Could you have any comment about this serial patch? On this one, Acked-by: Anton Vorontsov Thanks, > Thanks > Jerry Huang > > > -Original Message- > > From: Huang Changm

Re: [PATCH][upstream] eSDHC: fix errors when booting kernel on Freescale eSDHC version 2.3

2012-01-13 Thread Anton Vorontsov
ter*/ > + dma_bits = (val & SDHCI_CTRL_DMA_MASK) << 5; > + clrsetbits_be32(host->ioaddr + reg , SDHCI_CTRL_DMA_MASK << 5, > + dma_bits); > + val &= ~SDHCI_CTRL_DMA_MASK; > + val |= (in_be32(host->ioaddr

Re: [PATCH] mmc: convert drivers/mmc/host/* to use module_platform_driver()

2011-11-26 Thread Anton Vorontsov
t look OK. Thanks, -- Anton Vorontsov Email: cbouatmai...@gmail.com -- 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] leds-class: change back LEDS_CLASS to tristate instead of bool

2011-10-10 Thread Anton Vorontsov
e tristate. So set it > as tristate too and update header files as well. > > Change those ifdefs to take care of module configuration. > > Signed-off-by: Bryan Wu Won't this break linking if POWER_SUPPLY=y and LEDS_TRIGGERS=m? Thanks, -- Anton Vorontsov Email: cbouatmai.

Re: [PATCH] eSDHC: Access Freescale eSDHC registers by 32-bit

2011-09-09 Thread Anton Vorontsov
; Signed-off-by: Kumar Gala > --- The patch looks OK. Acked-by: Anton Vorontsov [...] > +static u8 esdhc_readb(struct sdhci_host *host, int reg) > +{ > + int base = reg & ~0x3; > + int shift = (reg & 0x3) * 8; > + u8 ret = (in_be32(host->ioaddr + base) >

Re: [PATCH 2/2 v2] eSDHC: Fix errors when booting kernel with fsl esdhc

2011-08-12 Thread Anton Vorontsov
; Anton, > thanks for the comment, as we discussed, the original code use 8 bit byte > operation, > while in fact, on some powerpc platform, 32 bit operation is needed. > should it be possible fixed by adding some wrapper in IO accessors or > introduce additional sdhci op? I woul

Re: [PATCH 2/2 v2] eSDHC: Fix errors when booting kernel with fsl esdhc

2011-07-22 Thread Anton Vorontsov
nsigned short)-1) { > switch (1 << power) { > +#define ESDHCI_FSL_POWER_MASK 0x40 > +#define ESDHCI_FSL_POWER_1800x00 > +#define ESDHCI_FSL_POWER_3000x40 Same here. The driver will rot quickly if everyone would start putting chip-specific

Re: [PATCH v3 4/4] mmc: sdhci-esdhc-imx: add device tree probe support

2011-07-13 Thread Anton Vorontsov
med GPIOs scheme, and discuss it later. And here we are. The patch that added of_get_named_gpio() triggered no discussion at all, but I wasn't Cc'ed either. * http://lists.ozlabs.org/pipermail/linuxppc-dev/2008-October/064701.html -- Anton Vorontsov Email: cbouatmai...@gmail

Re: [PATCH v3 4/4] mmc: sdhci-esdhc-imx: add device tree probe support

2011-07-13 Thread Anton Vorontsov
e're safe again -- resources become discoverable. Thanks, -- Anton Vorontsov Email: cbouatmai...@gmail.com -- 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 v3 4/4] mmc: sdhci-esdhc-imx: add device tree probe support

2011-07-13 Thread Anton Vorontsov
p.s. As for this particular patch, I really don't see why we should use named GPIOs. For consistency, I'd suggest to reuse bindings from Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt. Plus, fsl,cd-internal and fsl,wp-internal is not needed: either you specify GPIOs or not.

Re: [PATCH 3/3] eSDHC: fix incorrect default value of the capabilities register on P4080

2011-07-05 Thread Anton Vorontsov
> + if (of_device_is_compatible(np, "fsl,p4080-esdhc")) > + host->quirks |= SDHCI_QUIRK_QORIQ_HOSTCAPBLT_ONLY_VS33; Should really use voltage-ranges, not quirks. http://www.spinics.net/lists/linux-mmc/msg02785.html Thanks, -- Anton Vorontsov Email: cbouatmai...@gmail.com -- To unsubscri

Re: [PATCH v2 1/7] mmc: sdhci: make sdhci-pltfm device drivers self registered

2011-05-05 Thread Anton Vorontsov
s3xxx_exit); I don't think I like this duplicate code for each platform sub- driver. It's repetitive and annoying. :-/ But considering that ARM will be multiplatform soon, we don't want to have every mach-* stuff in the single sdhci-pltfm. So... OK. If that compiles, I'm fine

Re: [PATCH v2 2/7] mmc: sdhci: eliminate sdhci_of_host and sdhci_of_data

2011-05-05 Thread Anton Vorontsov
On Thu, May 05, 2011 at 09:22:53PM +0800, Shawn Guo wrote: > The patch migrates the use of sdhci_of_host and sdhci_of_data to > sdhci_pltfm_host and sdhci_pltfm_data, so that the former pair can > be eliminated. > > Signed-off-by: Shawn Guo > Reviewed-by: Grant Likely Acked-b

Re: [PATCH v2 3/7] mmc: sdhci: make sdhci-of device drivers self registered

2011-05-05 Thread Anton Vorontsov
On Thu, May 05, 2011 at 09:22:54PM +0800, Shawn Guo wrote: [...] > - * Copyright (c) 2007 Freescale Semiconductor, Inc. > - * Copyright (c) 2009 MontaVista Software, Inc. > - * > - * Authors: Xiaobo Xie > - * Anton Vorontsov [...] > -#ifdef CONFIG_MMC_SDHCI_BIG_ENDIAN_

Re: [PATCH v2 5/7] mmc: sdhci: consolidate sdhci-of-esdhc and sdhci-esdhc-imx

2011-05-05 Thread Anton Vorontsov
e two. I'd rather vote for renaming sdhci-of-esdhc to sdhci-esdhc-mpc. :-) -- Anton Vorontsov Email: cbouatmai...@gmail.com -- 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 v2 6/7] mmc: sdhci: merge two sdhci-pltfm.h into one

2011-05-05 Thread Anton Vorontsov
f-by: Shawn Guo > Reviewed-by: Grant Likely > Reviewed-by: Wolfram Sang Acked-by: Anton Vorontsov -- 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 2/5] mmc: sdhci-esdhc: broken card detection is not a default quirk

2011-02-11 Thread Anton Vorontsov
SDHCI_QUIRK_BROKEN_ADMA > > + | SDHCI_QUIRK_BROKEN_CARD_DETECTION, Minor nit: "|" should be on the previous line. Otherwise, Acked-by: Anton Vorontsov Thanks! -- Anton Vorontsov Email: cbouatmai...@gmail.com -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH] of_mmc_spi: add card detect irq support

2010-12-28 Thread Anton Vorontsov
hat happened with this patch? Thanks, -- Anton Vorontsov Email: cbouatmai...@gmail.com -- 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] sdhci: remove SDHCI_QUIRK_FORCE_1_BIT_DATA

2010-11-09 Thread Anton Vorontsov
after sdhci_add_host. > > We have verified on our platform, would you mind check whether it > impact your driver behavior. -- Anton Vorontsov email: cbouatmai...@gmail.com irc://irc.freenode.net/bd2 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in th

Re: [PATCH 1/6] mmc: sdhci-pltfm: Add structure for host-specific data

2010-09-30 Thread Anton Vorontsov
that it's always risky, it's more driver-specific. Many drivers access it from everywhere, see drivers/mmc/host/mmc_spi.c for example. In general, if the driver needs most of the platform data in the run-time, it makes no sense to duplicate or copy the pdata into the private struct fiel

Re: [PATCH 4/6] mmc: sdhci_pltfm: pass more data on custom init-call

2010-09-30 Thread Anton Vorontsov
t;dev.platform_data) pdev->dev.platform_data = platform_device_id->driver_data; pdata->init(dev); Note, in this case we must also NULLify platform_data it at remove(), as platform_device_release() will try to free statically allocated memory. Thanks, -- Anton Vorontsov email:

Re: [PATCH 6/6] mmc: sdhci-pltfm: add pltfm-driver for imx35/51

2010-09-28 Thread Anton Vorontsov
ivers/mmc/host/sdhci-esdhc-imx.c > @@ -0,0 +1,144 @@ > +/* > + * Freescale eSDHC controller driver for the platform bus. eSDHC i.MX Other than that, looks good. Acked-by: Anton Vorontsov -- Anton Vorontsov email: cbouatmai...@gmail.com irc://irc.freenode.net/bd2 -- To unsubscribe fr

Re: [PATCH 5/6] mmc: sdhci-of-esdhc: factor out common stuff

2010-09-28 Thread Anton Vorontsov
as a C file. [...] > +static void esdhc_set_clock(struct sdhci_host *host, unsigned int clock) But if you do this in the .h file, you have to make it 'inline', otherwise gcc might emit 'defined but not used' warning. Thanks, -- Anton Vorontsov email: cbouatmai...@gmail.com irc://i

Re: [PATCH 4/6] mmc: sdhci_pltfm: pass platform_data on custom init-call

2010-09-28 Thread Anton Vorontsov
; priv_pdata might not be needed as Giuseppe pointed out. Will update with > the next revision of this series, if needed. Yeah, priv_pdata becomes just pdata. Please remove it from the callback. Thanks, -- Anton Vorontsov email: cbouatmai...@gmail.com irc://irc.freenode.net/bd2 -- To unsub

Re: [PATCH 1/6] mmc: sdhci-pltfm: Add structure for host-specific data

2010-09-28 Thread Anton Vorontsov
or u32. Otherwise, looks good. Acked-by: Anton Vorontsov Thanks, -- Anton Vorontsov email: cbouatmai...@gmail.com irc://irc.freenode.net/bd2 -- 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: [RFC] remove quirk for broken clock - redundant since ops->max_clock defined

2010-09-28 Thread Anton Vorontsov
k. Again, I can only cite Pierre Ossman: On Sun, Feb 08, 2009 at 10:04:40PM +0100, Pierre Ossman wrote: | As I told Ben, I prefer if we stick to the standard as much as | possible. So no external info unless the register is set to zero. Your patch breaks that rule. Other than that, technically

Re: [PATCH 1/4] mmc: sdhci-pltfm: Add structure for host-specific data

2010-09-26 Thread Anton Vorontsov
> +       struct clk *clk; > > +       u32 scratchpad; /* to handle quirks across io-accessor calls */ > > +}; > > + > How about move private data to child driver, and one call back > function alloc_host, then child driver could alloc private data, > including clk. IMHO, thi

Re: mmotm 2010-09-15 - BUG in mmc driver calling led_trigger_event()

2010-09-21 Thread Anton Vorontsov
> sdhci-use-jiffies-instead-of-a-timeout-counter.patch > -- Anton Vorontsov email: cbouatmai...@gmail.com irc://irc.freenode.net/bd2 -- 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 1/4] mmc: sdhci-pltfm: Add structure for host-specific data

2010-09-21 Thread Anton Vorontsov
needed. > + u32 scratchpad; /* to handle quirks across io-accessor calls */ #include is needed for u32. Thanks, -- Anton Vorontsov email: cbouatmai...@gmail.com irc://irc.freenode.net/bd2 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a m

Re: [PATCH 4/4] mmc: sdhci-pltfm: add pltfm-driver for imx35/51

2010-09-21 Thread Anton Vorontsov
_priv(host); Ditto. > + return clk_get_rate(pltfm_host->clk) / 256 / 16; > +} [...] > +++ b/drivers/mmc/host/sdhci-pltfm.c > @@ -164,6 +164,9 @@ static const struct platform_device_id sdhci_pltfm_ids[] > = { > #ifdef CONFIG_MMC_SDHCI_CNS3XXX > { "sdhci

Re: [PATCH 2/4] mmc: sdhci-pltfm: move .h-file into apropriate subdir

2010-09-21 Thread Anton Vorontsov
On Tue, Sep 21, 2010 at 02:30:08PM +0200, Wolfram Sang wrote: > Make use of the mmc-directory. > > Signed-off-by: Wolfram Sang Acked-by: Anton Vorontsov -- Anton Vorontsov email: cbouatmai...@gmail.com irc://irc.freenode.net/bd2 -- To unsubscribe from this list: send the line &qu

Re: [PATCH 3/4] mmc: sdhci-of-esdhc: factor out common stuff

2010-09-21 Thread Anton Vorontsov
i_readl(host, ESDHC_SYSTEM_CONTROL); > + temp |= (ESDHC_CLOCK_IPGEN | ESDHC_CLOCK_HCKEN | ESDHC_CLOCK_PEREN | > + (div << ESDHC_DIVIDER_SHIFT) | (pre_div << > ESDHC_PREDIV_SHIFT)); > + sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL); > + mdelay

Re: [PATCH 0/8] sdhci: Move real work out of an atomic context

2010-09-09 Thread Anton Vorontsov
atches from Anton until it's without regressions here. Thanks Chris. I also think that it's better to drop these series now, and meanwhile I'll try to prepare another patchset. -- Anton Vorontsov email: cbouatmai...@gmail.com irc://irc.freenode.net/bd2 -- To unsubscribe from this

Re: [PATCH 0/8] sdhci: Move real work out of an atomic context

2010-09-08 Thread Anton Vorontsov
On Wed, Sep 08, 2010 at 11:05:48PM +0100, Chris Ball wrote: > Hi Anton, > > On Thu, Sep 09, 2010 at 01:57:50AM +0400, Anton Vorontsov wrote: > > Thanks! > > > > Would be also great if you could point out which patch causes > > most of the performance drop (if an

Re: [PATCH 0/8] sdhci: Move real work out of an atomic context

2010-09-08 Thread Anton Vorontsov
t? Or it could be the patch that introduces threaded IRQ handler in whole causes it. If so, I guess we'd need to move some of the processing to the real IRQ context, keeping the handler lockless (if possible) or introducing a very fine grained locking. Thanks, -- Anton Vorontsov email: cbouatm

Re: [PATCH] of_mmc_spi: add card detect irq support

2010-08-30 Thread Anton Vorontsov
> of_mmc_spi: add card detect irq support > > Signed-off-by: Esben Haabendal Acked-by: Anton Vorontsov Thanks! > --- > .../powerpc/dts-bindings/mmc-spi-slot.txt |9 ++- > drivers/mmc/host/of_mmc_spi.c | 26 ++- >

Re: [PATCH 1/3 v2] sdhci: Add auto CMD12 support for eSDHC driver

2010-08-09 Thread Anton Vorontsov
e nit incorporated. Another nit: > @@ -154,6 +154,10 @@ static int __devinit sdhci_of_probe(struct of_device > *ofdev, > host->ops = &sdhci_of_data->ops; > } > > + if (of_get_property(np, "sdhci,auto-cmd12", NULL)) > +

Re: [PATCH 2/3 v2] dts: Add sdhci,auto-cmd12 field for p4080 device tree

2010-08-09 Thread Anton Vorontsov
properties: > reports inverted write-protect state; >- sdhci,1-bit-only : (optional) specifies that a controller can > only handle 1-bit data transfers. > + - sdhci,auto-cmd12: (optional) specifies that a controller can > + only handle auto CMD12. Acked-by: An

Re: [PATCH 3/3 v2] dts: Add ESDHC weird voltage bits workaround

2010-08-09 Thread Anton Vorontsov
V voltage is supported for P4080 ESDHC controller. > > Signed-off-by: Roy Zang Acked-by: Anton Vorontsov Btw, where is implementation for the voltage-ranges handling? > --- > arch/powerpc/boot/dts/p4080ds.dts |1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > d

Re: [PATCH 3/3 v2] mmc: Add ESDHC weird voltage bits workaround

2010-08-01 Thread Anton Vorontsov
voltage-ranges = <3300 3300>; Right you are, both will be 3300. Thanks, -- Anton Vorontsov email: cbouatmai...@gmail.com irc://irc.freenode.net/bd2 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majord...@vger.kernel.org

Re: [PATCH 3/3] mmc: Add ESDHC weird register workaround

2010-07-30 Thread Anton Vorontsov
a callback? > It makes more sense to define something like: > SDHCI_QUIRK_QORIQ_PROCTL_WEIRD. I don't think so. Thanks, -- Anton Vorontsov email: cbouatmai...@gmail.com irc://irc.freenode.net/bd2 -- 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 3/3 v2] mmc: Add ESDHC weird voltage bits workaround

2010-07-30 Thread Anton Vorontsov
gt; caps = sdhci_readl(host, SDHCI_CAPABILITIES); > > + /* Workaround for P4080 host controller capabilities > + * 1.8V and 3.0V do not supported*/ > + if (host->quirks & SDHCI_QUIRK_QORIQ_NO_VDD_180) The point of making NO_VDD stuff is to make the

[PATCH 4/8] sdhci: Use threaded IRQ handler

2010-07-14 Thread Anton Vorontsov
We only need atomic context to disable SDHCI interrupts, after that we can run in a kernel thread. Note that irq handler still grabs an irqsave spinlock, we'll deal with it in a subsequent patch. Signed-off-by: Anton Vorontsov --- drivers/mmc/host/sdhci.c |

[PATCH 3/8] sdhci: Clear interrupt status register just once

2010-07-14 Thread Anton Vorontsov
There's no need to clear the interrupt status register bit-by-bit, we can just clear it once. This simplifies irq handler. Signed-off-by: Anton Vorontsov --- drivers/mmc/host/sdhci.c | 23 ++- 1 files changed, 6 insertions(+), 17 deletions(-) diff --git a/drivers/mmc

[PATCH 8/8] sdhci: Use jiffies instead of a timeout counter

2010-07-14 Thread Anton Vorontsov
Just a cosmetic change, should not affect functionality. Signed-off-by: Anton Vorontsov --- drivers/mmc/host/sdhci.c | 11 +-- 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index e6adda8..c754df1 100644 --- a/drivers

[PATCH 7/8] sdhci: Get rid of mdelay()s where it is safe and makes sense

2010-07-14 Thread Anton Vorontsov
Sure, we might end up calling msleep() there too, just not via this safe patch. Signed-off-by: Anton Vorontsov --- drivers/mmc/host/sdhci-of-esdhc.c |2 +- drivers/mmc/host/sdhci.c |6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-

[PATCH 6/8] sdhci: Get rid of card detect work

2010-07-14 Thread Anton Vorontsov
Nowadays we can just call the card detection handler directly, no need for the separate work struct. We still need host->finish_work as sdhci_finish_work() calls mmc_request_done(), which tries to re-enter the driver. Signed-off-by: Anton Vorontsov --- drivers/mmc/host/sdhci.c |

[PATCH 5/8] sdhci: Turn host->lock into a mutex

2010-07-14 Thread Anton Vorontsov
Finally, we can get rid of the host->lock spinlock, and turn it into a mutex. This patch does just this. Signed-off-by: Anton Vorontsov --- drivers/mmc/host/sdhci.c | 53 +++-- drivers/mmc/host/sdhci.h |3 +- 2 files changed, 24 insertions(+),

[PATCH 2/8] sdhci: Use work structs instead of tasklets

2010-07-14 Thread Anton Vorontsov
The driver can happily live without an atomic context and tasklets, so turn the tasklets into the work structs. Tasklets handlers still grab irqsave spinlocks, but we'll deal with it in a separate patch. Signed-off-by: Anton Vorontsov --- drivers/mmc/host/sdhci.c |

  1   2   >