Împrumut

2018-08-07 Thread WTR-I MA Chandimal
Dragă domnule doamnă,

 Numele meu este Daisy Lukas din SUN LOAN, companie cu sediul în United 
State(USA), la Sun Loan suntem dedicati sa oferim un serviciu de creditare 
rapida si usoara pentru clientii nostri. Facem efortul nostru maxim pentru a 
satisface toate nevoile clienților, Oferim tot felul de împrumuturi de 
aproximativ €5,000 la un maxim de €200 milioane și mai mult cu rata dobânzii de 
2% ..

  Contactați-ne dacă sunteți interesat de serviciile noastre prin e-mail, 
sunloan1...@usa.com sau sunloan1...@gmail.com sau sunați la +1805-918-5445 și 
completați formularul de mai jos

Nume:
Gen:
Țară:
Suma necesară:
durată:
Scop:
Telefon:

Cu respect,

Daisy Lukas.
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Împrumut

2018-08-07 Thread LWTR MKE Sameera
Dragă domnule doamnă,

 Numele meu este Daisy Lukas din SUN LOAN, companie cu sediul în United 
State(USA), la Sun Loan suntem dedicati sa oferim un serviciu de creditare 
rapida si usoara pentru clientii nostri. Facem efortul nostru maxim pentru a 
satisface toate nevoile clienților, Oferim tot felul de împrumuturi de 
aproximativ €5,000 la un maxim de €200 milioane și mai mult cu rata dobânzii de 
2% ..

  Contactați-ne dacă sunteți interesat de serviciile noastre prin e-mail, 
sunloan1...@usa.com sau sunloan1...@gmail.com sau sunați la +1805-918-5445 și 
completați formularul de mai jos

Nume:
Gen:
Țară:
Suma necesară:
durată:
Scop:
Telefon:

Cu respect,

Daisy Lukas.


--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v8 1/3] dmaengine: fsl-edma: extract common fsl-edma code (no changes in behavior intended)

