Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1725780
| From | Stefan Brüns <stefan.bruens@rwth-aachen.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 08/10] dmaengine: sun6i: Add support for Allwinner A64 and compatibles |
| Date | 2017-09-04 00:50 +0200 |
| Message-ID | <ulLSi-5Nr-19@gated-at.bofh.it> (permalink) |
| References | <ulLSh-5Nr-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The A64 SoC has the same dma engine as the H3 (sun8i), with a
reduced amount of physical channels. To allow future reuse of the
compatible, leave the channel count etc. in the config data blank
and retrieve it from the devicetree.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
---
drivers/dma/sun6i-dma.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
index bd4c2e4a759b..4fae7ffad549 100644
--- a/drivers/dma/sun6i-dma.c
+++ b/drivers/dma/sun6i-dma.c
@@ -1076,6 +1076,16 @@ static struct sun6i_dma_config sun8i_h3_dma_cfg = {
.nr_max_vchans = 34,
.dmac_variant = DMAC_VARIANT_H3,
};
+
+/*
+ * The A64 binding uses the number of dma channels from the
+ * device tree node.
+ */
+static struct sun6i_dma_config sun50i_a64_dma_cfg = {
+ .nr_max_channels = 0,
+ .nr_max_requests = 0,
+ .nr_max_vchans = 0,
+ .dmac_variant = DMAC_VARIANT_H3,
};
static const struct of_device_id sun6i_dma_match[] = {
@@ -1083,6 +1093,7 @@ static const struct of_device_id sun6i_dma_match[] = {
{ .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 },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, sun6i_dma_match);
@@ -1090,6 +1101,7 @@ MODULE_DEVICE_TABLE(of, sun6i_dma_match);
static int sun6i_dma_probe(struct platform_device *pdev)
{
const struct of_device_id *device;
+ struct device_node *np = pdev->dev.of_node;
struct sun6i_dma_dev *sdc;
struct resource *res;
int ret, i;
--
2.14.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/10] dmaengine: sun6i: Fixes for H3/A83T, enable A64 Stefan Brüns <stefan.bruens@rwth-aachen.de> - 2017-09-04 00:50 +0200
[PATCH 01/10] dmaengine: sun6i: Correct setting of clock autogating register for A83T/H3 Stefan Brüns <stefan.bruens@rwth-aachen.de> - 2017-09-04 00:50 +0200
Re: [PATCH 01/10] dmaengine: sun6i: Correct setting of clock autogating register for A83T/H3 André Przywara <andre.przywara@arm.com> - 2017-09-04 01:30 +0200
Re: [PATCH 01/10] dmaengine: sun6i: Correct setting of clock autogating register for A83T/H3 Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-09-04 09:10 +0200
[PATCH 02/10] dmaengine: sun6i: Correct burst length field offsets for H3 Stefan Brüns <stefan.bruens@rwth-aachen.de> - 2017-09-04 00:50 +0200
Re: [PATCH 02/10] dmaengine: sun6i: Correct burst length field offsets for H3 Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-09-04 10:00 +0200
Re: [PATCH 02/10] dmaengine: sun6i: Correct burst length field offsets for H3 Brüns, Stefan <Stefan.Bruens@rwth-aachen.de> - 2017-09-04 16:50 +0200
[PATCH 09/10] arm64: allwinner: a64: Add device node for DMA controller Stefan Brüns <stefan.bruens@rwth-aachen.de> - 2017-09-04 00:50 +0200
[PATCH 08/10] dmaengine: sun6i: Add support for Allwinner A64 and compatibles Stefan Brüns <stefan.bruens@rwth-aachen.de> - 2017-09-04 00:50 +0200
Re: [PATCH 08/10] dmaengine: sun6i: Add support for Allwinner A64 and compatibles André Przywara <andre.przywara@arm.com> - 2017-09-04 01:50 +0200
Re: [PATCH 08/10] dmaengine: sun6i: Add support for Allwinner A64 and compatibles Stefan Bruens <stefan.bruens@rwth-aachen.de> - 2017-09-04 02:20 +0200
csiph-web