Re: [PATCH -next] dmaengine: ste_dma40: fix error return code in d40_probe()

2013-05-28 Thread Andy Shevchenko
(err) { > + ret = dma_set_max_seg_size(base->dev, STEDMA40_MAX_SEG_SIZE); > + if (ret) { > d40_err(&pdev->dev, "Failed to set dma max seg size\n"); > goto failure; > } > > -- > To unsubscribe from this list: send the line

Re: [PATCH] drivers: mfd: tps65912: Convert to use devm_kzalloc

2013-05-28 Thread Andy Shevchenko
from drivers/mfd/tps65912-core.c:21: > include/linux/device.h:574:14: note: expected ‘struct device *’ but argument > is of type ‘struct device **’ -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the b

Re: [PATCH 1/1] drivers/misc: at2x: use devm_kzalloc() to make cleanup paths simpler

2013-05-28 Thread Andy Shevchenko
esses; i++) > if (at24->client[i]) > i2c_unregister_device(at24->client[i]); > - No need to remove this empty line. > @@ -666,9 +653,6 @@ static int at24_remove(struct i2c_client *client) > > for (i = 1; i < at24->num_address

Re: [PATCH v3 1/2] drivers/misc: at24: convert to use devm_kzalloc

2013-05-29 Thread Andy Shevchenko
On Tue, May 28, 2013 at 11:00 PM, Nikolay Balandin wrote: > From: Nikolay Balandin > > Use devm_kzalloc to make cleanup paths simpler > > Signed-off-by: Nikolay Balandin Reviewed-by: Andy Shevchenko > --- > drivers/misc

Re: [PATCH v3 2/2] drivers/misc: at25: convert to use devm_kzalloc

2013-05-29 Thread Andy Shevchenko
On Tue, May 28, 2013 at 11:01 PM, Nikolay Balandin wrote: > From: Nikolay Balandin > > Use devm_kzalloc to make cleanup paths simpler > > Signed-off-by: Nikolay Balandin Reviewed-by: Andy Shevchenko > --- > drivers/misc/eeprom/at25.c | 25 -

[PATCH 1/6] dma: acpi-dma: introduce ACPI DMA helpers

2013-03-27 Thread Andy Shevchenko
a_controller_free(). Usually, the driver uses only devm_acpi_dma_controller_register(). Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Acked-by: Rafael J. Wysocki --- Documentation/acpi/enumeration.txt | 77 ++ drivers/dma/Kconfig| 4 + drivers/dma/Make

[PATCH 4/6] dw_dmac: add ACPI support

2013-03-27 Thread Andy Shevchenko
Since we have proper ACPI DMA helpers implemented, the driver may use it. This patch introduces custom filter function together with acpi_device_id table. Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko --- drivers/dma/dw_dmac.c | 68

[PATCH 2/6] dmaengine: call acpi_dma_request_slave_channel as well

2013-03-27 Thread Andy Shevchenko
The slave device could be enumerated by ACPI. In that case the dma_request_slave_channel should use the acpi_dma_request_slave_channel() helper. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Acked-by: Rafael J. Wysocki --- drivers/dma/dmaengine.c | 6 ++ 1 file changed, 6

[PATCH 6/6] ACPI / LPSS: add Lynxpoint DMA controller to the list

2013-03-27 Thread Andy Shevchenko
In Lynxpoint we have to enable clock per each LPSS device. That's why we have to enumerate them from drivers/acpi/acpi_lpss.c. The DMA controller is one of such devices. Signed-off-by: Andy Shevchenko --- drivers/acpi/acpi_lpss.c | 7 +++ drivers/clk/x86/clk-lpt.c | 2 +- 2 files ch

[PATCH 0/6] dmaengine: add ACPI DMA helpers and use them in dw_dmac

2013-03-27 Thread Andy Shevchenko
There is a patch series which introduces ACPI DMA helpers in similar way like we have for DeviceTree. In addition it applies this to the first user, namely dw_dmac driver. Andy Shevchenko (6): dma: acpi-dma: introduce ACPI DMA helpers dmaengine: call acpi_dma_request_slave_channel as well

[PATCH 5/6] ACPI / LPSS: return no error from register_device_clock in special cases

2013-03-27 Thread Andy Shevchenko
When device uses the fixed clock and has no private space of LTR, we have to create main LPSS clock and register platform device. This is normally a case for LPSS DMA controller. Signed-off-by: Andy Shevchenko --- drivers/acpi/acpi_lpss.c | 4 1 file changed, 4 insertions(+) diff --git a

[PATCH 3/6] dma: acpi-dma: parse CSRT to extract additional resources

2013-03-27 Thread Andy Shevchenko
Since we have CSRT only to get additional DMA controller resources, let's get rid of drivers/acpi/csrt.c and move its logic inside ACPI DMA helpers code. Signed-off-by: Andy Shevchenko Signed-off-by: Mika Westerberg Acked-by: Rafael J. Wysocki --- drivers/acpi/Makefile| 1 - dr

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: [PATCH 06/10] dmatest: run test via debugfs

2013-03-07 Thread Andy Shevchenko
Oh, missed Cc list in the middle. Return it back and thus leave a full message below. On Thu, Mar 7, 2013 at 8:11 AM, Vinod Koul wrote: > On Wed, Mar 06, 2013 at 05:53:20PM +0200, Andy Shevchenko wrote: >> >> > How do you terminate a test? Esp if you have started

Re: [PATCH 05/10] dmatest: split test parameters to separate structure

2013-03-08 Thread Andy Shevchenko
On Tue, 2013-03-05 at 17:16 +0800, Viresh Kumar wrote: > On 4 March 2013 17:09, Andy Shevchenko > wrote: > > Better to keep test parameters separate from internal variables. > > > > Signed-off-by: Andy Shevchenko > > --- &g

Re: [PATCH 00/10] dmatest: update the module to use debugfs

2013-03-08 Thread Andy Shevchenko
On Thu, 2013-03-07 at 11:50 +0530, Vinod Koul wrote: > On Mon, Mar 04, 2013 at 11:09:24AM +0200, Andy Shevchenko wrote: > > The first approach to get dmatest module more flexible and easier to play > > with. > > The amount of patches could be reduced, but I would like to get

Re: [PATCH 00/10] dmatest: update the module to use debugfs

2013-03-11 Thread Andy Shevchenko
On Sun, Mar 10, 2013 at 3:44 PM, Viresh Kumar wrote: > On 8 March 2013 21:11, Andy Shevchenko > wrote: >> On Thu, 2013-03-07 at 11:50 +0530, Vinod Koul wrote: >>> On Mon, Mar 04, 2013 at 11:09:24AM +0200, Andy Shevchenko wrote: >>> > The first approach to get

[PATCH 1/7] dw_dmac: mark dwc_dump_chan_regs as inline

2012-09-17 Thread Andy Shevchenko
Signed-off-by: Andy Shevchenko --- drivers/dma/dw_dmac.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index 832538c..75ab5af 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c @@ -208,7 +208,7 @@ static inline

[PATCH 5/7] dw_dmac: autoconfigure data_width or get it via platform data

2012-09-17 Thread Andy Shevchenko
Not all of the controllers support the 64 bit data width. Make it configurable via platform data. The driver will try to get a value from the component parameters, otherwise it will use the platform data.. Signed-off-by: Andy Shevchenko --- arch/arm/mach-spear13xx/spear13xx.c |2 ++ arch

[PATCH 3/7] dw_dmac: get number of channels from hardware if possible

2012-09-17 Thread Andy Shevchenko
In case the controller has the encoded parameters feature enabled the driver will use it to get the number of channels. In the future it will be used for the other important parameters as well. Signed-off-by: Andy Shevchenko --- drivers/dma/dw_dmac.c | 33

[PATCH 4/7] dw_dmac: autoconfigure block_size or use platform data

2012-09-17 Thread Andy Shevchenko
The maximum block size is a configurable parameter for the chip. So, driver will try to get it from the encoded component parameters. Otherwise it will come from the platform data. Signed-off-by: Andy Shevchenko --- arch/arm/mach-spear13xx/spear13xx.c |1 + arch/avr32/mach-at32ap

[PATCH 7/7] dw_dmac: introduce software emulation of LLP transfers

2012-09-17 Thread Andy Shevchenko
Some controllers have the reduced functionality where the LLP multi block transfers are not supported. This patch introduces a support of such controllers. In case of memory copy or scatter-gather lists it emulates LLP transfers via bunch of the regular single block ones. Signed-off-by: Andy

[PATCH 6/7] dw_dmac: check if controller supports LLP

2012-09-17 Thread Andy Shevchenko
Some controllers have the reduced functionality where the LLP multi block transfers are not supported. This patch introduces a check and refuses to deal with such devices. Signed-off-by: Andy Shevchenko --- drivers/dma/dw_dmac.c | 35 ++- drivers/dma

[PATCH 0/7] dw_dmac: introduce autoconfiguration

2012-09-17 Thread Andy Shevchenko
transfers. It means that normal linked list transfer is substituted by set of single block transfers transparently to the user. Comments are welcome. Andy Shevchenko (7): dw_dmac: mark dwc_dump_chan_regs as inline dw_dmac: fill optional encoded parameters in register structure dw_dmac: get number of

[PATCH 2/7] dw_dmac: fill optional encoded parameters in register structure

2012-09-17 Thread Andy Shevchenko
There is a block of the registers that are optional. However, if enabled they contain useful information about the controller hardware configuration. We will use this piece of data to autoconfigure the driver. Signed-off-by: Andy Shevchenko --- drivers/dma/dw_dmac_regs.h | 19

Re: [PATCH 2/7] dw_dmac: fill optional encoded parameters in register structure

2012-09-17 Thread Andy Shevchenko
setof(struct dw_dma_regs, name)) > > + > > But why don't you use earlier defined readl/writel macros: > dma_readl and dma_writel? If you look at further patches, namely 3rd, the access to the register is needed before we allocate memory for the dw_dma structure. -- Andy Shevchenko

