Re: [PATCH 2/3] mmc: sdhci-pci: Add platform tuning callback for amd hs200 mode

2015-12-22 Thread Andy Shevchenko
return err; > } > > ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- With Best Regards, Andy Shevchenko -- 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/3] mmc: sdhci-pci: Add AMD HS200 mode tuning function

2015-12-22 Thread Andy Shevchenko
gt; + > + for (td->tune_around = 0; td->tune_around < 12; td->tune_around++) { Magic. Why loop is done with non-local variable? > + > + config_tuning_phase(host, td->tune_around); > + > + if (mmc_send_tuning(host->mmc, opco

Re: [RFC v03 00/15] dmaengine: New 'universal' API for requesting channel

2015-12-02 Thread Andy Shevchenko
ent.txt| 23 ++--- > arch/arm/mach-davinci/devices-da8xx.c | 95 +- > arch/arm/mach-davinci/devices.c | 19 > arch/arm/mach-davinci/dm355.c | 28 -- > arch/arm/mach-davinci/dm365.c | 30 -- > arch/arm/mach-davinci/dm644x.c

Re: [RFC v03 03/15] dmaengine: core: Introduce new, universal API to request a channel

2015-12-02 Thread Andy Shevchenko
hannel must satisfy > + * > + * Returns pointer to appropriate DMA channel on success or an error pointer. > + */ > +struct dma_chan *dma_request_chan_by_mask(const dma_cap_mask_t *mask) > +{ > + struct dma_chan *chan; > + > + if (!mask) > + return ERR_PTR(-ENODEV); > + > + chan = __dma_request_channel(mask, NULL, NULL); > + if (!chan) > + chan = ERR_PTR(-ENODEV); > + > + return chan; > +} > +EXPORT_SYMBOL_GPL(dma_request_chan_by_mask); > + > void dma_release_channel(struct dma_chan *chan) > { > mutex_lock(&dma_list_mutex); > diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h > index a2b7c2071cf4..49d48e69c179 100644 > --- a/include/linux/dmaengine.h > +++ b/include/linux/dmaengine.h > @@ -606,6 +606,18 @@ enum dmaengine_alignment { > DMAENGINE_ALIGN_64_BYTES = 6, > }; > > +struct dma_filter_map { > +char *devname; const ? > +char *slave; Ditto. > +void *param; > +}; > + > +struct dma_filter { > +dma_filter_fn filter_fn; > +int mapcnt; > +const struct dma_filter_map *map; > +}; -- With Best Regards, Andy Shevchenko -- 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 v02 01/15] dmaengine: core: Allow NULL mask pointer in __dma_device_satisfies_mask()

2015-12-01 Thread Andy Shevchenko
On Tue, Dec 1, 2015 at 11:47 AM, Peter Ujfalusi wrote: > On 11/30/2015 04:35 PM, Andy Shevchenko wrote: >> On Mon, Nov 30, 2015 at 3:45 PM, Peter Ujfalusi >> wrote: >>> Treat as true condition the case when the mask is NULL. >> >> What do you think about

Re: [RFC v02 03/15] dmaengine: core: Introduce new, universal API to request a channel

2015-12-01 Thread Andy Shevchenko
On Tue, Dec 1, 2015 at 11:56 AM, Peter Ujfalusi wrote: > On 11/30/2015 04:51 PM, Andy Shevchenko wrote: >>> +struct dma_chan *dma_request_chan(struct device *dev, const char *name) >>> +{ >>> + struct dma_device *device, *_d; >>> + struct dma_cha

Re: [RFC v02 02/15] dmaengine: core: Move and merge the code paths using private_candidate

2015-11-30 Thread Andy Shevchenko
ame(chan)); > - list_del_rcu(&device->global_node); > - } else if (err) > - pr_debug("%s: failed to get %s: (%d)\n", > -__func__, dma_chan_name(chan), e

Re: [RFC v02 03/15] dmaengine: core: Introduce new, universal API to request a channel

2015-11-30 Thread Andy Shevchenko
onst > dma_cap_mask_t *mask, > struct dma_chan *dma_request_slave_channel_reason(struct device *dev, > const char *name); > struct dma_chan *dma_request_slave_channel(struct device *dev, const char > *name); > + > +stru

Re: [RFC v02 01/15] dmaengine: core: Allow NULL mask pointer in __dma_device_satisfies_mask()

2015-11-30 Thread Andy Shevchenko
p_mask.bits, > DMA_TX_TYPE_END); > return bitmap_equal(want->bits, has.bits, DMA_TX_TYPE_END); > -- > 2.6.3 > -- With Best Regards, Andy Shevchenko -- 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 v02 00/15] dmaengine: New 'universal' API for requesting channel

2015-11-30 Thread Andy Shevchenko
davinci/dm355.c | 28 ++++-- > arch/arm/mach-davinci/dm365.c | 30 +-- > arch/arm/mach-davinci/dm644x.c| 12 +++ > arch/arm/mach-davinci/dm646x.c| 11 +++ > drivers/dma/dmaengine.c | 160 > +- > drivers/dma/edma.c| 24 + > drivers/mmc/host/davinci_mmc.c| 52 +++ > drivers/spi/spi-davinci.c | 76 +--- > include/linux/dmaengine.h | 31 +++ > include/linux/platform_data/edma.h| 5 ++ > 12 files changed, 330 insertions(+), 213 deletions(-) > > -- > 2.6.3 > -- With Best Regards, Andy Shevchenko -- 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 02/13] dmaengine: Introduce dma_request_slave_channel_compat_reason()

