linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/11] dmaengine: sun6i: Fixes for H3/A83T, enable A64
@ 2017-09-28  1:49 Stefan Brüns
  2017-09-28 15:26 ` Maxime Ripard
  2017-10-16  7:02 ` Vinod Koul
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Brüns @ 2017-09-28  1:49 UTC (permalink / raw)
  To: linux-sunxi
  Cc: devicetree, Chen-Yu Tsai, Andre Przywara, linux-kernel,
	Dan Williams, Vinod Koul, Rob Herring, dmaengine, Code Kipper,
	Maxime Ripard, linux-arm-kernel, Stefan Brüns,
	Catalin Marinas, Will Deacon, Mark Rutland

Commit 3a03ea763a67 ("dmaengine: sun6i: Add support for Allwinner A83T
(sun8i) variant") and commit f008db8c00c1 ("dmaengine: sun6i: Add support for
Allwinner H3 (sun8i) variant") added support for the A83T resp. H3, but missed
some differences between the original A31 and A83T/H3.

The first patch adds a callback to the controller config to set the clock
autogating register of different SoC generations, i.e. A31, A23+A83T, H3+later,
and uses it to for the correct clock autogating setting.

The second patch adds a callback for the burst length setting in the channel
config register, which has different field offsets and new burst widths/lengths,
which differs between H3 and earlier generations

The third patch restructures some code required for the fourth patch and adds the
burst lengths to the controller config.

The fourth patch adds the burst widths to the config and adds the handling of the
H3 specific burst widths.

Patch 5 restructures the code to decouple some controller details (e.g. channel
count) from the compatible string/the config.

Patches 6, 7 and 8 introduce and use the "dma-chans" property for the A64. Although
register compatible to the H3, the channel count differs and thus it requires a
new compatible. To avoid introduction of new compatibles for each minor variation,
anything but the register model is moved to devicetree properties. There
is at least one SoC (R40) which can then reuse the A64 compatible, the same
would have worked for A83T+V3s.

Patches 9 and 10 add the DMA controller node to the devicetree and add the DMA
controller reference to the SPI nodes.

Patch 11 fixes a small error in the devicetree binding example.

Changes in v4:
- Correct callback function signature, pass pointer to controller
- sun6i_dma_dev refers to sun6i_dma_config and vice versa, add forward declaration
- Pass reference to config instead of config itself
- Fix config initialization
- remove range checks for dma-channels/dma-requests DT properties
- Split minor fix in devicetree example from patch 6/10

Changes in v3:
- Check for callback instead of using a no-op callback
- Drop leading 0 from unit name in DT example
- Omit default values from sun50i_a64_dma_cfg definition
- Drop leading 0 from dma controller unit name

Changes in v2:
- Use callback for autogating instead of variable for different SoC generations
- Use controller specific callback for burst length setting
- Store burst lengths in config instead of device structure
- Store burst widths in config
- Set default number of dma-request if not provided in config or devicetree

Stefan Brüns (11):
  dmaengine: sun6i: Correct setting of clock autogating register for
    A83T/H3
  dmaengine: sun6i: Correct burst length field offsets for H3
  dmaengine: sun6i: Restructure code to allow extension for new SoCs
  dmaengine: sun6i: Enable additional burst lengths/widths on H3
  dmaengine: sun6i: Move number of pchans/vchans/request to device
    struct
  arm64: allwinner: a64: Add devicetree binding for DMA controller
  dmaengine: sun6i: Retrieve channel count/max request from devicetree
  dmaengine: sun6i: Add support for Allwinner A64 and compatibles
  arm64: allwinner: a64: Add device node for DMA controller
  arm64: allwinner: a64: add dma controller references to spi nodes
  arm: allwinner: Correct unit name in devicetree binding example

 .../devicetree/bindings/dma/sun6i-dma.txt          |  28 ++-
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi      |  15 ++
 drivers/dma/sun6i-dma.c                            | 251 ++++++++++++++++-----
 3 files changed, 235 insertions(+), 59 deletions(-)

-- 
2.14.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 00/11] dmaengine: sun6i: Fixes for H3/A83T, enable A64
  2017-09-28  1:49 [PATCH v4 00/11] dmaengine: sun6i: Fixes for H3/A83T, enable A64 Stefan Brüns