2018-08-07 Thread Stefan Agner
On 07.08.2018 14:14, Krzysztof Kozlowski wrote:
> On 7 August 2018 at 10:08, Stefan Agner  wrote:
>> On 03.08.2018 21:32, Angelo Dureghello wrote:
>>> This patch adds a new fsl-edma-common module to allow new
>>> mcf-edma module code to use most of the fsl-edma code.
>>>
>>> Signed-off-by: Angelo Dureghello 
>>> ---
>>> Changes for v2:
>>> - patch splitted into 4
>>> - add mcf-edma as minimal different parts from fsl-edma
>>>
>>> Changes for v3:
>>> none
>>>
>>> Changes for v4:
>>> - patch simplified from 4/4 into 2/2
>>> - collecting all the mcf-edma-related changes
>>>
>>> Changes for v5:
>>> none
>>>
>>> Changes for v6:
>>> - adjusted comment header
>>> - fixed bit shift with BIT()
>>> - we need to free the interrupts at remove(), so removed all devm_
>>>   interrupt related calls
>>>
>>> Changes for v7:
>>> none
>>>
>>> Changes for v8:
>>> - patch rewritten from scratch, splitted into 3, common code isolated,
>>>   minimal changes from the original Freescale code have been done.
>>>   The patch has been tested with both Iris + Colibri Vybrid VF50 and
>>>   stmark2/mcf54415 Coldfire boards.
>>> ---
>>>  drivers/dma/Makefile  |   2 +-
>>>  drivers/dma/fsl-edma-common.c | 576 
>>>  drivers/dma/fsl-edma-common.h | 196 ++
>>>  drivers/dma/fsl-edma.c| 697 +-
>>>  4 files changed, 774 insertions(+), 697 deletions(-)
>>>  create mode 100644 drivers/dma/fsl-edma-common.c
>>>  create mode 100644 drivers/dma/fsl-edma-common.h
>>>
>>> diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
>>> index 203a99d68315..66022f59fca4 100644
>>> --- a/drivers/dma/Makefile
>>> +++ b/drivers/dma/Makefile
>>> @@ -31,7 +31,7 @@ obj-$(CONFIG_DW_AXI_DMAC) += dw-axi-dmac/
>>>  obj-$(CONFIG_DW_DMAC_CORE) += dw/
>>>  obj-$(CONFIG_EP93XX_DMA) += ep93xx_dma.o
>>>  obj-$(CONFIG_FSL_DMA) += fsldma.o
>>> -obj-$(CONFIG_FSL_EDMA) += fsl-edma.o
>>> +obj-$(CONFIG_FSL_EDMA) += fsl-edma.o fsl-edma-common.o
>>>  obj-$(CONFIG_FSL_RAID) += fsl_raid.o
>>>  obj-$(CONFIG_HSU_DMA) += hsu/
>>>  obj-$(CONFIG_IMG_MDC_DMA) += img-mdc-dma.o
>>> diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c
>>> new file mode 100644
>>> index ..0ae7094f477a
>>> --- /dev/null
>>> +++ b/drivers/dma/fsl-edma-common.c
>>> @@ -0,0 +1,576 @@
>>> +// SPDX-License-Identifier: GPL-2.0
>>> +//
>>> +// Copyright (c) 2013-2014 Freescale Semiconductor, Inc
>>> +// Copyright (c) 2017 Sysam, Angelo Dureghello  
>>> +
>>> +#include 
>>> +#include 
>>> +#include 
>>> +
>>> +#include "fsl-edma-common.h"
>>> +
>>> +/*
>>> + * R/W functions for big- or little-endian registers:
>>> + * The eDMA controller's endian is independent of the CPU core's endian.
>>> + * For the big-endian IP module, the offset for 8-bit or 16-bit registers
>>> + * should also be swapped opposite to that in little-endian IP.
>>> + */
>>> +u32 edma_readl(struct fsl_edma_engine *edma, void __iomem *addr)
>>> +{
>>> + if (edma->big_endian)
>>> + return ioread32be(addr);
>>> + else
>>> + return ioread32(addr);
>>> +}
>>> +EXPORT_SYMBOL_GPL(edma_readl);
>>
>> In 3/3 you link the common object into the two modules individually:
>>
>> obj-$(CONFIG_FSL_EDMA) += fsl-edma.o fsl-edma-common.o
>> obj-$(CONFIG_MCF_EDMA) += mcf-edma.o fsl-edma-common.o
>>
>> Therefor you do not access those functions from another module (they are
>> within the module). No exporting should be necessary. Drop all those
>> exports.
> 
> The fsl-edma-common will be its own module so the exports are
> necessary for proper linking/modpost.

Hm, oh I see, I got that wrong.

We could use
fsl-edma-all-y = fsl-edma.o fsl-edma-common.o
obj-$(CONFIG_FSL_EDMA) += fsl-edma-all.o
mcf-edma-all-y = mcf-edma.o fsl-edma-common.o
obj-$(CONFIG_MCF_EDMA) += mcf-edma-all.o

to create two modules but that duplicates some code. It probably
wouldn't matter in practise since the two IPs are used on different
architecture...

However, if we stay with the three modules approach, we should introduce
a hidden config symbol, e.g.

config FSL_EDMA_COMMON
tristate

In FSL_EDMA/MCF_EDMA use
select FSL_EDMA_COMMON

And in the Makefile
obj-$(CONFIG_FSL_EDMA_COMMON) += fsl-edma-common.o
obj-$(CONFIG_FSL_EDMA) += fsl-edma.o
obj-$(CONFIG_MCF_EDMA) += mcf-edma.o


However, I do not like that the compiler can no longer inline simple
acesors like edma_(readl|writel). So if we stay with the three modules
approach then move at least the accesors and
to_fsl_edma_chan/to_fsl_edma_desc as inline functions to the header
file.

--
Stefan

> 
> Best regards,
> Krzysztof
> 
>> If possible I would prefer if you start with cleanup/conversions, then
>> split-up and finally add functionality.
>>
>> So ideally:
>> 1. Use macros for preprocessor defines (where you move to BIT/GENMASK)
>> 2. Split
>> 3. Add EDMA macros etc.
>> 4. Add ColdFire mcf5441x edma support
>>
--
To unsubscribe from this list: send the line "unsubscribe 

Re: [PATCH v8 1/3] dmaengine: fsl-edma: extract common fsl-edma code (no changes in behavior intended)