2015-11-20 Thread Andy Shevchenko
On Fri, Nov 20, 2015 at 2:30 PM, Peter Ujfalusi wrote: > On 11/20/2015 02:24 PM, Andy Shevchenko wrote: >> On Fri, Nov 20, 2015 at 12:58 PM, Arnd Bergmann wrote: >>> On Friday 20 November 2015 12:25:06 Peter Ujfalusi wrote: >>>> On 11/19/2015 01:25 PM, Arnd Bergm

Re: [PATCH 02/13] dmaengine: Introduce dma_request_slave_channel_compat_reason()

2015-11-20 Thread Andy Shevchenko
m data Why not unified device properties? -- With Best Regards, Andy Shevchenko -- 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: use resource_size_t to store physical address

2015-11-18 Thread Andy Shevchenko
On Wed, Nov 18, 2015 at 6:22 PM, Arnd Bergmann wrote: > On Wednesday 18 November 2015 18:17:32 Andy Shevchenko wrote: >> On Wed, Nov 18, 2015 at 5:45 PM, Arnd Bergmann wrote: >> > On Wednesday 18 November 2015 17:29:19 Andy Shevchenko wrote: > >> >> For me it

Re: [PATCH] mmc: dw_mmc: use resource_size_t to store physical address

2015-11-18 Thread Andy Shevchenko
On Wed, Nov 18, 2015 at 5:45 PM, Arnd Bergmann wrote: > On Wednesday 18 November 2015 17:29:19 Andy Shevchenko wrote: >> >> I understand most of the things here, what I don't is how a platform >> is supposed to work if you have the following: >> a) HW, that uses

Re: [PATCH 02/13] dmaengine: Introduce dma_request_slave_channel_compat_reason()

2015-11-18 Thread Andy Shevchenko
On Wed, Nov 18, 2015 at 5:51 PM, Arnd Bergmann wrote: > On Wednesday 18 November 2015 17:43:04 Andy Shevchenko wrote: >> > >> > I assume that the sst-firmware.c case is a mistake, it should just use a >> > plain DMA_SLAVE and not DMA_MEMCPY. >> >> Other

Re: [PATCH 02/13] dmaengine: Introduce dma_request_slave_channel_compat_reason()