Re: [PATCH 2/7] dw_dmac: fill optional encoded parameters in register structure

2012-09-20 Thread Andy Shevchenko
On Tue, 2012-09-18 at 13:29 +0530, viresh kumar wrote: > On Tue, Sep 18, 2012 at 12:25 PM, Andy Shevchenko > wrote: > >> > +#define dma_raw_readl(addr, name) \ > >> > + readl((addr) + offsetof(struct dw_dma_regs, name)) > >> > + >

Re: [PATCH 3/7] dw_dmac: get number of channels from hardware if possible

2012-09-20 Thread Andy Shevchenko
On Tue, 2012-09-18 at 12:20 +0530, viresh kumar wrote: > On Mon, Sep 17, 2012 at 1:09 PM, Andy Shevchenko > wrote: > > In case the controller has the encoded parameters feature enabled the driver > > will use it to get the number of channels. In the future it will be used

Re: [PATCH 4/7] dw_dmac: autoconfigure block_size or use platform data

2012-09-20 Thread Andy Shevchenko
> > + unsigned short block_size; > > + > > You actually don't save any memory here with short and actually makes access > to block_size more complex. keeping it int would be better i believe. I rather agree with you. I'll change it. -- Andy Shevchenko Intel Finland Oy -- 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/

Re: [PATCH 5/7] dw_dmac: autoconfigure data_width or get it via platform data

