devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] i2c: imx: Fix and enable DMA support for LS1021A
@ 2018-08-16  8:43 Esben Haabendal
  2018-08-16  8:43 ` [PATCH v4 3/3] arm: dts: ls1021a: Enable I2C DMA support Esben Haabendal
  0 siblings, 1 reply; 6+ messages in thread
From: Esben Haabendal @ 2018-08-16  8:43 UTC (permalink / raw)
  To: linux-i2c, devicetree
  Cc: Esben Haabendal, Wolfram Sang, Uwe Kleine-König, Rob Herring,
	Mark Rutland

From: Esben Haabendal <eha@deif.com>

This patch series fixes two race conditions and minor issues with tracking
the stopped state when something goes wrong.

With that in place, DMA support works with NXP LS1021A, so it is enabled in
the last patch.

Changes in v4:

* Added condition checking by use of common use_dma variable in patch 1/3
* Added Acked-by for patches 1/3 and 2/3
* Rebased to v4.18

Changes in v3:

* Rebased to v4.18-rc8, dropping patch 1/4 which have been merged
* Avoid unnecessary register write in patch 2/3
* Removed unneeded braces in patch 3/3

Changes in v2:

* Fixed speling mistake in commit message
* Rebased to v4.18-rc4

Esben Haabendal (3):
  i2c: imx: Fix race condition in dma read
  i2c: imx: Simplify stopped state tracking
  arm: dts: ls1021a: Enable I2C DMA support

 arch/arm/boot/dts/ls1021a.dtsi |  6 ++++++
 drivers/i2c/busses/i2c-imx.c   | 23 +++++++++++------------
 2 files changed, 17 insertions(+), 12 deletions(-)

-- 
2.18.0

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

* [PATCH v4 3/3] arm: dts: ls1021a: Enable I2C DMA support
  2018-08-16  8:43 [PATCH v4 0/3] i2c: imx: Fix and enable DMA support for LS1021A Esben Haabendal
@ 2018-08-16  8:43 ` Esben Haabendal
  2018-08-16 15:50   ` Uwe Kleine-König
  2018-08-20  9:15   ` Wolfram Sang
  0 siblings, 2 replies; 6+ messages in thread
From: Esben Haabendal @ 2018-08-16  8:43 UTC (permalink / raw)
  To: linux-i2c
  Cc: Esben Haabendal, Shawn Guo, kernel, NXP Linux Team, Rob Herring,
	Mark Rutland, devicetree, linux-kernel

From: Esben Haabendal <eha@deif.com>

Gives substantial performance improvement for transfers larger than 16
bytes (DMA_THRESHOLD).  Smaller transfers are unaffected.

Signed-off-by: Esben Haabendal <eha@deif.com>
---
 arch/arm/boot/dts/ls1021a.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
index c55d479971cc..1e5640701c65 100644
--- a/arch/arm/boot/dts/ls1021a.dtsi
+++ b/arch/arm/boot/dts/ls1021a.dtsi
@@ -363,6 +363,8 @@
 			interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
 			clock-names = "i2c";
 			clocks = <&clockgen 4 1>;
+			dma-names = "tx", "rx";
+			dmas = <&edma0 1 39>, <&edma0 1 38>;
 			status = "disabled";
 		};
 
@@ -374,6 +376,8 @@
 			interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
 			clock-names = "i2c";
 			clocks = <&clockgen 4 1>;
+			dma-names = "tx", "rx";
+			dmas = <&edma0 1 37>, <&edma0 1 36>;
 			status = "disabled";
 		};
 
@@ -385,6 +389,8 @@
 			interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
 			clock-names = "i2c";
 			clocks = <&clockgen 4 1>;
+			dma-names = "tx", "rx";
+			dmas = <&edma0 1 35>, <&edma0 1 34>;
 			status = "disabled";
 		};
 
-- 
2.18.0

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