2015-11-18 Thread Andy Shevchenko
ful (IIRC Russel's opinion). On the other hand there are a lot of drivers that are used on the set of platforms starting from legacy and abandoned ones (like AVR32) to relatively new and newest. And I'm not a fan of those thousands of API calls either. -- With Best Regards, Andy Shevchenk

Re: [PATCH 02/13] dmaengine: Introduce dma_request_slave_channel_compat_reason()

2015-11-18 Thread Andy Shevchenko
these... > > I just had a look myself. carma has been removed fortunately in linux-next, > so we don't have to worry about that any more. > > I assume that the sst-firmware.c case is a mistake, it should just use a > plain DMA_SLAVE and not DMA_MEMCPY. Other way around. -- With Best Regards, Andy Shevchenko -- 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: use resource_size_t to store physical address

2015-11-18 Thread Andy Shevchenko
On Wed, Nov 18, 2015 at 2:38 PM, Arnd Bergmann wrote: > On Wednesday 18 November 2015 11:35:27 Andy Shevchenko wrote: >> On Fri, Nov 13, 2015 at 11:35 AM, Arnd Bergmann wrote: >> > On Friday 13 November 2015 03:10:13 Andy Shevchenko wrote: >> >> On Thu, Nov 12,

Re: [PATCH] mmc: dw_mmc: use resource_size_t to store physical address

2015-11-18 Thread Andy Shevchenko
On Fri, Nov 13, 2015 at 11:35 AM, Arnd Bergmann wrote: > On Friday 13 November 2015 03:10:13 Andy Shevchenko wrote: >> On Thu, Nov 12, 2015 at 4:14 PM, Arnd Bergmann wrote: >> > The dw_mmc driver stores the physical address of the MMIO registers >> > in a pointer, whi

Re: [PATCH] mmc: dw_mmc: use resource_size_t to store physical address

2015-11-12 Thread Andy Shevchenko
ouldn't be a problem when resource_size_t is defined as 64-bit address, and dma_addr_t as 32-bit? Btw, for me casting to dma_addr_t looks sane. -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a messag

Re: [PATCH] mmc: change to use kmalloc

2015-11-11 Thread Andy Shevchenko
gt;>> goto idata_err; >>> -- >>> 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- With Best Regards, Andy Shevchenko -- 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] mmc/sdhci-acpi: enable sdhci-acpi device to suspend/resume asynchronously

2015-09-21 Thread Andy Shevchenko
6263 100644 > --- a/drivers/mmc/host/sdhci-acpi.c > +++ b/drivers/mmc/host/sdhci-acpi.c > @@ -379,6 +379,8 @@ static int sdhci_acpi_probe(struct > platform_device *pdev) > pm_runtime_enable(dev); > } > > + device_enable_async_suspend(dev); > + >

Re: [PATCH] [wip] repair mci dma transfers for avr32

2015-08-12 Thread Andy Shevchenko
ve; Should be above line left? > struct mci_slot_pdata slot[ATMCI_MAX_NR_SLOTS]; > + bool (*dma_filter) (struct dma_chan *chan, void > *pdata); > }; > > #endif /* __LINUX_ATMEL_MCI_H */ > diff --git a/include/linux/platform_data/mmc-atmel-mci.h > b/include/linux

Re: [PATCH v1 1/1] mmc: atmel-mci: allow DMA transfers for AVR32

2015-07-27 Thread Andy Shevchenko
TNGW100. This patch returns back that functionality. > > > > Cc: Ludovic Desroches > > Signed-off-by: Andy Shevchenko > > > > How about moving that filter function into arch/avr32 to make the > mmc driver independent of the underlying dma engine implementation &

[PATCH v1 1/1] mmc: atmel-mci: allow DMA transfers for AVR32

2015-07-27 Thread Andy Shevchenko
The commit ecb89f2f5f3e (mmc: atmel-mci: remove compat for non DT board when requesting dma chan) removes compat transfer which breaks DMA support for ATNGW100. This patch returns back that functionality. Cc: Ludovic Desroches Signed-off-by: Andy Shevchenko --- drivers/mmc/host/atmel-mci.c

Re: [PATCH 1/1] mmc: block: don't use parameter prefix if built as module

2015-07-06 Thread Andy Shevchenko
On Wed, 2015-06-24 at 14:32 +0300, Andy Shevchenko wrote: > It's excessive to use prefix for the parameters when you do > modrpobe mmc-block mmcblk.perdev_minors=16 > > Make this available only for built-in case. Any comments on this? > > Signed-off-by: Andy Shevc

[PATCH 1/1] mmc: block: don't use parameter prefix if built as module

2015-06-24 Thread Andy Shevchenko
It's excessive to use prefix for the parameters when you do modrpobe mmc-block mmcblk.perdev_minors=16 Make this available only for built-in case. Signed-off-by: Andy Shevchenko --- drivers/mmc/card/block.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/card/bl

[PATCH v1] sdhci-acpi: fix copy'n'paste typos in the comments

2015-01-12 Thread Andy Shevchenko
Just fix the comments, no functional changes. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/sdhci-acpi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index dffd2c2..b11a3cb 100644 --- a/drivers/mmc

[PATCH 1/2] dw_mmc-pci: get resources from a proper BAR

2013-08-08 Thread Andy Shevchenko
There is a typo when the mapped space is from BAR 2, but BAR 0 is used instead. This patch fixes the typo. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/dw_mmc-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/dw_mmc-pci.c b/drivers/mmc/host/dw_mmc

[PATCH 2/2] dw_mmc-pci: enable bus-mastering mode