2012-09-20 Thread Andy Shevchenko
On Tue, 2012-09-18 at 12:41 +0530, viresh kumar wrote: > On Mon, Sep 17, 2012 at 1:09 PM, Andy Shevchenko > wrote: > > @@ -647,7 +657,11 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t > > dest, dma_addr_t src, > > return NULL; > >

Re: [PATCH 7/7] dw_dmac: introduce software emulation of LLP transfers

2012-09-20 Thread Andy Shevchenko
On Tue, 2012-09-18 at 12:47 +0530, viresh kumar wrote: > On Mon, Sep 17, 2012 at 1:09 PM, Andy Shevchenko > wrote: > > @@ -555,8 +594,36 @@ static void dw_dma_tasklet(unsigned long data) > > dwc_handle_cyclic(dw, dwc, status_err, status_xfer); > >

Re: [PATCH 6/7] dw_dmac: check if controller supports LLP

2012-09-20 Thread Andy Shevchenko
On Tue, 2012-09-18 at 12:43 +0530, viresh kumar wrote: > On Mon, Sep 17, 2012 at 1:09 PM, Andy Shevchenko > wrote: > > Some controllers have the reduced functionality where the LLP multi block > > transfers are not supported. This patch introduces a check and refuses to >

Re: [PATCH 0/7] dw_dmac: introduce autoconfiguration

2012-09-20 Thread Andy Shevchenko
On Tue, 2012-09-18 at 14:11 +0800, Hein Tibosch wrote: > On 9/17/2012 3:39 PM, Andy Shevchenko wrote: > > Here is a patchset that allows to adapt the driver to the hardware > > configuration during probe time. The hardware should have the specific > > optional > > pa

Re: [PATCH 2/7] dw_dmac: fill optional encoded parameters in register structure