* Re: [PATCH v4 3/3] arm: dts: ls1021a: Enable I2C DMA support
  2018-08-16  8:43 ` [PATCH v4 3/3] arm: dts: ls1021a: Enable I2C DMA support Esben Haabendal
@ 2018-08-16 15:50   ` Uwe Kleine-König
  2018-08-20  9:15   ` Wolfram Sang
  1 sibling, 0 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2018-08-16 15:50 UTC (permalink / raw)
  To: Esben Haabendal
  Cc: linux-i2c, Esben Haabendal, Shawn Guo, kernel, NXP Linux Team,
	Rob Herring, Mark Rutland, devicetree, linux-kernel

On Thu, Aug 16, 2018 at 10:43:14AM +0200, Esben Haabendal wrote:
> From: Esben Haabendal <eha@deif.com>
> 
> Gives substantial performance improvement for transfers larger than 16
> bytes (DMA_THRESHOLD).  Smaller transfers are unaffected.
> 
> Signed-off-by: Esben Haabendal <eha@deif.com>

Looks reasonable to me.

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* Re: [PATCH v4 3/3] arm: dts: ls1021a: Enable I2C DMA support
  2018-08-16  8:43 ` [PATCH v4 3/3] arm: dts: ls1021a: Enable I2C DMA support Esben Haabendal
  2018-08-16 15:50   ` Uwe Kleine-König
@ 2018-08-20  9:15   ` Wolfram Sang
  2018-08-20  9:23     ` Esben Haabendal
  1 sibling, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2018-08-20  9:15 UTC (permalink / raw)
  To: Esben Haabendal
  Cc: linux-i2c, Esben Haabendal, Shawn Guo, kernel, NXP Linux Team,
	Rob Herring, Mark Rutland, devicetree, linux-kernel

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

On Thu, Aug 16, 2018 at 10:43:14AM +0200, Esben Haabendal wrote:
> From: Esben Haabendal <eha@deif.com>
> 
> Gives substantial performance improvement for transfers larger than 16
> bytes (DMA_THRESHOLD).  Smaller transfers are unaffected.
> 
> Signed-off-by: Esben Haabendal <eha@deif.com>

This needs to go via arm-soc. The two other patches will be in v4.19
with my pull request later this week.


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

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

* Re: [PATCH v4 3/3] arm: dts: ls1021a: Enable I2C DMA support
  2018-08-20  9:15   ` Wolfram Sang
@ 2018-08-20  9:23     ` Esben Haabendal
  2018-08-20 11:14       ` Wolfram Sang
  0 siblings, 1 reply; 6+ messages in thread
From: Esben Haabendal @ 2018-08-20  9:23 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Shawn Guo, kernel, NXP Linux Team, Rob Herring,
	Mark Rutland, devicetree, linux-kernel

Wolfram Sang <wsa@the-dreams.de> writes:

> On Thu, Aug 16, 2018 at 10:43:14AM +0200, Esben Haabendal wrote:
>> From: Esben Haabendal <eha@deif.com>
>> 
>> Gives substantial performance improvement for transfers larger than 16
>> bytes (DMA_THRESHOLD).  Smaller transfers are unaffected.
>> 
>> Signed-off-by: Esben Haabendal <eha@deif.com>
>
> This needs to go via arm-soc. The two other patches will be in v4.19
> with my pull request later this week.

Ok, do I need to send to additional list(s)?
linux-arm-kernel@lists.infradead.org?

/Esben

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

* Re: [PATCH v4 3/3] arm: dts: ls1021a: Enable I2C DMA support
  2018-08-20  9:23     ` Esben Haabendal
@ 2018-08-20 11:14       ` Wolfram Sang
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2018-08-20 11:14 UTC (permalink / raw)
  To: Esben Haabendal
  Cc: linux-i2c, Shawn Guo, kernel, NXP Linux Team, Rob Herring,
	Mark Rutland, devicetree, linux-kernel

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


> Ok, do I need to send to additional list(s)?
> linux-arm-kernel@lists.infradead.org?

I'd say resend this patch after rc1 is out and the other 2 patches are
upstream.


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

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

end of thread, other threads:[~2018-08-20 11:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-16  8:43 [PATCH v4 0/3] i2c: imx: Fix and enable DMA support for LS1021A Esben Haabendal
2018-08-16  8:43 ` [PATCH v4 3/3] arm: dts: ls1021a: Enable I2C DMA support Esben Haabendal
2018-08-16 15:50   ` Uwe Kleine-König
2018-08-20  9:15   ` Wolfram Sang
2018-08-20  9:23     ` Esben Haabendal
2018-08-20 11:14       ` Wolfram Sang

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).