2013-08-08 Thread Andy Shevchenko
This patch enables bus-mastering mode for MMC controller to allow IDMAC transfers. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/dw_mmc-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/host/dw_mmc-pci.c b/drivers/mmc/host/dw_mmc-pci.c index 7d148d6..f70546a 100644

Re: [PATCH v3 1/7] clk: divider: add flag to limit possible dividers to even numbers

2013-06-11 Thread Andy Shevchenko
On Tue, Jun 11, 2013 at 3:37 PM, Andy Shevchenko wrote: > On Tue, Jun 11, 2013 at 3:06 PM, Heiko Stübner wrote: >> Am Dienstag, 11. Juni 2013, 13:51:56 schrieb Andy Shevchenko: >>> On Tue, Jun 11, 2013 at 2:29 PM, Heiko Stübner wrote: > This variant I think fits: >

Re: [PATCH v3 1/7] clk: divider: add flag to limit possible dividers to even numbers

2013-06-11 Thread Andy Shevchenko
On Tue, Jun 11, 2013 at 3:06 PM, Heiko Stübner wrote: > Am Dienstag, 11. Juni 2013, 13:51:56 schrieb Andy Shevchenko: >> On Tue, Jun 11, 2013 at 2:29 PM, Heiko Stübner wrote: [] >> > @@ -141,6 +149,8 @@ static bool _is_valid_div(struct clk_divider >> >

Re: [PATCH v3 1/7] clk: divider: add flag to limit possible dividers to even numbers

2013-06-11 Thread Andy Shevchenko
->flags & CLK_DIVIDER_EVEN && div != 1 && (div % 2) != 0) > + return false; > return true; > } What if rewrite like if (divider->flags & CLK_DIVIDER_EVEN == 0) return true; return div < 2 || div % 2 == 0; -- With Best Regards, Andy S

Re: [PATCH v2 4/8] mmc: dw_mmc-pltfm: add Rockchip variant

2013-06-06 Thread Andy Shevchenko
al register etc) > present, so to keep the footprint low, add this small variant to the > pltfm driver. My comments against v1 of this patch are still valid. -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a messa

Re: [PATCH 06/10] mmc: dw_mmc-pltfm: add Rockchip variant

2013-06-06 Thread Andy Shevchenko
; -EXPORT_SYMBOL_GPL(dw_mci_pltfm_remove); > - If you want to move those through code, please do separate patch. -- With Best Regards, Andy Shevchenko -- 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/3] mmc: dw: don't check resource with devm_ioremap_resource

2013-06-05 Thread Andy Shevchenko
On Wed, 2013-06-05 at 23:01 +0900, Seungwon Jeon wrote: > On 06/05/13 6:24 PM, Andy Shevchenko wrote: > > devm_ioremap_resource does sanity checks on the given resource. No need to > > duplicate this in the driver. > > > > Signed-off-by: Andy Shevchenko > > Loo

[PATCH 1/3] mmc: dw: don't check resource with devm_ioremap_resource

2013-06-05 Thread Andy Shevchenko
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/dw_mmc-pltfm.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc

[PATCH 3/3] mmc: dw: convert to use pcim_* and devm_*

2013-06-05 Thread Andy Shevchenko
The PCI driver is getting simplier and tidier with pcim_* and devm_* functions in use. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/dw_mmc-pci.c | 50 +-- 1 file changed, 15 insertions(+), 35 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-pci.c

[PATCH 2/3] mmc: dw: eliminate useless usage of ret

2013-06-05 Thread Andy Shevchenko
In few places usage of ret variable is not needed. This patch simplifies that pieces of code. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/dw_mmc-pci.c | 8 ++-- drivers/mmc/host/dw_mmc-pltfm.c | 17 +++-- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a

Re: [PATCH v9 3/9] ARM: edma: add AM33XX support to the private EDMA API

2013-03-06 Thread Andy Shevchenko
offset = xbar_chans[i][1] >> 2; > + offset <<= 2; Is it offset = xbar_chans[i][1] & 0xfffc; ? > + mux = readl((void *)((u32)xbar + offset)); > + mux &= ~(0xff << shift); > + mux |= xbar_chans[i][0] <&

Re: question for mmc_test

2013-02-27 Thread Andy Shevchenko
e sysfs and do unbind-bind cycle manually by echoing proper card ID. I could ask Adrian if we could provide piece of documentation he wrote few years ago at Nokia. -- Andy Shevchenko Intel Finland Oy -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body o

Re: [PATCH v5 03/14] ARM: edma: add AM33XX support to the private EDMA API

