Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1649561
| From | Icenowy Zheng <icenowy@aosc.io> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 5/9] dmaengine: sun6i: make gate bit in sun8i's DMA engines a common quirk |
| Date | 2017-05-24 14:20 +0200 |
| Message-ID | <tKBRU-18H-29@gated-at.bofh.it> (permalink) |
| References | <tKBoR-Xp-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Icenowy Zheng <icenowy@aosc.xyz>
Originally we enable a special gate bit when the compatible indicates
A23/33.
But according to BSP sources and user manuals, more SoCs will need this
gate bit.
So make it a common quirk configured in the config struct.
Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
---
Changes in v3:
- Stripped out the A83T gate bit set.
drivers/dma/sun6i-dma.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
index a2358780ab2c..69840cf6fe98 100644
--- a/drivers/dma/sun6i-dma.c
+++ b/drivers/dma/sun6i-dma.c
@@ -101,6 +101,11 @@ struct sun6i_dma_config {
u32 nr_max_channels;
u32 nr_max_requests;
u32 nr_max_vchans;
+ /*
+ * The hardware has a special gate bit, which is needed to
+ * be enabled for some SoCs with a sun6i-style DMA engine.
+ */
+ bool gate_needed;
};
/*
@@ -1009,6 +1014,7 @@ static struct sun6i_dma_config sun8i_a23_dma_cfg = {
.nr_max_channels = 8,
.nr_max_requests = 24,
.nr_max_vchans = 37,
+ .gate_needed = true,
};
static struct sun6i_dma_config sun8i_a83t_dma_cfg = {
@@ -1177,10 +1183,10 @@ static int sun6i_dma_probe(struct platform_device *pdev)
/*
* sun8i variant requires us to toggle a dma gating register,
* as seen in Allwinner's SDK. This register is not documented
- * in the A23 user manual.
+ * in the A23 user manual, but documented at least in V3s user
+ * manual.
*/
- if (of_device_is_compatible(pdev->dev.of_node,
- "allwinner,sun8i-a23-dma"))
+ if (sdc->cfg->gate_needed)
writel(SUN8I_DMA_GATE_ENABLE, sdc->base + SUN8I_DMA_GATE);
return 0;
--
2.12.2
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 0/9] Add support for the audio codec on Allwinner V3s Icenowy Zheng <icenowy@aosc.io> - 2017-05-24 12:10 +0200
[PATCH v3 9/9] ARM: sun8i: v3s: enable audio on Lichee Pi Zero Dock board Icenowy Zheng <icenowy@aosc.io> - 2017-05-24 12:10 +0200
[PATCH v3 7/9] ARM: dts: sun8i: add DMA engine in V3s DTSI Icenowy Zheng <icenowy@aosc.io> - 2017-05-24 12:20 +0200
Re: [linux-sunxi] [PATCH v3 1/9] ASoC: sun8i-codec-analog: split out mbias Chen-Yu Tsai <wens@csie.org> - 2017-05-24 12:40 +0200
Re: [linux-sunxi] [PATCH v3 5/9] dmaengine: sun6i: make gate bit in sun8i's DMA engines a common quirk Chen-Yu Tsai <wens@csie.org> - 2017-05-24 12:40 +0200
Re: [PATCH v3 0/9] Add support for the audio codec on Allwinner V3s Vinod Koul <vinod.koul@intel.com> - 2017-05-24 12:50 +0200
Re: [PATCH v3 0/9] Add support for the audio codec on Allwinner V3s Vinod Koul <vinod.koul@intel.com> - 2017-05-24 12:50 +0200
[PATCH v3 8/9] ARM: dts: sun8i: add audio codec support into V3s DTSI Icenowy Zheng <icenowy@aosc.io> - 2017-05-24 13:20 +0200
[PATCH v3 1/9] ASoC: sun8i-codec-analog: split out mbias Icenowy Zheng <icenowy@aosc.io> - 2017-05-24 13:40 +0200
[PATCH v3 2/9] ASoC: sun8i-codec-analog: prepare a mixer control/widget/route set for V3s Icenowy Zheng <icenowy@aosc.io> - 2017-05-24 13:40 +0200
Re: [linux-sunxi] [PATCH v3 2/9] ASoC: sun8i-codec-analog: prepare a mixer control/widget/route set for V3s Chen-Yu Tsai <wens@csie.org> - 2017-05-25 06:00 +0200
[PATCH v3 3/9] ASoC: sun8i-codec-analog: add support for V3s SoC Icenowy Zheng <icenowy@aosc.io> - 2017-05-24 13:40 +0200
Re: [linux-sunxi] [PATCH v3 3/9] ASoC: sun8i-codec-analog: add support for V3s SoC Chen-Yu Tsai <wens@csie.org> - 2017-05-25 06:10 +0200
Re: [linux-sunxi] [PATCH v3 3/9] ASoC: sun8i-codec-analog: add support for V3s SoC Rob Herring <robh@kernel.org> - 2017-05-31 19:30 +0200
Re: [PATCH v3 3/9] ASoC: sun8i-codec-analog: add support for V3s SoC Rob Herring <robh@kernel.org> - 2017-05-31 20:00 +0200
Applied "ASoC: sun8i-codec-analog: add support for V3s SoC" to the asoc tree Mark Brown <broonie@kernel.org> - 2017-06-06 21:50 +0200
[PATCH v3 4/9] ASoC: sun4i-codec: Add support for V3s codec Icenowy Zheng <icenowy@aosc.io> - 2017-05-24 14:00 +0200
Re: [PATCH v3 4/9] ASoC: sun4i-codec: Add support for V3s codec Rob Herring <robh@kernel.org> - 2017-05-31 19:40 +0200
Applied "ASoC: sun4i-codec: Add support for V3s codec" to the asoc tree Mark Brown <broonie@kernel.org> - 2017-06-06 21:30 +0200
[PATCH v3 5/9] dmaengine: sun6i: make gate bit in sun8i's DMA engines a common quirk Icenowy Zheng <icenowy@aosc.io> - 2017-05-24 14:20 +0200
[PATCH v3 6/9] dmaengine: sun6i: support V3s SoC variant Icenowy Zheng <icenowy@aosc.io> - 2017-05-24 14:40 +0200
Re: [PATCH v3 6/9] dmaengine: sun6i: support V3s SoC variant Rob Herring <robh@kernel.org> - 2017-05-31 19:10 +0200
csiph-web