2018-08-07 Thread Krzysztof Kozlowski
On 7 August 2018 at 10:08, Stefan Agner  wrote:
> On 03.08.2018 21:32, Angelo Dureghello wrote:
>> This patch adds a new fsl-edma-common module to allow new
>> mcf-edma module code to use most of the fsl-edma code.
>>
>> Signed-off-by: Angelo Dureghello 
>> ---
>> Changes for v2:
>> - patch splitted into 4
>> - add mcf-edma as minimal different parts from fsl-edma
>>
>> Changes for v3:
>> none
>>
>> Changes for v4:
>> - patch simplified from 4/4 into 2/2
>> - collecting all the mcf-edma-related changes
>>
>> Changes for v5:
>> none
>>
>> Changes for v6:
>> - adjusted comment header
>> - fixed bit shift with BIT()
>> - we need to free the interrupts at remove(), so removed all devm_
>>   interrupt related calls
>>
>> Changes for v7:
>> none
>>
>> Changes for v8:
>> - patch rewritten from scratch, splitted into 3, common code isolated,
>>   minimal changes from the original Freescale code have been done.
>>   The patch has been tested with both Iris + Colibri Vybrid VF50 and
>>   stmark2/mcf54415 Coldfire boards.
>> ---
>>  drivers/dma/Makefile  |   2 +-
>>  drivers/dma/fsl-edma-common.c | 576 
>>  drivers/dma/fsl-edma-common.h | 196 ++
>>  drivers/dma/fsl-edma.c| 697 +-
>>  4 files changed, 774 insertions(+), 697 deletions(-)
>>  create mode 100644 drivers/dma/fsl-edma-common.c
>>  create mode 100644 drivers/dma/fsl-edma-common.h
>>
>> diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
>> index 203a99d68315..66022f59fca4 100644
>> --- a/drivers/dma/Makefile
>> +++ b/drivers/dma/Makefile
>> @@ -31,7 +31,7 @@ obj-$(CONFIG_DW_AXI_DMAC) += dw-axi-dmac/
>>  obj-$(CONFIG_DW_DMAC_CORE) += dw/
>>  obj-$(CONFIG_EP93XX_DMA) += ep93xx_dma.o
>>  obj-$(CONFIG_FSL_DMA) += fsldma.o
>> -obj-$(CONFIG_FSL_EDMA) += fsl-edma.o
>> +obj-$(CONFIG_FSL_EDMA) += fsl-edma.o fsl-edma-common.o
>>  obj-$(CONFIG_FSL_RAID) += fsl_raid.o
>>  obj-$(CONFIG_HSU_DMA) += hsu/
>>  obj-$(CONFIG_IMG_MDC_DMA) += img-mdc-dma.o
>> diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c
>> new file mode 100644
>> index ..0ae7094f477a
>> --- /dev/null
>> +++ b/drivers/dma/fsl-edma-common.c
>> @@ -0,0 +1,576 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +//
>> +// Copyright (c) 2013-2014 Freescale Semiconductor, Inc
>> +// Copyright (c) 2017 Sysam, Angelo Dureghello  
>> +
>> +#include 
>> +#include 
>> +#include 
>> +
>> +#include "fsl-edma-common.h"
>> +
>> +/*
>> + * R/W functions for big- or little-endian registers:
>> + * The eDMA controller's endian is independent of the CPU core's endian.
>> + * For the big-endian IP module, the offset for 8-bit or 16-bit registers
>> + * should also be swapped opposite to that in little-endian IP.
>> + */
>> +u32 edma_readl(struct fsl_edma_engine *edma, void __iomem *addr)
>> +{
>> + if (edma->big_endian)
>> + return ioread32be(addr);
>> + else
>> + return ioread32(addr);
>> +}
>> +EXPORT_SYMBOL_GPL(edma_readl);
>
> In 3/3 you link the common object into the two modules individually:
>
> obj-$(CONFIG_FSL_EDMA) += fsl-edma.o fsl-edma-common.o
> obj-$(CONFIG_MCF_EDMA) += mcf-edma.o fsl-edma-common.o
>
> Therefor you do not access those functions from another module (they are
> within the module). No exporting should be necessary. Drop all those
> exports.