2013-01-29 Thread Andy Shevchenko
On Wed, Jan 30, 2013 at 8:41 AM, Matt Porter wrote: > On Mon, Jan 28, 2013 at 09:27:24PM +0200, Andy Shevchenko wrote: >> On Tue, Jan 15, 2013 at 10:32 PM, Matt Porter wrote: >> > Adds support for parsing the TI EDMA DT data into the required >> > EDMA private API pla

Re: [PATCH v5 07/14] dmaengine: add dma_request_slave_channel_compat()

2013-01-28 Thread Andy Shevchenko
gt; -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- With Be

Re: [PATCH v5 03/14] ARM: edma: add AM33XX support to the private EDMA API

2013-01-28 Thread Andy Shevchenko
rm_get_irq_byname(pdev, irq_name); > + if (node) > + err_irq[j] = irq_of_parse_and_map(node, 2); > + else { > + sprintf(irq_name, "edma%d_err", j); > + err_irq[j] = platform_get_irq_byn

[PATCH] mmc: sdhci: introduce sdhci_update_clock helper to re-enable clock

2013-01-07 Thread Andy Shevchenko
There are three places where same piece of code is used. Let's split it to a separate function. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/sdhci.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/driver

[PATCHv2] mmc: dw_mmc: use __devexit_p macro for .remove()

2012-10-03 Thread Andy Shevchenko
Signed-off-by: Andy Shevchenko --- drivers/mmc/host/dw_mmc-pci.c |2 +- drivers/mmc/host/dw_mmc-pltfm.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-pci.c b/drivers/mmc/host/dw_mmc-pci.c index edb37e9..53a09cb 100644 --- a/drivers/mmc

Re: [PATCH 1/2] mmc: dw_mmc: use __devinit_p macro for .remove()

2012-10-03 Thread Andy Shevchenko
On Wed, 2012-10-03 at 22:41 +0900, Girish K S wrote: > its __devexit_p not __devinit_p True. Thanks for catching this typo. -- Andy Shevchenko Intel Finland Oy -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majord...@vger.ke

[PATCH 2/2] mmc: dw_mmc: use helper macro module_platform_driver()

2012-10-03 Thread Andy Shevchenko
Since v3.2 we have nice macro to define the platform driver's init and exit calls. This patch simplifies the dw_mmc platform driver by using that macro. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/dw_mmc-pltfm.c | 14 ++ 1 file changed, 2 insertions(+), 12 dele

[PATCH 1/2] mmc: dw_mmc: use __devinit_p macro for .remove()

2012-10-03 Thread Andy Shevchenko
Signed-off-by: Andy Shevchenko --- drivers/mmc/host/dw_mmc-pci.c |2 +- drivers/mmc/host/dw_mmc-pltfm.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-pci.c b/drivers/mmc/host/dw_mmc-pci.c index edb37e9..53a09cb 100644 --- a/drivers/mmc

Re: [PATCH 1/1] mmc: debugfs: Set frequency to maximum possible on higher request

2012-09-03 Thread Andy Shevchenko
changing this parameter. -- With Best Regards, Andy Shevchenko -- 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/1] mmc: debugfs: Set frequency to maximum possible on higher request

2012-09-03 Thread Andy Shevchenko
val = host->f_max; It's a matter of taste. However, I think it's time to start Documentation/mmc/debugfs.txt and describe the file there. -- With Best Regards, Andy Shevchenko -- 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/2] mmc: add functions to enable/disable aggressive clock gating

2011-08-18 Thread Andy Shevchenko
est Regards, Andy Shevchenko -- 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

[PATCH 4/4] mmc: sdhci: use f_max instead of host->clock for timeouts

2011-08-03 Thread Andy Shevchenko
When timeout_clk is calculated the host->clock could be zero. So, instead of host->clock the calculation uses mmc->f_max. Signed-off-by: Andy Shevchenko Cc: Mark Brown --- drivers/mmc/host/sdhci.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH 3/4] mmc: sdhci: move timeout_clk calculation a bit further

2011-08-03 Thread Andy Shevchenko
We will need the f_max for our calculations in the next patch in the series. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/sdhci.c | 38 +++--- 1 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host

[PATCH 2/4] mmc: sdhci: check host->clock before use it as denominator