2012-09-20 Thread Andy Shevchenko
On Thu, Sep 20, 2012 at 12:32 PM, viresh kumar wrote: > On Thu, Sep 20, 2012 at 3:00 PM, Andy Shevchenko > wrote: >>> Ok. If i am not wrong, such calls are only required once for below line: >> Actually twice... >>> dw_params = dma_raw_readl(regs, DW_PARAMS >>

Re: [PATCH 5/7] dw_dmac: autoconfigure data_width or get it via platform data

2012-09-20 Thread Andy Shevchenko
On Thu, Sep 20, 2012 at 12:46 PM, viresh kumar wrote: > On Thu, Sep 20, 2012 at 3:12 PM, Andy Shevchenko > wrote: >>> Do these changes in a single patch 2/7 >> From this comment I guess you would like to have dw_dmac_regs.h changes >> at one place. Am I right? > &

[PATCH] Possible bug fix in the ehci-hcd

2008-02-07 Thread Andy Shevchenko
Hi! The Sequans company who produce WiMAX chips provides the USB driver and kthp addon driver. However the USB device doesn't work correctly. Here is more true hack for Sequans SQN11x0 based modem. P.S. For more details, please, ask Sequans staff (see Signed-off-by lines). Signed-off-by:

[PATCH] dw_dmac: use devm_* functions to simplify code

2012-07-24 Thread Andy Shevchenko
Use devm_kzalloc, devm_clk_get, devm_request_irq, and devm_request_and_ioremap to reduce the code and to simplify the error path. Signed-off-by: Andy Shevchenko Cc: Viresh Kumar --- drivers/dma/dw_dmac.c | 53 +--- drivers/dma/dw_dmac_regs.h

[PATCH] tools: perf: remove yet another strtoull()

2012-07-10 Thread Andy Shevchenko
Signed-off-by: Andy Shevchenko Cc: Arnaldo Carvalho de Melo --- tools/perf/util/symbol.c | 22 +- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 50958bb..b0c8c8a 100644 --- a/tools/perf/util/symbol.c

[PATCH 2/3] dw_dmac: use 'u32' for LLI structure members, not dma_addr_t

2012-07-13 Thread Andy Shevchenko
Use 'u32' for the LLI structure members, which are defined by hardware to be 32-bit. dma_addr_t is much more vague about its actual size. Signed-off-by: Andy Shevchenko --- drivers/dma/dw_dmac.c |7 ++- drivers/dma/dw_dmac_regs.h |6 +++--- 2 files changed, 5 insert

[PATCH 1/3] dw_dmac: mark dwc_dump_lli inline

2012-07-13 Thread Andy Shevchenko
Signed-off-by: Andy Shevchenko --- drivers/dma/dw_dmac.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index 9151511..db56ef4 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c @@ -413,7 +413,7 @@ static void

[PATCH 3/3] dw_dmac: set default alignment

2012-07-13 Thread Andy Shevchenko
The default values are filled to support at least mem-to-mem tests provided by dmatest module. It makes sense to choose the 4 bytes (2 least significant bits) alignment by the default. Signed-off-by: Andy Shevchenko --- drivers/dma/dw_dmac.c |6 ++ 1 file changed, 6 insertions(+) diff

Re: [PATCH 3/3] dw_dmac: set default alignment

2012-07-13 Thread Andy Shevchenko
t does this mean? We will not support > transfers with unaligned > addresses/length to word size? The dmatest module uses those constants to get source, destination addresses and length of the test data aligned. On the other hand we can't use unaligned address in LLI because of t

Re: [PATCH 3/3] dw_dmac: set default alignment

2012-07-13 Thread Andy Shevchenko
ill in my pool. -- With Best Regards, Andy Shevchenko -- 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/

Re: [PATCH 3/3] dw_dmac: set default alignment

2012-07-13 Thread Andy Shevchenko
On Fri, Jul 13, 2012 at 1:30 PM, viresh kumar wrote: > Sorry, got confused now. What works without this patch? And what doesn't work > without it? It seems this patch is redundant. -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscr

[PATCH 1/2] dw_dmac: fill len field of the descriptor

2013-01-21 Thread Andy Shevchenko
It will be useful to have the length of the transfer in the descriptor. The cyclic transfer functions remained untouched. Signed-off-by: Andy Shevchenko --- drivers/dma/dw_dmac.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index

[PATCH 2/2] dw_dmac: return proper residue value

2013-01-21 Thread Andy Shevchenko
field in the descriptor structure is left untouched by the original code. Signed-off-by: Andy Shevchenko --- drivers/dma/dw_dmac.c | 93 - 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c

Re: [PATCH 2/2] dw_dmac: return proper residue value

2013-01-21 Thread Andy Shevchenko
On Mon, 2013-01-21 at 00:49 -0800, Vinod Koul wrote: > On Mon, Jan 21, 2013 at 11:00:44AM +0200, Andy Shevchenko wrote: > > Currently the driver returns full length of the active descriptor which is > > wrong. We have to go throught the active descriptor and sum up the lengt

Re: [PATCH v2 02/10] spi/pxa2xx: fix warnings when compiling a 64-bit kernel

2013-01-21 Thread Andy Shevchenko
_base + SSDR; > -- > 1.7.10.4 > > -- > 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 F

Re: [PATCH 2/2] dw_dmac: return proper residue value

2013-01-21 Thread Andy Shevchenko
On Mon, 2013-01-21 at 06:22 -0800, Vinod Koul wrote: > On Mon, Jan 21, 2013 at 11:45:51AM +0200, Andy Shevchenko wrote: > > > > + return 0; > > > hmmm, why not use BLOCK_TS value. That way you dont need to look at > > > direction > > > and alo

Re: [PATCH] lib: vsprintf: Add %pa format specifier for phys_addr_t types

2013-01-21 Thread Andy Shevchenko
+ return number(buf, end, > + (unsigned long long) *((phys_addr_t *)ptr), spec); > } > spec.flags |= SMALL; > if (spec.field_width == -1) { > -- > The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, > hosted by The Linux Foundation > -- Andy Shevchenko Intel Finland Oy -- 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/

Re: [PATCH 2/2] dw_dmac: return proper residue value

2013-01-22 Thread Andy Shevchenko
On Tue, 2013-01-22 at 13:41 +0530, Viresh Kumar wrote: > On Mon, Jan 21, 2013 at 2:30 PM, Andy Shevchenko > wrote: > > Currently the driver returns full length of the active descriptor which is > > wrong. We have to go throught the active descriptor and sum up the length of &

Re: [PATCH 2/2] dw_dmac: return proper residue value

2013-01-23 Thread Andy Shevchenko
On Tue, 2013-01-22 at 15:10 +0530, Viresh Kumar wrote: > On 22 January 2013 14:52, Andy Shevchenko > wrote: > > On Tue, 2013-01-22 at 13:41 +0530, Viresh Kumar wrote: > >> > + spin_lock_irqsave(&dwc->lock, flags); > >> > + if (list_empty(&am

Re: [PATCH 2/2] dw_dmac: return proper residue value

2013-01-23 Thread Andy Shevchenko
On Wed, Jan 23, 2013 at 11:22 AM, Viresh Kumar wrote: > On 23 January 2013 14:42, Andy Shevchenko > wrote: >> Yesterday I spent in testing of different approaches. First of all, the >> calculation of the sent amount is nicer when ctlhi/ctllo is used and it >> works fine

Re: [PATCH 2/2] dw_dmac: return proper residue value

2013-01-23 Thread Andy Shevchenko
On Wed, Jan 23, 2013 at 11:51 AM, Viresh Kumar wrote: > On 23 January 2013 15:06, Andy Shevchenko wrote: >> On Wed, Jan 23, 2013 at 11:22 AM, Viresh Kumar >> wrote: >>> Second to solve your problem, you can add another field here: total_len. >>> I know it wi

Re: [PATCH 2/2] dw_dmac: return proper residue value

2013-01-23 Thread Andy Shevchenko
On Wed, 2013-01-23 at 15:54 +0530, Viresh Kumar wrote: > On 23 January 2013 15:50, Andy Shevchenko wrote: > > What about to calc len every time from lli.* instead of keeping it in > > the len field of the descriptor? > > That's even bad.. we spend time on something

[PATCH v2 4/4] dw_dmac: return proper residue value

2013-01-23 Thread Andy Shevchenko
by this patch due to len field in the descriptor structure is left untouched by the original code. Signed-off-by: Andy Shevchenko --- drivers/dma/dw_dmac.c | 53 ++-- drivers/dma/dw_dmac_regs.h |1 + 2 files changed, 52 insertions(+), 2 deletions

[PATCH v2 3/4] dw_dmac: fill individual length of descriptor

2013-01-23 Thread Andy Shevchenko
It will be useful to have the length of the transfer in the descriptor. The cyclic transfer functions remained untouched. Signed-off-by: Andy Shevchenko --- drivers/dma/dw_dmac.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dma/dw_dmac.c b/drivers/dma

[PATCH v2 0/4] dw_dmac: return proper residue value

2013-01-23 Thread Andy Shevchenko
The patch series is targeted for getting proper residue value. Since v1: - everything is rewritten to address Viresh's and Vinod's comments. Andy Shevchenko (4): dw_dmac: remove unnecessary tx_list field in dw_dma_chan dw_dmac: introduce total_len field in struct dw_desc dw_

[PATCH v2 2/4] dw_dmac: introduce total_len field in struct dw_desc

2013-01-23 Thread Andy Shevchenko
By this new field we distinguish a total length of the chain and the individual length of each descriptor in the chain. Signed-off-by: Andy Shevchenko --- drivers/dma/dw_dmac.c | 12 ++-- drivers/dma/dw_dmac_regs.h |1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff

[PATCH v2 1/4] dw_dmac: remove unnecessary tx_list field in dw_dma_chan

2013-01-23 Thread Andy Shevchenko
The soft LLP mode is working for active descriptor only. So, we do not need to have a copy of its pointer. Signed-off-by: Andy Shevchenko --- drivers/dma/dw_dmac.c | 17 - drivers/dma/dw_dmac_regs.h |1 - 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a

[PATCH v2] dw_dmac: apply default dma_mask if needed

2013-02-14 Thread Andy Shevchenko
In some cases we got the device without dma_mask configured. We have to apply the default value to avoid crashes during memory mapping. Signed-off-by: Andy Shevchenko Acked-by: Viresh Kumar --- Since v1: - rebased on top of recent next branch from Vinod drivers/dma/dw_dmac.c |6 ++ 1

[PATCH v2 4/6] dma: coh901318: set residue only if dma is in progress

2013-02-14 Thread Andy Shevchenko
When status is DMA_SUCCESS the residue should be zero. Otherwise it's a bug. Signed-off-by: Andy Shevchenko Acked-by: Viresh Kumar Cc: Linus Walleij Cc: linux-arm-ker...@lists.infradead.org --- drivers/dma/coh901318.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --

[PATCH v2 6/6] dma: tegra20-apb-dma: remove unnecessary assignment

2013-02-14 Thread Andy Shevchenko
There is no need to assign 0 to residue, because dma_cookie_status() does this for us. Signed-off-by: Andy Shevchenko Acked-by: Viresh Kumar Acked-by: Laxman Dewangan --- drivers/dma/tegra20-apb-dma.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/dma/tegra20-apb-dma.c b

[PATCH v2 0/6] dma: various fixes in different DMAC drivers

2013-02-14 Thread Andy Shevchenko
This is a patcset of independent fixes of the DMAC drivers. They are simple and being understandable in their context. Since v1: - address all comments - add ACKs - rebase on top of recent Vinod's next branch Andy Shevchenko (6): dma: of-dma: protect list write operation by spin

[PATCH v2 2/6] dmaengine.h: remove redundant else keyword

2013-02-14 Thread Andy Shevchenko
dmaengine_device_control returns -ENOSYS in case the dma driver doesn't have such functionality. Signed-off-by: Andy Shevchenko Acked-by: Viresh Kumar --- include/linux/dmaengine.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/dmaengine.h b/in

[PATCH v2 5/6] edma: do not waste memory for dma_mask

2013-02-14 Thread Andy Shevchenko
Accordingly to commentary in the platform_device_register_full the memory allocated for dma_mask will not going to be freed. That's why is better to assign dma_mask afterwards. Signed-off-by: Andy Shevchenko Acked-by: Viresh Kumar --- drivers/dma/edma.c |6 -- 1 file chang

[PATCH v2 3/6] dma: coh901318: avoid unbalanced locking

2013-02-14 Thread Andy Shevchenko
In case the len is 0 we must return without trying to unlock the lock that was not locked. Signed-off-by: Andy Shevchenko Acked-by: Viresh Kumar Cc: Linus Walleij Cc: linux-arm-ker...@lists.infradead.org --- drivers/dma/coh901318_lli.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v2 1/6] dma: of-dma: protect list write operation by spin_lock

2013-02-14 Thread Andy Shevchenko
It's possible to have an inconsistency in the list due to unprotected operation on it. The patch adds a proper locking on the list operation. Signed-off-by: Andy Shevchenko Acked-by: Rob Herring Acked-by: Viresh Kumar --- drivers/dma/of-dma.c |2 ++ 1 file changed, 2 insertions(+)

Re: [PATCH 3/6] dma: coh901318_lli: avoid unbalanced locking

2013-02-15 Thread Andy Shevchenko
On Fri, Feb 15, 2013 at 4:52 PM, Linus Walleij wrote: > On Tue, Feb 12, 2013 at 11:58 AM, Andy Shevchenko > wrote: > >> I have not checked the code but there is a possibility that custom pool->lock >> is not needed at all due to dma_pool contains it's own lock.

Re: uhid: broken interface: 32/64-bit compatibility

2013-02-15 Thread Andy Shevchenko
switch to new one. That's what I afraid of. Better to try to avoid any excessive requirement to the existing userspace. -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vge

Re: [PATCH 2/4] dmaengine: dw_dmac: move to generic DMA binding

2013-02-16 Thread Andy Shevchenko
ntreq; Could you use here full name like "request_line"? And I think the better place for it in subsection "hardware configuration" (consider non-DT cases of use). > /* backlink to dw_dma */ > struct dw_dma *dw; > }; We should not have this in linux-next. Are you sure you rebased it on top of recent one? -- With Best Regards, Andy Shevchenko -- 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/

Re: [PATCH 2/4] dmaengine: dw_dmac: move to generic DMA binding

2013-02-16 Thread Andy Shevchenko
On Sat, Feb 16, 2013 at 4:00 PM, Arnd Bergmann wrote: > On Saturday 16 February 2013, Andy Shevchenko wrote: >> On Fri, Feb 15, 2013 at 8:21 PM, Arnd Bergmann wrote: >> > + if (WARN_ON(fargs.req >= 16 || fargs.src >= 2 || fargs.dst >= 2)) >> > +

Re: [PATCHv3 2/4] dmaengine: dw_dmac: move to generic DMA binding

2013-02-16 Thread Andy Shevchenko
e generic DMA binding, as well as the earlier attempt from > Viresh. Both of these are currently not merged upstream however. > > This version incorporates feedback from Viresh Kumar, Andy Shevchenko > and Russell King. Sorry, few comments below. After addressing them take my Acked

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Andy Shevchenko
@sd_count: count of slave data structures passed. > */ > struct dw_dma_platform_data { > unsigned intnr_channels; > @@ -38,6 +60,9 @@ struct dw_dma_platform_data { > unsigned short block_size; > unsigned char nr_masters; > unsigned char data_widt

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Andy Shevchenko
On Fri, Oct 12, 2012 at 11:34 AM, Viresh Kumar wrote: > On 12 October 2012 13:53, Andy Shevchenko > wrote: >> On Fri, 2012-10-12 at 11:14 +0530, Viresh Kumar wrote: >>> diff --git a/Documentation/devicetree/bindings/dma/snps-dma.txt >>> b/Documentation/device

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Andy Shevchenko
On Fri, Oct 12, 2012 at 1:36 PM, viresh kumar wrote: > On Fri, Oct 12, 2012 at 1:53 PM, Andy Shevchenko > wrote: >> On Fri, 2012-10-12 at 11:14 +0530, Viresh Kumar wrote: > >>> + while (++i < dw->sd_count) { >>> +

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Andy Shevchenko
On Fri, Oct 12, 2012 at 2:01 PM, Viresh Kumar wrote: > On 12 October 2012 16:10, Andy Shevchenko wrote: >>>>> + if (!found) { >>>>> + last_dw = dw; >>>>> + last_bus_id = param; >>>>> + retur

Re: [PATCH 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Andy Shevchenko
property_read_u32(cn, "dst_master", &val)) > + sd[count].dst_master = (u8)val; ditto > + > + sd[count].dma_dev = &pdev->dev; > + count++; > + } what about to define sd as sd[0]; in the platform_data structure

Re: [PATCH V2 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Andy Shevchenko
> dw->chan[i].initialized = false; > } > > +#ifdef CONFIG_OF > +static struct dw_dma_platform_data * > +__devinit dw_dma_parse_dt(struct platform_device *pdev) > +{ > + struct device_node *sn, *cn, *np = pdev->dev.of_node; > + struct dw_dma_platform_da

Re: [PATCH V2 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-12 Thread Andy Shevchenko
On Fri, Oct 12, 2012 at 6:18 PM, Viresh Kumar wrote: > On 12 October 2012 20:28, Andy Shevchenko > wrote: >> On Fri, 2012-10-12 at 20:01 +0530, Viresh Kumar wrote: > >>> + if (last_dw) { >>> + if ((last_bus_id == param) && (last_dw == dw

Re: [PATCH REGRESSION FIX] dw_dmac: make driver's endianness configurable

2012-10-14 Thread Andy Shevchenko
t dw_dma_chan *to_dw_dma_chan(struct dma_chan *chan) > { > @@ -246,9 +254,9 @@ static inline struct dw_dma_regs __iomem > *__dw_regs(struct dw_dma *dw) > } > > #define dma_readl(dw, name) \ > - readl(&(__dw_regs(dw)->name)) > + dma_readl_native(&(__d

Re: [PATCH REGRESSION FIX] dw_dmac: make driver's endianness configurable

2012-10-15 Thread Andy Shevchenko
On Mon, 2012-10-15 at 08:39 +0800, Hein Tibosch wrote: > Hi Andy, > On 10/15/2012 4:08 AM, Andy Shevchenko wrote: > > On Sun, Oct 14, 2012 at 10:54 AM, Hein Tibosch > > wrote: > >> From: Hein Tibosch > >> > >> The dw_dmac was originally dev

Re: [PATCH V2 2/3] dmaengine: dw_dmac: Enhance device tree support

2012-10-15 Thread Andy Shevchenko
On Mon, 2012-10-15 at 08:59 +0530, Viresh Kumar wrote: > On 12 October 2012 20:28, Andy Shevchenko > wrote: > >> + if (last_dw) { > >> + if ((last_bus_id == param) && (last_dw == dw)) > >> + return false; > >>

[PATCH] dmatest: terminate all ongoing transfers before submitting new one

2012-10-16 Thread Andy Shevchenko
ests, 0 failures (status 0) [ 89.955059] dma0chan5-copy0: terminating after 50 tests, 0 failures (status 0) [ 90.697073] dma0chan6-copy0: terminating after 50 tests, 1 failures (status 0) [ 90.893422] dma0chan7-copy0: terminating after 50 tests, 1 failures (status 0) Signed-off-by: And

Re: [PATCH] dmatest: terminate all ongoing transfers before submitting new one

2012-10-16 Thread Andy Shevchenko
On Tue, Oct 16, 2012 at 11:56 AM, viresh kumar wrote: > On Tue, Oct 16, 2012 at 2:15 PM, Andy Shevchenko > wrote: >> The following error messages come if we have software LLP emulation enabled >> and >> enough threads running. >> >> modprobe dmatest ite

Re: [PATCH] dmatest: terminate all ongoing transfers before submitting new one

2012-10-16 Thread Andy Shevchenko
higher timeout. And > terminating > transfers for error case would be better, to make them timeout safe. Yeah, seems the patch is not necessary. In case of software emulation we just have a test passed much slow... -- With Best Regards, Andy Shevchenko -- To unsubscribe from this

[PATCHv3 1/6] lib/string: introduce helper to get base file name from given path

2012-10-16 Thread Andy Shevchenko
There are several places in the kernel that use functionality like basename(3) with an exception: in case of '/foo/bar/' we expect to get an empty string. Let's do it common helper for them. Signed-off-by: Andy Shevchenko Cc: Jason Baron Cc: YAMANE Toshiaki Cc: Greg Kroah-Har

[PATCHv3 5/6] procfs: reuse kbasename() functionality

2012-10-16 Thread Andy Shevchenko
Signed-off-by: Andy Shevchenko --- fs/proc/proc_devtree.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c index df7dd08..3d9fd66 100644 --- a/fs/proc/proc_devtree.c +++ b/fs/proc/proc_devtree.c @@ -13,6 +13,7

[PATCHv3 1/6] string: introduce helper to get base file name from given path

2012-10-16 Thread Andy Shevchenko
There are several places in the kernel that use functionality like basename(3) with the exception: in case of '/foo/bar/' we expect to get an empty string. Let's do it common helper for them. Signed-off-by: Andy Shevchenko --- include/linux/string.h | 11 +++ 1 f

[PATCHv3 6/6] trace: reuse kbasename() functionality

2012-10-16 Thread Andy Shevchenko
Signed-off-by: Andy Shevchenko Cc: Steven Rostedt Cc: Frederic Weisbecker --- kernel/trace/trace_uprobe.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index 03003cd..c7ba4f6 100644 --- a/kernel/trace

[PATCHv3 3/6] staging: rts_pstor: reuse kbasename()

2012-10-16 Thread Andy Shevchenko
needed there as well. Signed-off-by: Andy Shevchenko Cc: YAMANE Toshiaki Cc: Greg Kroah-Hartman --- drivers/staging/rts_pstor/trace.h | 24 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/drivers/staging/rts_pstor/trace.h b/drivers/staging/rts_psto

[PATCHv3 2/6] lib: dynamic_debug: reuse kbasename()

2012-10-16 Thread Andy Shevchenko
Remove the custom implementation of the functionality similar to kbasename(). Signed-off-by: Andy Shevchenko Cc: Jason Baron --- lib/dynamic_debug.c |9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index e7f7d99..1db1fc6

[PATCHv3 0/6] lib/string: introduce kbasename helper

2012-10-16 Thread Andy Shevchenko
ch 1/1 to all people involved to the series - rebase against recent linux-next Since v1: - fix changelog of the patch 1 - we are doing basename(3) alike helper - usb related patch temporary excluded from series (under discussion with Greg) Andy Shevchenko (6): lib/string: introduce helper to get base

[PATCHv3 4/6] mm: reuse kbasename() functionality

2012-10-16 Thread Andy Shevchenko
Signed-off-by: Andy Shevchenko Cc: linux...@kvack.org --- mm/memory.c |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 5823f29..06158b7 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -58,6 +58,7 @@ #include #include #include

[PATCHv2 2/2] dw_dmac: make usage of dw_dma_slave optional

2012-11-21 Thread Andy Shevchenko
dma_slave_config structure. That's why the custom slave configuration could be optional for such cases. Signed-off-by: Andy Shevchenko Acked-by: Viresh Kumar --- drivers/dma/dw_dmac.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/dma/dw_dmac.c b/driver

[PATCHv2 1/2] dw_dmac: store direction in the custom channel structure

2012-11-21 Thread Andy Shevchenko
best candidate to provide the storage is a custom channel structure. Until now we still keep and check the direction field of the slave config structure as well. Signed-off-by: Andy Shevchenko Acked-by: Viresh Kumar --- drivers/dma/dw_dmac.c | 12 ++-- drivers/dma/dw_dmac_regs.h

[PATCH] kfifo: initialize fifo accordingly to C99 standard

2012-11-21 Thread Andy Shevchenko
When build a kernel with "make W=1" we will get a warning about missing initializer. It comes from kfifo usage style. The DEFINE_KFIFO macro doesn't initialize the buf[] field of the fifo structure. So, using C99 style helps in such case. Signed-off-by: Andy Shevchenko Cc: Stef

[PATCH, resend] kfifo: initialize fifo accordingly to C99 standard

2012-11-21 Thread Andy Shevchenko
When build a kernel with "make W=1" we will get a warning about missing initializer. It comes from kfifo usage style. The DEFINE_KFIFO macro doesn't initialize the buf[] field of the fifo structure. So, using C99 style helps in such case. Signed-off-by: Andy Shevchenko Cc: Stef

Re: dw_dmac patches

2013-01-11 Thread Andy Shevchenko
On Tue, 2013-01-08 at 07:54 -0800, Vinod Koul wrote: > On Mon, Jan 07, 2013 at 02:54:54PM +0200, Andy Shevchenko wrote: > > Hi, Vinod. > > > > I noticed you missed the 3.8 merge window and I can't see any of my > > recent patches [1] in your next branch. So, wh

[PATCH] dw_dmac: don't exceed AHB master number in dwc_get_data_width

2013-01-14 Thread Andy Shevchenko
also changes the logic a bit when the master parameter of the dwc_get_data_width() is out of range. Now the function will return a value related to the first AHB master. Signed-off-by: Andy Shevchenko --- drivers/dma/dw_dmac.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --

<    1   2   3   4   5   6   7   8   9   10   >