@ 2017-09-28 15:26 ` Maxime Ripard
  2017-10-14  3:21   ` [linux-sunxi] " Chen-Yu Tsai
  2017-10-16  7:02 ` Vinod Koul
  1 sibling, 1 reply; 4+ messages in thread
From: Maxime Ripard @ 2017-09-28 15:26 UTC (permalink / raw)
  To: Stefan Brüns
  Cc: linux-sunxi, devicetree, Chen-Yu Tsai, Andre Przywara,
	linux-kernel, Dan Williams, Vinod Koul, Rob Herring, dmaengine,
	Code Kipper, linux-arm-kernel, Catalin Marinas, Will Deacon,
	Mark Rutland

[-- Attachment #1: Type: text/plain, Size: 1982 bytes --]

On Thu, Sep 28, 2017 at 01:49:17AM +0000, Stefan Brüns wrote:
> Commit 3a03ea763a67 ("dmaengine: sun6i: Add support for Allwinner A83T
> (sun8i) variant") and commit f008db8c00c1 ("dmaengine: sun6i: Add support for
> Allwinner H3 (sun8i) variant") added support for the A83T resp. H3, but missed
> some differences between the original A31 and A83T/H3.
> 
> The first patch adds a callback to the controller config to set the clock
> autogating register of different SoC generations, i.e. A31, A23+A83T, H3+later,
> and uses it to for the correct clock autogating setting.
> 
> The second patch adds a callback for the burst length setting in the channel
> config register, which has different field offsets and new burst widths/lengths,
> which differs between H3 and earlier generations
> 
> The third patch restructures some code required for the fourth patch and adds the
> burst lengths to the controller config.
> 
> The fourth patch adds the burst widths to the config and adds the handling of the
> H3 specific burst widths.
> 
> Patch 5 restructures the code to decouple some controller details (e.g. channel
> count) from the compatible string/the config.
> 
> Patches 6, 7 and 8 introduce and use the "dma-chans" property for the A64. Although
> register compatible to the H3, the channel count differs and thus it requires a
> new compatible. To avoid introduction of new compatibles for each minor variation,
> anything but the register model is moved to devicetree properties. There
> is at least one SoC (R40) which can then reuse the A64 compatible, the same
> would have worked for A83T+V3s.
> 
> Patches 9 and 10 add the DMA controller node to the devicetree and add the DMA
> controller reference to the SPI nodes.
> 
> Patch 11 fixes a small error in the devicetree binding example.

Applied patches 9-11, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-sunxi] Re: [PATCH v4 00/11] dmaengine: sun6i: Fixes for H3/A83T, enable A64
  2017-09-28 15:26 ` Maxime Ripard
@ 2017-10-14  3:21   ` Chen-Yu Tsai
  0 siblings, 0 replies; 4+ messages in thread
From: Chen-Yu Tsai @ 2017-10-14  3:21 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Stefan Brüns, linux-sunxi, devicetree, Chen-Yu Tsai,
	Andre Przywara, linux-kernel, Dan Williams, Rob Herring,
	dmaengine, Code Kipper, linux-arm-kernel, Catalin Marinas,
	Will Deacon, Mark Rutland, Maxime Ripard

Hi Vinod,

On Thu, Sep 28, 2017 at 11:26 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Thu, Sep 28, 2017 at 01:49:17AM +0000, Stefan Brüns wrote:
>> Commit 3a03ea763a67 ("dmaengine: sun6i: Add support for Allwinner A83T
>> (sun8i) variant") and commit f008db8c00c1 ("dmaengine: sun6i: Add support for
>> Allwinner H3 (sun8i) variant") added support for the A83T resp. H3, but missed
>> some differences between the original A31 and A83T/H3.
>>
>> The first patch adds a callback to the controller config to set the clock
>> autogating register of different SoC generations, i.e. A31, A23+A83T, H3+later,
>> and uses it to for the correct clock autogating setting.
>>
>> The second patch adds a callback for the burst length setting in the channel
>> config register, which has different field offsets and new burst widths/lengths,
>> which differs between H3 and earlier generations
>>
>> The third patch restructures some code required for the fourth patch and adds the
>> burst lengths to the controller config.
>>
>> The fourth patch adds the burst widths to the config and adds the handling of the
>> H3 specific burst widths.
>>
>> Patch 5 restructures the code to decouple some controller details (e.g. channel
>> count) from the compatible string/the config.
>>
>> Patches 6, 7 and 8 introduce and use the "dma-chans" property for the A64. Although
>> register compatible to the H3, the channel count differs and thus it requires a
>> new compatible. To avoid introduction of new compatibles for each minor variation,
>> anything but the register model is moved to devicetree properties. There
>> is at least one SoC (R40) which can then reuse the A64 compatible, the same
>> would have worked for A83T+V3s.
>>
>> Patches 9 and 10 add the DMA controller node to the devicetree and add the DMA
>> controller reference to the SPI nodes.
>>
>> Patch 11 fixes a small error in the devicetree binding example.
>
> Applied patches 9-11, thanks!
> Maxime

Can you pick up patches 1-8?

Thanks!
ChenYu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 00/11] dmaengine: sun6i: Fixes for H3/A83T, enable A64
  2017-09-28  1:49 [PATCH v4 00/11] dmaengine: sun6i: Fixes for H3/A83T, enable A64 Stefan Brüns
  2017-09-28 15:26 ` Maxime Ripard
@ 2017-10-16  7:02 ` Vinod Koul
  1 sibling, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2017-10-16  7:02 UTC (permalink / raw)
  To: Stefan Brüns
  Cc: linux-sunxi, devicetree, Chen-Yu Tsai, Andre Przywara,
	linux-kernel, Dan Williams, Rob Herring, dmaengine, Code Kipper,
	Maxime Ripard, linux-arm-kernel, Catalin Marinas, Will Deacon,
	Mark Rutland

On Thu, Sep 28, 2017 at 03:49:17AM +0200, Stefan Brüns wrote:
> Commit 3a03ea763a67 ("dmaengine: sun6i: Add support for Allwinner A83T
> (sun8i) variant") and commit f008db8c00c1 ("dmaengine: sun6i: Add support for
> Allwinner H3 (sun8i) variant") added support for the A83T resp. H3, but missed
> some differences between the original A31 and A83T/H3.

Applied 1 thru 8, 7 didn't applied though!

Thanks
-- 
~Vinod

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-16  6:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-28  1:49 [PATCH v4 00/11] dmaengine: sun6i: Fixes for H3/A83T, enable A64 Stefan Brüns
2017-09-28 15:26 ` Maxime Ripard
2017-10-14  3:21   ` [linux-sunxi] " Chen-Yu Tsai
2017-10-16  7:02 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).