2011-08-03 Thread Andy Shevchenko
[] kernel_thread_helper+0x6/0xd <0>[4.015507] Code: 57 89 d7 56 53 89 c3 83 ec 10 8b 40 04 8b 72 28 f6 c4 10 89 45 f0 0f 85 91 00 00 00 85 f6 0f 84 c1 00 00 00 8b 4e 04 31 d2 89 c8 73 58 ba d3 4d 62 10 89 c1 8b 06 f7 e2 c1 ea 06 01 d1 f7 45 <0>[4.015829] EIP: [] sdhci_calc_timeout+0x2e/0x1

[PATCH 1/4] Revert "mmc: sdhci: Fix SDHCI_QUIRK_TIMEOUT_USES_SDCLK"

2011-08-03 Thread Andy Shevchenko
This reverts commit 4b01681c77642c62a833187066c35e71e59caaf5. --- drivers/mmc/host/sdhci.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 51c3b3f..aef7982 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/m

[PATCH 0/4] mmc: sdhci: try to avoid another division by zero

2011-08-03 Thread Andy Shevchenko
The set of patches that applied for 3.0 exposes another "division by zero" error. This set tries to remake the "Fix SDHCI_QUIRK_TIMEOUT_USES_SDCLK" patch. Comments are very welcome! Of course, the set needs to be tested carefully. Andy Shevchenko (4): Rev

Re: [PATCH] mmc: mmc_test: avoid stalled file in debugfs

2011-07-26 Thread Andy Shevchenko
reate_file(name, mode, card->debugfs_root, > +card, fops); Hmm... Its length is exact 80 symbols which is OK for checkpatch.pl. Anyway, thanks for review. -- Andy Shevchenko Intel Finland Oy -- To unsubscribe from this list: send the line &q

[PATCH] mmc: mmc_test: avoid stalled file in debugfs

2011-07-22 Thread Andy Shevchenko
During card removal and inserting cycle the test file in the debugfs could be stalled until the host driver removes it. Let's keep the file in the linked list and destroy it when card is removed. Signed-off-by: Andy Shevchenko --- drivers/mmc/card/mmc_test.c |

[PATCHv1] mmc_test: minor clean up, use t = &test.area everywhere

2011-05-10 Thread Andy Shevchenko
Signed-off-by: Andy Shevchenko --- drivers/mmc/card/mmc_test.c | 75 +-- 1 files changed, 44 insertions(+), 31 deletions(-) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index 35252c1..233cdfa 100644 --- a/drivers/mmc/card

[PATCHv2.1] mmc: omap_hsmmc: split duplicate code to calc_divisor() function

2011-05-10 Thread Andy Shevchenko
There are two places where the same calculations are done. Let's split them to separate function. In addition the new function is simplified by usage DIV_ROUND_UP kernel macro. Signed-off-by: Andy Shevchenko Signed-off-by: Adrian Hunter --- drivers/mmc/host/omap_hsmmc.c |

[PATCHv2.1] mmc: omap_hsmmc: reduce a bit the error handlers in probe()

2011-05-10 Thread Andy Shevchenko
The code contains the similarities in the error path of probe function. Let's combine them at one place. Signed-off-by: Andy Shevchenko Signed-off-by: Adrian Hunter --- drivers/mmc/host/omap_hsmmc.c | 17 ++--- 1 files changed, 6 insertions(+), 11 deletions(-) diff --

Re: [PATCH] drivers/mmc/card/block.c: fix potential null dereference 'idata'

2011-05-10 Thread Andy Shevchenko
With Best Regards, Andy Shevchenko -- 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] drivers/mmc/card/block.c: fix potential null dereference 'idata'

2011-05-09 Thread Andy Shevchenko
truct block_device *bdev, >>> -- >>> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" >>> 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 02/12] mmc: mmc_test: add debugfs file to list all tests

2011-05-07 Thread Andy Shevchenko
              card->debugfs_root, card, &mmc_test_fops_testlist); > + >        if (IS_ERR_OR_NULL(file)) { >                dev_err(&card->dev, >                        "Can't create file. Perhaps debugfs is disabled.\n"); I think you also need to use simi

Re: [PATCH V2 04/16] mmc: omap_hsmmc: reduce a bit the error handlers in probe()

2011-05-06 Thread Andy Shevchenko
On Fri, May 6, 2011 at 2:34 PM, Varadarajan, Charulatha wrote: > On Fri, May 6, 2011 at 14:44, Adrian Hunter wrote: >> From: Andy Shevchenko >> > > Add patch description here. You mean something like following: "The code contains similarities in the error path of pro

[PATCHv2] mmc: append a file to change host clock at run time

2010-10-13 Thread Andy Shevchenko
hich are applied accordingly to used host driver. Signed-off-by: Andy Shevchenko --- drivers/mmc/core/debugfs.c | 35 +-- 1 files changed, 33 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c index 96d10f4..9

Re: [PATCH] mmc: append a file to change host clock at run time

2010-10-13 Thread Andy Shevchenko
t;f_max) >> +               return -EINVAL; >> + >> +       mmc_set_clock(host, (unsigned int) val); > > Probably need to claim the host here otherwise you might > be changing the clock while a request is in progress Yeah, good catch. Will fix. Thanks. -- With Best Reg

