Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1515697
| Path | csiph.com!news.redatomik.org!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Maxime Ripard <maxime.ripard@free-electrons.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/1] ARM: dmaengine: sun6i: share the dma driver with sun50i |
| Date | Sun, 06 Nov 2016 14:40:01 +0100 |
| Message-ID | <sAvPX-61P-15@gated-at.bofh.it> (permalink) |
| References | <sA4d3-5pK-3@gated-at.bofh.it> |
| MIME-Version | 1.0 |
| Content-Type | multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xsb6bfmpbntpj7is" |
| Content-Disposition | inline |
| User-Agent | Mutt/1.6.2-neo (2016-08-21) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 95 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | wens@csie.org, dan.j.williams@intel.com, vinod.koul@intel.com, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org |
| X-Original-Date | Sun, 6 Nov 2016 14:37:11 +0100 |
| X-Original-Message-ID | <20161106133711.np2hm77myfd75sn2@lukather> |
| X-Original-References | <20161105080548.GA32546@arx12> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1515697 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Sat, Nov 05, 2016 at 04:05:48PM +0800, Hao Zhang wrote:
> Add soc a64 dma support.
>
> Signed-off-by: Hao Zhang <hao5781286@gmail.com>
> ---
> drivers/dma/sun6i-dma.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
> index 8346199..00fcfc7 100644
> --- a/drivers/dma/sun6i-dma.c
> +++ b/drivers/dma/sun6i-dma.c
> @@ -1028,11 +1028,23 @@ static struct sun6i_dma_config sun8i_h3_dma_cfg = {
> .nr_max_vchans = 34,
> };
>
> +/*
> + * The A64 has 8 physical channels, a maximum DRQ port id of 27,
> + * and a total of 38 usable source and destination endpoints.
> + */
> +
> +static struct sun6i_dma_config sun50i_a64_dma_cfg = {
> + .nr_max_channels = 8,
> + .nr_max_requests = 27,
> + .nr_max_vchans = 38,
> +};
> +
> static const struct of_device_id sun6i_dma_match[] = {
> { .compatible = "allwinner,sun6i-a31-dma", .data = &sun6i_a31_dma_cfg },
> { .compatible = "allwinner,sun8i-a23-dma", .data = &sun8i_a23_dma_cfg },
> { .compatible = "allwinner,sun8i-a83t-dma", .data = &sun8i_a83t_dma_cfg },
> { .compatible = "allwinner,sun8i-h3-dma", .data = &sun8i_h3_dma_cfg },
> + { .compatible = "allwinner,sun50i-a64-dma", .data = &sun50i_a64_dma_cfg },
You need to add that compatible to the DT binding documentation.
> { /* sentinel */ }
> };
> MODULE_DEVICE_TABLE(of, sun6i_dma_match);
> @@ -1110,6 +1122,13 @@ static int sun6i_dma_probe(struct platform_device *pdev)
> sdc->slave.dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) |
> BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) |
> BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
> +
> + if (of_device_is_compatible(pdev->dev.of_node,
> + "allwinner,sun50i-a64-dma")) {
> + sdc->slave.src_addr_widths |= BIT(DMA_SLAVE_BUSWIDTH_8_BYTES);
> + sdc->slave.dst_addr_widths |= BIT(DMA_SLAVE_BUSWIDTH_8_BYTES);
> + }
> +
You'll also need to change convert_buswidth, it will reject any width
higher than 4 bytes.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 1/1] ARM: dmaengine: sun6i: share the dma driver with sun50i Hao Zhang <hao5781286@gmail.com> - 2016-11-05 09:10 +0100 Re: [PATCH v2 1/1] ARM: dmaengine: sun6i: share the dma driver with sun50i Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-11-06 14:40 +0100
csiph-web