The fsl-edma-common will be its own module so the exports are
necessary for proper linking/modpost.

Best regards,
Krzysztof

> If possible I would prefer if you start with cleanup/conversions, then
> split-up and finally add functionality.
>
> So ideally:
> 1. Use macros for preprocessor defines (where you move to BIT/GENMASK)
> 2. Split
> 3. Add EDMA macros etc.
> 4. Add ColdFire mcf5441x edma support
>
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v8 1/3] dmaengine: fsl-edma: extract common fsl-edma code (no changes in behavior intended)

2018-08-07 Thread Stefan Agner
On 03.08.2018 21:32, Angelo Dureghello wrote:
> This patch adds a new fsl-edma-common module to allow new
> mcf-edma module code to use most of the fsl-edma code.
> 
> Signed-off-by: Angelo Dureghello 
> ---
> Changes for v2:
> - patch splitted into 4
> - add mcf-edma as minimal different parts from fsl-edma
> 
> Changes for v3:
> none
> 
> Changes for v4:
> - patch simplified from 4/4 into 2/2
> - collecting all the mcf-edma-related changes
> 
> Changes for v5:
> none
> 
> Changes for v6:
> - adjusted comment header
> - fixed bit shift with BIT()
> - we need to free the interrupts at remove(), so removed all devm_
>   interrupt related calls
> 
> Changes for v7:
> none
> 
> Changes for v8:
> - patch rewritten from scratch, splitted into 3, common code isolated,
>   minimal changes from the original Freescale code have been done.
>   The patch has been tested with both Iris + Colibri Vybrid VF50 and
>   stmark2/mcf54415 Coldfire boards.
> ---
>  drivers/dma/Makefile  |   2 +-
>  drivers/dma/fsl-edma-common.c | 576 
>  drivers/dma/fsl-edma-common.h | 196 ++
>  drivers/dma/fsl-edma.c| 697 +-
>  4 files changed, 774 insertions(+), 697 deletions(-)
>  create mode 100644 drivers/dma/fsl-edma-common.c
>  create mode 100644 drivers/dma/fsl-edma-common.h
> 
> diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
> index 203a99d68315..66022f59fca4 100644
> --- a/drivers/dma/Makefile
> +++ b/drivers/dma/Makefile
> @@ -31,7 +31,7 @@ obj-$(CONFIG_DW_AXI_DMAC) += dw-axi-dmac/
>  obj-$(CONFIG_DW_DMAC_CORE) += dw/
>  obj-$(CONFIG_EP93XX_DMA) += ep93xx_dma.o
>  obj-$(CONFIG_FSL_DMA) += fsldma.o
> -obj-$(CONFIG_FSL_EDMA) += fsl-edma.o
> +obj-$(CONFIG_FSL_EDMA) += fsl-edma.o fsl-edma-common.o
>  obj-$(CONFIG_FSL_RAID) += fsl_raid.o
>  obj-$(CONFIG_HSU_DMA) += hsu/
>  obj-$(CONFIG_IMG_MDC_DMA) += img-mdc-dma.o
> diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c
> new file mode 100644
> index ..0ae7094f477a
> --- /dev/null
> +++ b/drivers/dma/fsl-edma-common.c
> @@ -0,0 +1,576 @@
> +// SPDX-License-Identifier: GPL-2.0
> +//
> +// Copyright (c) 2013-2014 Freescale Semiconductor, Inc
> +// Copyright (c) 2017 Sysam, Angelo Dureghello  
> +
> +#include 
> +#include 
> +#include 
> +
> +#include "fsl-edma-common.h"
> +
> +/*
> + * R/W functions for big- or little-endian registers:
> + * The eDMA controller's endian is independent of the CPU core's endian.
> + * For the big-endian IP module, the offset for 8-bit or 16-bit registers
> + * should also be swapped opposite to that in little-endian IP.
> + */
> +u32 edma_readl(struct fsl_edma_engine *edma, void __iomem *addr)
> +{
> + if (edma->big_endian)
> + return ioread32be(addr);
> + else
> + return ioread32(addr);
> +}
> +EXPORT_SYMBOL_GPL(edma_readl);

In 3/3 you link the common object into the two modules individually:

obj-$(CONFIG_FSL_EDMA) += fsl-edma.o fsl-edma-common.o
obj-$(CONFIG_MCF_EDMA) += mcf-edma.o fsl-edma-common.o

Therefor you do not access those functions from another module (they are
within the module). No exporting should be necessary. Drop all those
exports.

If possible I would prefer if you start with cleanup/conversions, then
split-up and finally add functionality.

So ideally:
1. Use macros for preprocessor defines (where you move to BIT/GENMASK)
2. Split
3. Add EDMA macros etc.
4. Add ColdFire mcf5441x edma support

--
Stefan

> +
> +void edma_writeb(struct fsl_edma_engine *edma, u8 val, void __iomem *addr)
> +{
> + /* swap the reg offset for these in big-endian mode */
> + if (edma->big_endian)
> + iowrite8(val, (void __iomem *)((unsigned long)addr ^ 0x3));
> + else
> + iowrite8(val, addr);
> +}
> +EXPORT_SYMBOL_GPL(edma_writeb);
> +
> +void edma_writew(struct fsl_edma_engine *edma, u16 val, void __iomem *addr)
> +{
> + /* swap the reg offset for these in big-endian mode */
> + if (edma->big_endian)
> + iowrite16be(val, (void __iomem *)((unsigned long)addr ^ 0x2));
> + else
> + iowrite16(val, addr);
> +}
> +EXPORT_SYMBOL_GPL(edma_writew);
> +
> +void edma_writel(struct fsl_edma_engine *edma, u32 val, void __iomem *addr)
> +{
> + if (edma->big_endian)
> + iowrite32be(val, addr);
> + else
> + iowrite32(val, addr);
> +}
> +EXPORT_SYMBOL_GPL(edma_writel);
> +
> +struct fsl_edma_chan *to_fsl_edma_chan(struct dma_chan *chan)
> +{
> + return container_of(chan, struct fsl_edma_chan, vchan.chan);
> +}
> +EXPORT_SYMBOL_GPL(to_fsl_edma_chan);
> +
> +struct fsl_edma_desc *to_fsl_edma_desc(struct virt_dma_desc *vd)
> +{
> + return container_of(vd, struct fsl_edma_desc, vdesc);
> +}
> +EXPORT_SYMBOL_GPL(to_fsl_edma_desc);
> +
> +static void fsl_edma_enable_request(struct fsl_edma_chan *fsl_chan)
> +{
> + void __iomem *addr = fsl_chan->edma->membase;
> + u32 ch = fsl_chan->vchan.chan.chan_id;
> +

Re: [PATCH v8 2/3] dmaengine: fsl-edma: add edma version and configurable registers

2018-08-07 Thread Stefan Agner
On 03.08.2018 21:32, Angelo Dureghello wrote:
> This patch adds configurable registers (using __iomem addresses)
> to allow the use of fsl-edma-common code with slightly different
> edma module versions, as Vybrid (v1) and ColdFire (v2) are.
> 
> Removal of old membase-referenced registers, amd some fixes on
> macroes are included.

s/amd/and
s/macroes/macros

Also split the macro fixes into a separate commit. We really want one
commit for each change... Its better to have 9 patches which might even
touch the same macros again, but patches which do one logical step.

--
Stefan

> 
> Signed-off-by: Angelo Dureghello 
> ---
> Changes from v7:
> - patch rewritten from scratch, this patch (2/3) has just been added.
> ---
>  drivers/dma/fsl-edma-common.c | 138 ++
>  drivers/dma/fsl-edma-common.h | 115 ++--
>  drivers/dma/fsl-edma.c|  32 
>  3 files changed, 182 insertions(+), 103 deletions(-)
> 
> diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c
> index 0ae7094f477a..948a3ee51bbb 100644
> --- a/drivers/dma/fsl-edma-common.c
> +++ b/drivers/dma/fsl-edma-common.c
> @@ -9,6 +9,38 @@
>  
>  #include "fsl-edma-common.h"
>  
> +#define EDMA_CR  0x00
> +#define EDMA_ES  0x04
> +#define EDMA_ERQ 0x0C
> +#define EDMA_EEI 0x14
> +#define EDMA_SERQ0x1B
> +#define EDMA_CERQ0x1A
> +#define EDMA_SEEI0x19
> +#define EDMA_CEEI0x18
> +#define EDMA_CINT0x1F
> +#define EDMA_CERR0x1E
> +#define EDMA_SSRT0x1D
> +#define EDMA_CDNE0x1C
> +#define EDMA_INTR0x24
> +#define EDMA_ERR 0x2C
> +
> +#define EDMA64_ERQH  0x08
> +#define EDMA64_EEIH  0x10
> +#define EDMA64_SERQ  0x18
> +#define EDMA64_CERQ  0x19
> +#define EDMA64_SEEI  0x1a
> +#define EDMA64_CEEI  0x1b
> +#define EDMA64_CINT  0x1c
> +#define EDMA64_CERR  0x1d
> +#define EDMA64_SSRT  0x1e
> +#define EDMA64_CDNE  0x1f
> +#define EDMA64_INTH  0x20
> +#define EDMA64_INTL  0x24
> +#define EDMA64_ERRH  0x28
> +#define EDMA64_ERRL  0x2c
> +
> +#define EDMA_TCD 0x1000
> +
>  /*
>   * R/W functions for big- or little-endian registers:
>   * The eDMA controller's endian is independent of the CPU core's endian.
> @@ -67,20 +99,20 @@ EXPORT_SYMBOL_GPL(to_fsl_edma_desc);
>  
>  static void fsl_edma_enable_request(struct fsl_edma_chan *fsl_chan)
>  {
> - void __iomem *addr = fsl_chan->edma->membase;
> + struct edma_regs *regs = _chan->edma->regs;
>   u32 ch = fsl_chan->vchan.chan.chan_id;
>  
> - edma_writeb(fsl_chan->edma, EDMA_SEEI_SEEI(ch), addr + EDMA_SEEI);
> - edma_writeb(fsl_chan->edma, ch, addr + EDMA_SERQ);
> + edma_writeb(fsl_chan->edma, EDMA_SEEI_SEEI(ch), regs->seei);
> + edma_writeb(fsl_chan->edma, ch, regs->serq);
>  }
>  
>  void fsl_edma_disable_request(struct fsl_edma_chan *fsl_chan)
>  {
> - void __iomem *addr = fsl_chan->edma->membase;
> + struct edma_regs *regs = _chan->edma->regs;
>   u32 ch = fsl_chan->vchan.chan.chan_id;
>  
> - edma_writeb(fsl_chan->edma, ch, addr + EDMA_CERQ);
> - edma_writeb(fsl_chan->edma, EDMA_CEEI_CEEI(ch), addr + EDMA_CEEI);
> + edma_writeb(fsl_chan->edma, ch, regs->cerq);
> + edma_writeb(fsl_chan->edma, EDMA_CEEI_CEEI(ch), regs->ceei);
>  }
>  EXPORT_SYMBOL_GPL(fsl_edma_disable_request);
>  
> @@ -208,7 +240,7 @@ static size_t fsl_edma_desc_residue(struct
> fsl_edma_chan *fsl_chan,
>   struct virt_dma_desc *vdesc, bool in_progress)
>  {
>   struct fsl_edma_desc *edesc = fsl_chan->edesc;
> - void __iomem *addr = fsl_chan->edma->membase;
> + struct edma_regs *regs = _chan->edma->regs;
>   u32 ch = fsl_chan->vchan.chan.chan_id;
>   enum dma_transfer_direction dir = fsl_chan->fsc.dir;
>   dma_addr_t cur_addr, dma_addr;
> @@ -224,11 +256,9 @@ static size_t fsl_edma_desc_residue(struct
> fsl_edma_chan *fsl_chan,
>   return len;
>  
>   if (dir == DMA_MEM_TO_DEV)
> - cur_addr = edma_readl(
> - fsl_chan->edma, addr + EDMA_TCD_SADDR(ch));
> + cur_addr = edma_readl(fsl_chan->edma, >tcd[ch].saddr);
>   else
> - cur_addr = edma_readl(
> - fsl_chan->edma, addr + EDMA_TCD_DADDR(ch));
> + cur_addr = edma_readl(fsl_chan->edma, >tcd[ch].daddr);
>  
>   /* figure out the finished and calculate the residue */
>   for (i = 0; i < fsl_chan->edesc->n_tcds; i++) {
> @@ -285,7 +315,7 @@ static void fsl_edma_set_tcd_regs(struct
> fsl_edma_chan *fsl_chan,
> struct fsl_edma_hw_tcd *tcd)
>  {
>   struct fsl_edma_engine *edma = fsl_chan->edma;
> - void __iomem *addr = fsl_chan->edma->membase;
> + struct edma_regs *regs = 

Re: [PATCH v8 1/3] dmaengine: fsl-edma: extract common fsl-edma code (no changes in behavior intended)

2018-08-07 Thread Krzysztof Kozlowski
On 6 August 2018 at 22:40, Angelo Dureghello  wrote:
> Hi Krzysztof,
>
> On Mon, Aug 06, 2018 at 09:43:42AM +0200, Krzysztof Kozlowski wrote:
>> On 3 August 2018 at 21:32, Angelo Dureghello  wrote:
>> > This patch adds a new fsl-edma-common module to allow new
>> > mcf-edma module code to use most of the fsl-edma code.
>> >
>> > Signed-off-by: Angelo Dureghello 
>> > ---
>> > Changes for v2:
>> > - patch splitted into 4
>> > - add mcf-edma as minimal different parts from fsl-edma
>> >
>> > Changes for v3:
>> > none
>> >
>> > Changes for v4:
>> > - patch simplified from 4/4 into 2/2
>> > - collecting all the mcf-edma-related changes
>> >
>> > Changes for v5:
>> > none
>> >
>> > Changes for v6:
>> > - adjusted comment header
>> > - fixed bit shift with BIT()
>> > - we need to free the interrupts at remove(), so removed all devm_
>> >   interrupt related calls
>> >
>> > Changes for v7:
>> > none
>> >
>> > Changes for v8:
>> > - patch rewritten from scratch, splitted into 3, common code isolated,
>> >   minimal changes from the original Freescale code have been done.
>> >   The patch has been tested with both Iris + Colibri Vybrid VF50 and
>> >   stmark2/mcf54415 Coldfire boards.
>> > ---
>> >  drivers/dma/Makefile  |   2 +-
>> >  drivers/dma/fsl-edma-common.c | 576 
>> >  drivers/dma/fsl-edma-common.h | 196 ++
>> >  drivers/dma/fsl-edma.c| 697 +-
>> >  4 files changed, 774 insertions(+), 697 deletions(-)
>> >  create mode 100644 drivers/dma/fsl-edma-common.c
>> >  create mode 100644 drivers/dma/fsl-edma-common.h
>> >
>> > diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
>> > index 203a99d68315..66022f59fca4 100644
>> > --- a/drivers/dma/Makefile
>> > +++ b/drivers/dma/Makefile
>> > @@ -31,7 +31,7 @@ obj-$(CONFIG_DW_AXI_DMAC) += dw-axi-dmac/
>> >  obj-$(CONFIG_DW_DMAC_CORE) += dw/
>> >  obj-$(CONFIG_EP93XX_DMA) += ep93xx_dma.o
>> >  obj-$(CONFIG_FSL_DMA) += fsldma.o
>> > -obj-$(CONFIG_FSL_EDMA) += fsl-edma.o
>> > +obj-$(CONFIG_FSL_EDMA) += fsl-edma.o fsl-edma-common.o
>> >  obj-$(CONFIG_FSL_RAID) += fsl_raid.o
>> >  obj-$(CONFIG_HSU_DMA) += hsu/
>> >  obj-$(CONFIG_IMG_MDC_DMA) += img-mdc-dma.o
>> > diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c
>> > new file mode 100644
>> > index ..0ae7094f477a
>> > --- /dev/null
>> > +++ b/drivers/dma/fsl-edma-common.c
>> > @@ -0,0 +1,576 @@
>> > +// SPDX-License-Identifier: GPL-2.0
>>
>> You moved code from fsl-edma.c which is licensed on GPL-2.0+. I think
>> that's not allowed as you effectively relicense the work on new
>> license.
>>
> Ok, so if i undestrand, i should change that comment to
> // SPDX-License-Identifier: GPL-2.0+
> Right ?

Yes, GPL-2.0+.

Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html