Re: [PATCH] mmc: append a file to change host clock at run time

2010-10-13 Thread Andy Shevchenko
On Tue, Oct 12, 2010 at 6:17 PM, Andy Shevchenko wrote: > For debugging power managment features there is quite convenient to have a > possibility to change MMC host controller clock at run time. This patch adds > 'clock' file under MMC host root of debugfs. > > Usage as

[PATCH] mmc: append a file to change host clock at run time

2010-10-12 Thread Andy Shevchenko
hich are applied accordingly to used host driver. Signed-off-by: Andy Shevchenko --- drivers/mmc/core/debugfs.c | 33 +++-- 1 files changed, 31 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c index 96d10f4..4ff109f 100

[PATCHv2] mmc_test: move files from sysfs to debugfs

2010-09-10 Thread Andy Shevchenko
192 sectors (4096 KiB) took 0.124664314 seconds (33644 kB/s, 32856 KiB/s) [ 604.933227] mmc0: Result: OK [ 604.936248] mmc0: Tests completed. # cat /sys/kernel/debug/mmc0/mmc0\:0001/test Test 25: 0 1 8192 0.124664314 33644784 Signed-off-by: Andy Shevchenko --- drivers/mmc/c

[PATCH] mmc_test: move files from sysfs to debugfs

2010-09-10 Thread Andy Shevchenko
192 sectors (4096 KiB) took 0.124664314 seconds (33644 kB/s, 32856 KiB/s) [ 604.933227] mmc0: Result: OK [ 604.936248] mmc0: Tests completed. # cat /sys/kernel/debug/mmc0/mmc0\:0001/test Test 25: 0 1 8192 0.124664314 33644784 Signed-off-by: Andy Shevchenko --- drivers/mmc/c

Re: [PATCHv6 3/3] mmc_test: collect data and show it via sysfs by demand

2010-09-08 Thread Andy Shevchenko
ion/ABI/ entry. > > Remember, sysfs is "one value per file".  Does that work with this file? > At first glance, it doesn't look like it. > > Please use debugfs instead. I guess to optimize a work I may do another patch which shifts from sysfs to debugfs. -- With Bes

Re: [PATCHv6 3/3] mmc_test: collect data and show it via sysfs by demand

2010-09-08 Thread Andy Shevchenko
print OK/FAIL/UNSUP_HOST/UNSUP_CARD for return > values 0-3.  Would you mind adding that?  (Unfortunately, it invalidates > the usage example I just gave above, so that should change too..) I thought about it. But for the scripts may be better to keep numeric value as well. I will think ag

Re: [PATCHv6 3/3] mmc_test: collect data and show it via sysfs by demand

2010-09-08 Thread Andy Shevchenko
     This driver is only of interest to those developing or >          testing a host driver. Most people should say N here. > > which I guess is good enough, given the smallness and sophistication of > its users.  It could be improved on though! Ok. Thanks. -- With Best Regards, Andy

[PATCHv6 1/3] mmc_test: use API to check card type

2010-09-07 Thread Andy Shevchenko
There are methods to check card type. Let's use them instead of direct checking type bits. Signed-off-by: Andy Shevchenko --- drivers/mmc/card/mmc_test.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c

[PATCHv6 3/3] mmc_test: collect data and show it via sysfs by demand

2010-09-07 Thread Andy Shevchenko
y. We have the file created under sysfs already and we could use it to out test results. This patch applied on top of patches published here [1] [1] http://lkml.org/lkml/2010/8/18/164 Signed-off-by: Andy Shevchenko --- drivers/mmc/card/mmc_test.c | 171

[PATCHv6 2/3] mmc_test: change simple_strtol() to strict_strtol()

2010-09-07 Thread Andy Shevchenko
It's better to use strict_strtol() to convert user's input and strictly check it. At least it forbids to interpret wrong input as a 0 and prevents to run all tests. Signed-off-by: Andy Shevchenko --- drivers/mmc/card/mmc_test.c |5 +++-- 1 files changed, 3 insertions(+), 2

Re: [PATCH] mmc_test: collect data and show it via sysfs by demand

2010-09-07 Thread Andy Shevchenko
Please, skip this certain patch. new version is in the series marked as PATCHv6. Sorry for noise. -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majord...@vger.kernel.org More majordomo inf

[PATCH] mmc_test: collect data and show it via sysfs by demand

2010-09-07 Thread Andy Shevchenko
already and we could use it to out test results. Signed-off-by: Andy Shevchenko --- drivers/mmc/card/mmc_test.c | 171 ++- 1 files changed, 169 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index 9a1

[PATCHv5 1/3] mmc_test: use API to check card type

2010-09-06 Thread Andy Shevchenko
There are methods to check card type. Let's use them instead of direct checking type bits. Signed-off-by: Andy Shevchenko --- drivers/mmc/card/mmc_test.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c

[PATCHv5 3/3] mmc_test: collect data and show it via sysfs by demand

2010-09-06 Thread Andy Shevchenko
atch which brings possibility to get test results via sysfs. It helps to do tests non-interactively. We have the file created under sysfs already and we could use it to out test results. Signed-off-by: Andy Shevchenko --- drivers/mmc/card/mmc_test.c | 170

[PATCHv5 2/3] mmc_test: change simple_strtol() to strict_strtol()

2010-09-06 Thread Andy Shevchenko
It's better to use strict_strtol() to convert user's input and strictly check it. At least it forbids to interpret wrong input as a 0 and prevents to run all tests. Signed-off-by: Andy Shevchenko --- drivers/mmc/card/mmc_test.c |5 +++-- 1 files changed, 3 insertions(+), 2

Re: [PATCH 2/3] mmc_test: change simple_strtol() to strict_strtol()

2010-09-01 Thread Andy Shevchenko
mp;testcase)) > space required^ here It's odd. I have space in my patch. -- With Best Regards, Andy Shevchenko -- 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

[PATCH 2/3] mmc_test: change simple_strtol() to strict_strtol()

2010-08-31 Thread Andy Shevchenko
Signed-off-by: Andy Shevchenko --- drivers/mmc/card/mmc_test.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index 359fae9..5423ac9 100644 --- a/drivers/mmc/card/mmc_test.c +++ b/drivers/mmc/card

[PATCH 3/3] mmc_test: collect data and show it via sysfs by demand

2010-08-31 Thread Andy Shevchenko
Signed-off-by: Andy Shevchenko --- drivers/mmc/card/mmc_test.c | 116 ++- 1 files changed, 114 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index 5423ac9..3cfef37 100644 --- a/drivers/mmc/card

[PATCH 1/3] mmc_test: use API to check card type

2010-08-31 Thread Andy Shevchenko
Signed-off-by: Andy Shevchenko --- drivers/mmc/card/mmc_test.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index 7aaa4b2..359fae9 100644 --- a/drivers/mmc/card/mmc_test.c +++ b/drivers/mmc/card/mmc_test.c

[PATCH 0/3] mmc_test: show test results via sysfs

2010-08-31 Thread Andy Shevchenko
There is a patchset which brings possibility to get test results via sysfs. It helps to do tests non-interactively. Andy Shevchenko (3): mmc_test: use API to check card type mmc_test: change simple_strtol() to strict_strtol() mmc_test: collect data and show it via sysfs by demand drivers

[PATCHv2] mmc: make mmc_dev_to_card() macro public

2010-08-20 Thread Andy Shevchenko
Conversion from struct device to struct mmc_card is used more than in one place. Due to this it's better to have public macro for such thing. Signed-off-by: Andy Shevchenko Cc: Adrian Hunter Cc: linux-mmc@vger.kernel.org Cc: Andrew Morton --- drivers/mmc/card/mmc_test.c |4 +--- dr

Re: [PATCH] mmc: make dev_to_mmc_card() macro public

2010-08-20 Thread Andy Shevchenko
f patch or fix against patch? -- With Best Regards, Andy Shevchenko -- 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

[PATCH] mmc: make dev_to_mmc_card() macro public

2010-08-18 Thread Andy Shevchenko
Conversion from struct device to struct mmc_card is used more than in one place. Due to this it's better to have public macro for such thing. Signed-off-by: Andy Shevchenko Cc: Adrian Hunter Cc: linux-mmc@vger.kernel.org --- drivers/mmc/card/mmc_test.c |4 +--- drivers/mmc/core/