All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Fix imx8mq ratio 1:1 check
@ 2019-03-28 13:38 ` Angus Ainslie (Purism)
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-28 13:38 UTC (permalink / raw)
  To: angus
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

The imx8mq 1:1 check breaks some earlier imx chips so limit the
ratio check to the imx8mq.

Angus Ainslie (Purism) (4):
  arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
  dmaengine: imx-sdma: Add clock ratio 1:1 check
  dt-bindings: Document the new imx8mq-sdma compatible string
  arm64: dts: imx8mq: Change ahb clock for imx8mq

 .../devicetree/bindings/dma/fsl-imx-sdma.txt  |  1 +
 arch/arm64/boot/dts/freescale/imx8mq.dtsi     |  4 +--
 drivers/dma/imx-sdma.c                        | 31 ++++++++++++++++---
 3 files changed, 30 insertions(+), 6 deletions(-)

-- 
2.17.1


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

* [PATCH 0/4] Fix imx8mq ratio 1:1 check
@ 2019-03-28 13:38 ` Angus Ainslie (Purism)
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-28 13:38 UTC (permalink / raw)
  To: angus
  Cc: Mark Rutland, devicetree, Carlo Caione, Shawn Guo, Sascha Hauer,
	linux-kernel, Daniel Baluta, Vinod Koul, Rob Herring,
	NXP Linux Team, Pengutronix Kernel Team, dmaengine, Dan Williams,
	Fabio Estevam, Guido Günther, linux-arm-kernel, Lucas Stach

The imx8mq 1:1 check breaks some earlier imx chips so limit the
ratio check to the imx8mq.

Angus Ainslie (Purism) (4):
  arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
  dmaengine: imx-sdma: Add clock ratio 1:1 check
  dt-bindings: Document the new imx8mq-sdma compatible string
  arm64: dts: imx8mq: Change ahb clock for imx8mq

 .../devicetree/bindings/dma/fsl-imx-sdma.txt  |  1 +
 arch/arm64/boot/dts/freescale/imx8mq.dtsi     |  4 +--
 drivers/dma/imx-sdma.c                        | 31 ++++++++++++++++---
 3 files changed, 30 insertions(+), 6 deletions(-)

-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
  2019-03-28 13:38 ` Angus Ainslie (Purism)
  (?)
@ 2019-03-28 13:38 ` Angus Ainslie (Purism)
  -1 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie @ 2019-03-28 13:38 UTC (permalink / raw)
  To: angus
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

Fix a typo in the compatible string

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index 81d5ce1b1ec1..07099f82965e 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -720,7 +720,7 @@
 			};
 
 			sdma1: sdma@30bd0000 {
-				compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
+				compatible = "fsl,mx8mq-sdma","fsl,imx7d-sdma";
 				reg = <0x30bd0000 0x10000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,

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

* [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
@ 2019-03-28 13:38 ` Angus Ainslie (Purism)
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-28 13:38 UTC (permalink / raw)
  To: angus
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

Fix a typo in the compatible string

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index 81d5ce1b1ec1..07099f82965e 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -720,7 +720,7 @@
 			};
 
 			sdma1: sdma@30bd0000 {
-				compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
+				compatible = "fsl,mx8mq-sdma","fsl,imx7d-sdma";
 				reg = <0x30bd0000 0x10000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,
-- 
2.17.1


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

* [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl, imx8mq-sdma compatible string
@ 2019-03-28 13:38 ` Angus Ainslie (Purism)
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-28 13:38 UTC (permalink / raw)
  To: angus
  Cc: Mark Rutland, devicetree, Carlo Caione, Shawn Guo, Sascha Hauer,
	linux-kernel, Daniel Baluta, Vinod Koul, Rob Herring,
	NXP Linux Team, Pengutronix Kernel Team, dmaengine, Dan Williams,
	Fabio Estevam, Guido Günther, linux-arm-kernel, Lucas Stach

Fix a typo in the compatible string

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index 81d5ce1b1ec1..07099f82965e 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -720,7 +720,7 @@
 			};
 
 			sdma1: sdma@30bd0000 {
-				compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
+				compatible = "fsl,mx8mq-sdma","fsl,imx7d-sdma";
 				reg = <0x30bd0000 0x10000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [2/4] dmaengine: imx-sdma: Add clock ratio 1:1 check
  2019-03-28 13:38 ` Angus Ainslie (Purism)
  (?)
@ 2019-03-28 13:38 ` Angus Ainslie (Purism)
  -1 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie @ 2019-03-28 13:38 UTC (permalink / raw)
  To: angus
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

On imx8mq B0 chip, AHB/SDMA clock ratio 2:1 can't be supported,
since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach
to 500Mhz, so use 1:1 instead.

To limit this change to the imx8mq for now this patch also adds an
im8mq-sdma compatible string.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 drivers/dma/imx-sdma.c | 31 +++++++++++++++++++++++++++----
 1 file changed, 27 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 7fae4bf885d5..99d9f431ae2c 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -419,6 +419,7 @@ struct sdma_driver_data {
 	int chnenbl0;
 	int num_events;
 	struct sdma_script_start_addrs	*script_addrs;
+	bool check_ratio;
 };
 
 struct sdma_engine {
@@ -441,6 +442,8 @@ struct sdma_engine {
 	unsigned int			irq;
 	dma_addr_t			bd0_phys;
 	struct sdma_buffer_descriptor	*bd0;
+	/* clock ratio for AHB:SDMA core. 1:1 is 1, 2:1 is 0*/
+	bool				clk_ratio;
 };
 
 static int sdma_config_write(struct dma_chan *chan,
@@ -555,6 +558,13 @@ static struct sdma_driver_data sdma_imx7d = {
 	.script_addrs = &sdma_script_imx7d,
 };
 
+static struct sdma_driver_data sdma_imx8mq = {
+	.chnenbl0 = SDMA_CHNENBL0_IMX35,
+	.num_events = 48,
+	.script_addrs = &sdma_script_imx7d,
+	.check_ratio = 1,
+};
+
 static const struct platform_device_id sdma_devtypes[] = {
 	{
 		.name = "imx25-sdma",
@@ -577,6 +587,9 @@ static const struct platform_device_id sdma_devtypes[] = {
 	}, {
 		.name = "imx7d-sdma",
 		.driver_data = (unsigned long)&sdma_imx7d,
+	}, {
+		.name = "imx8mq-sdma",
+		.driver_data = (unsigned long)&sdma_imx8mq,
 	}, {
 		/* sentinel */
 	}
@@ -591,6 +604,7 @@ static const struct of_device_id sdma_dt_ids[] = {
 	{ .compatible = "fsl,imx31-sdma", .data = &sdma_imx31, },
 	{ .compatible = "fsl,imx25-sdma", .data = &sdma_imx25, },
 	{ .compatible = "fsl,imx7d-sdma", .data = &sdma_imx7d, },
+	{ .compatible = "fsl,imx8mq-sdma", .data = &sdma_imx8mq, },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, sdma_dt_ids);
@@ -663,8 +677,11 @@ static int sdma_run_channel0(struct sdma_engine *sdma)
 		dev_err(sdma->dev, "Timeout waiting for CH0 ready\n");
 
 	/* Set bits of CONFIG register with dynamic context switching */
-	if (readl(sdma->regs + SDMA_H_CONFIG) == 0)
-		writel_relaxed(SDMA_H_CONFIG_CSM, sdma->regs + SDMA_H_CONFIG);
+	reg = readl(sdma->regs + SDMA_H_CONFIG);
+	if ((reg & SDMA_H_CONFIG_CSM) == 0) {
+		reg |= SDMA_H_CONFIG_CSM;
+		writel_relaxed(reg, sdma->regs + SDMA_H_CONFIG);
+	}
 
 	return ret;
 }
@@ -1847,6 +1864,10 @@ static int sdma_init(struct sdma_engine *sdma)
 	if (ret)
 		goto disable_clk_ipg;
 
+	if (sdma->drvdata->check_ratio &&
+	    (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma->clk_ipg)))
+		sdma->clk_ratio = 1;
+
 	/* Be sure SDMA has not started yet */
 	writel_relaxed(0, sdma->regs + SDMA_H_C0PTR);
 
@@ -1887,8 +1908,10 @@ static int sdma_init(struct sdma_engine *sdma)
 	writel_relaxed(0x4050, sdma->regs + SDMA_CHN0ADDR);
 
 	/* Set bits of CONFIG register but with static context switching */
-	/* FIXME: Check whether to set ACR bit depending on clock ratios */
-	writel_relaxed(0, sdma->regs + SDMA_H_CONFIG);
+	if (sdma->clk_ratio)
+		writel_relaxed(SDMA_H_CONFIG_ACR, sdma->regs + SDMA_H_CONFIG);
+	else
+		writel_relaxed(0, sdma->regs + SDMA_H_CONFIG);
 
 	writel_relaxed(ccb_phys, sdma->regs + SDMA_H_C0PTR);
 

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

* [PATCH 2/4] dmaengine: imx-sdma: Add clock ratio 1:1 check
@ 2019-03-28 13:38 ` Angus Ainslie (Purism)
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-28 13:38 UTC (permalink / raw)
  To: angus
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

On imx8mq B0 chip, AHB/SDMA clock ratio 2:1 can't be supported,
since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach
to 500Mhz, so use 1:1 instead.

To limit this change to the imx8mq for now this patch also adds an
im8mq-sdma compatible string.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 drivers/dma/imx-sdma.c | 31 +++++++++++++++++++++++++++----
 1 file changed, 27 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 7fae4bf885d5..99d9f431ae2c 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -419,6 +419,7 @@ struct sdma_driver_data {
 	int chnenbl0;
 	int num_events;
 	struct sdma_script_start_addrs	*script_addrs;
+	bool check_ratio;
 };
 
 struct sdma_engine {
@@ -441,6 +442,8 @@ struct sdma_engine {
 	unsigned int			irq;
 	dma_addr_t			bd0_phys;
 	struct sdma_buffer_descriptor	*bd0;
+	/* clock ratio for AHB:SDMA core. 1:1 is 1, 2:1 is 0*/
+	bool				clk_ratio;
 };
 
 static int sdma_config_write(struct dma_chan *chan,
@@ -555,6 +558,13 @@ static struct sdma_driver_data sdma_imx7d = {
 	.script_addrs = &sdma_script_imx7d,
 };
 
+static struct sdma_driver_data sdma_imx8mq = {
+	.chnenbl0 = SDMA_CHNENBL0_IMX35,
+	.num_events = 48,
+	.script_addrs = &sdma_script_imx7d,
+	.check_ratio = 1,
+};
+
 static const struct platform_device_id sdma_devtypes[] = {
 	{
 		.name = "imx25-sdma",
@@ -577,6 +587,9 @@ static const struct platform_device_id sdma_devtypes[] = {
 	}, {
 		.name = "imx7d-sdma",
 		.driver_data = (unsigned long)&sdma_imx7d,
+	}, {
+		.name = "imx8mq-sdma",
+		.driver_data = (unsigned long)&sdma_imx8mq,
 	}, {
 		/* sentinel */
 	}
@@ -591,6 +604,7 @@ static const struct of_device_id sdma_dt_ids[] = {
 	{ .compatible = "fsl,imx31-sdma", .data = &sdma_imx31, },
 	{ .compatible = "fsl,imx25-sdma", .data = &sdma_imx25, },
 	{ .compatible = "fsl,imx7d-sdma", .data = &sdma_imx7d, },
+	{ .compatible = "fsl,imx8mq-sdma", .data = &sdma_imx8mq, },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, sdma_dt_ids);
@@ -663,8 +677,11 @@ static int sdma_run_channel0(struct sdma_engine *sdma)
 		dev_err(sdma->dev, "Timeout waiting for CH0 ready\n");
 
 	/* Set bits of CONFIG register with dynamic context switching */
-	if (readl(sdma->regs + SDMA_H_CONFIG) == 0)
-		writel_relaxed(SDMA_H_CONFIG_CSM, sdma->regs + SDMA_H_CONFIG);
+	reg = readl(sdma->regs + SDMA_H_CONFIG);
+	if ((reg & SDMA_H_CONFIG_CSM) == 0) {
+		reg |= SDMA_H_CONFIG_CSM;
+		writel_relaxed(reg, sdma->regs + SDMA_H_CONFIG);
+	}
 
 	return ret;
 }
@@ -1847,6 +1864,10 @@ static int sdma_init(struct sdma_engine *sdma)
 	if (ret)
 		goto disable_clk_ipg;
 
+	if (sdma->drvdata->check_ratio &&
+	    (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma->clk_ipg)))
+		sdma->clk_ratio = 1;
+
 	/* Be sure SDMA has not started yet */
 	writel_relaxed(0, sdma->regs + SDMA_H_C0PTR);
 
@@ -1887,8 +1908,10 @@ static int sdma_init(struct sdma_engine *sdma)
 	writel_relaxed(0x4050, sdma->regs + SDMA_CHN0ADDR);
 
 	/* Set bits of CONFIG register but with static context switching */
-	/* FIXME: Check whether to set ACR bit depending on clock ratios */
-	writel_relaxed(0, sdma->regs + SDMA_H_CONFIG);
+	if (sdma->clk_ratio)
+		writel_relaxed(SDMA_H_CONFIG_ACR, sdma->regs + SDMA_H_CONFIG);
+	else
+		writel_relaxed(0, sdma->regs + SDMA_H_CONFIG);
 
 	writel_relaxed(ccb_phys, sdma->regs + SDMA_H_C0PTR);
 
-- 
2.17.1


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

* [PATCH 2/4] dmaengine: imx-sdma: Add clock ratio 1:1 check
@ 2019-03-28 13:38 ` Angus Ainslie (Purism)
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-28 13:38 UTC (permalink / raw)
  To: angus
  Cc: Mark Rutland, devicetree, Carlo Caione, Shawn Guo, Sascha Hauer,
	linux-kernel, Daniel Baluta, Vinod Koul, Rob Herring,
	NXP Linux Team, Pengutronix Kernel Team, dmaengine, Dan Williams,
	Fabio Estevam, Guido Günther, linux-arm-kernel, Lucas Stach

On imx8mq B0 chip, AHB/SDMA clock ratio 2:1 can't be supported,
since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach
to 500Mhz, so use 1:1 instead.

To limit this change to the imx8mq for now this patch also adds an
im8mq-sdma compatible string.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 drivers/dma/imx-sdma.c | 31 +++++++++++++++++++++++++++----
 1 file changed, 27 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 7fae4bf885d5..99d9f431ae2c 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -419,6 +419,7 @@ struct sdma_driver_data {
 	int chnenbl0;
 	int num_events;
 	struct sdma_script_start_addrs	*script_addrs;
+	bool check_ratio;
 };
 
 struct sdma_engine {
@@ -441,6 +442,8 @@ struct sdma_engine {
 	unsigned int			irq;
 	dma_addr_t			bd0_phys;
 	struct sdma_buffer_descriptor	*bd0;
+	/* clock ratio for AHB:SDMA core. 1:1 is 1, 2:1 is 0*/
+	bool				clk_ratio;
 };
 
 static int sdma_config_write(struct dma_chan *chan,
@@ -555,6 +558,13 @@ static struct sdma_driver_data sdma_imx7d = {
 	.script_addrs = &sdma_script_imx7d,
 };
 
+static struct sdma_driver_data sdma_imx8mq = {
+	.chnenbl0 = SDMA_CHNENBL0_IMX35,
+	.num_events = 48,
+	.script_addrs = &sdma_script_imx7d,
+	.check_ratio = 1,
+};
+
 static const struct platform_device_id sdma_devtypes[] = {
 	{
 		.name = "imx25-sdma",
@@ -577,6 +587,9 @@ static const struct platform_device_id sdma_devtypes[] = {
 	}, {
 		.name = "imx7d-sdma",
 		.driver_data = (unsigned long)&sdma_imx7d,
+	}, {
+		.name = "imx8mq-sdma",
+		.driver_data = (unsigned long)&sdma_imx8mq,
 	}, {
 		/* sentinel */
 	}
@@ -591,6 +604,7 @@ static const struct of_device_id sdma_dt_ids[] = {
 	{ .compatible = "fsl,imx31-sdma", .data = &sdma_imx31, },
 	{ .compatible = "fsl,imx25-sdma", .data = &sdma_imx25, },
 	{ .compatible = "fsl,imx7d-sdma", .data = &sdma_imx7d, },
+	{ .compatible = "fsl,imx8mq-sdma", .data = &sdma_imx8mq, },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, sdma_dt_ids);
@@ -663,8 +677,11 @@ static int sdma_run_channel0(struct sdma_engine *sdma)
 		dev_err(sdma->dev, "Timeout waiting for CH0 ready\n");
 
 	/* Set bits of CONFIG register with dynamic context switching */
-	if (readl(sdma->regs + SDMA_H_CONFIG) == 0)
-		writel_relaxed(SDMA_H_CONFIG_CSM, sdma->regs + SDMA_H_CONFIG);
+	reg = readl(sdma->regs + SDMA_H_CONFIG);
+	if ((reg & SDMA_H_CONFIG_CSM) == 0) {
+		reg |= SDMA_H_CONFIG_CSM;
+		writel_relaxed(reg, sdma->regs + SDMA_H_CONFIG);
+	}
 
 	return ret;
 }
@@ -1847,6 +1864,10 @@ static int sdma_init(struct sdma_engine *sdma)
 	if (ret)
 		goto disable_clk_ipg;
 
+	if (sdma->drvdata->check_ratio &&
+	    (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma->clk_ipg)))
+		sdma->clk_ratio = 1;
+
 	/* Be sure SDMA has not started yet */
 	writel_relaxed(0, sdma->regs + SDMA_H_C0PTR);
 
@@ -1887,8 +1908,10 @@ static int sdma_init(struct sdma_engine *sdma)
 	writel_relaxed(0x4050, sdma->regs + SDMA_CHN0ADDR);
 
 	/* Set bits of CONFIG register but with static context switching */
-	/* FIXME: Check whether to set ACR bit depending on clock ratios */
-	writel_relaxed(0, sdma->regs + SDMA_H_CONFIG);
+	if (sdma->clk_ratio)
+		writel_relaxed(SDMA_H_CONFIG_ACR, sdma->regs + SDMA_H_CONFIG);
+	else
+		writel_relaxed(0, sdma->regs + SDMA_H_CONFIG);
 
 	writel_relaxed(ccb_phys, sdma->regs + SDMA_H_C0PTR);
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [3/4] dt-bindings: Document the new imx8mq-sdma compatible string
  2019-03-28 13:38 ` Angus Ainslie (Purism)
  (?)
@ 2019-03-28 13:38 ` Angus Ainslie (Purism)
  -1 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie @ 2019-03-28 13:38 UTC (permalink / raw)
  To: angus
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

The imx8mq needs to be specified to check the clk ratio.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
index 3c9a57a8443b..9d8bbac27d8b 100644
--- a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
+++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
@@ -9,6 +9,7 @@ Required properties:
       "fsl,imx53-sdma"
       "fsl,imx6q-sdma"
       "fsl,imx7d-sdma"
+      "fsl,imx8mq-sdma"
   The -to variants should be preferred since they allow to determine the
   correct ROM script addresses needed for the driver to work without additional
   firmware.

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

* [PATCH 3/4] dt-bindings: Document the new imx8mq-sdma compatible string
@ 2019-03-28 13:38 ` Angus Ainslie (Purism)
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-28 13:38 UTC (permalink / raw)
  To: angus
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

The imx8mq needs to be specified to check the clk ratio.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
index 3c9a57a8443b..9d8bbac27d8b 100644
--- a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
+++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
@@ -9,6 +9,7 @@ Required properties:
       "fsl,imx53-sdma"
       "fsl,imx6q-sdma"
       "fsl,imx7d-sdma"
+      "fsl,imx8mq-sdma"
   The -to variants should be preferred since they allow to determine the
   correct ROM script addresses needed for the driver to work without additional
   firmware.
-- 
2.17.1


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

* [PATCH 3/4] dt-bindings: Document the new imx8mq-sdma compatible string
@ 2019-03-28 13:38 ` Angus Ainslie (Purism)
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-28 13:38 UTC (permalink / raw)
  To: angus
  Cc: Mark Rutland, devicetree, Carlo Caione, Shawn Guo, Sascha Hauer,
	linux-kernel, Daniel Baluta, Vinod Koul, Rob Herring,
	NXP Linux Team, Pengutronix Kernel Team, dmaengine, Dan Williams,
	Fabio Estevam, Guido Günther, linux-arm-kernel, Lucas Stach

The imx8mq needs to be specified to check the clk ratio.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
index 3c9a57a8443b..9d8bbac27d8b 100644
--- a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
+++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
@@ -9,6 +9,7 @@ Required properties:
       "fsl,imx53-sdma"
       "fsl,imx6q-sdma"
       "fsl,imx7d-sdma"
+      "fsl,imx8mq-sdma"
   The -to variants should be preferred since they allow to determine the
   correct ROM script addresses needed for the driver to work without additional
   firmware.
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [4/4] arm64: dts: imx8mq: Change ahb clock for imx8mq
  2019-03-28 13:38 ` Angus Ainslie (Purism)
  (?)
@ 2019-03-28 13:38 ` Angus Ainslie (Purism)
  -1 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie @ 2019-03-28 13:38 UTC (permalink / raw)
  To: angus
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

Set ahb clock on sdma1 to get rid of "Timeout waiting for CH0"
on the imx8mq.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index 07099f82965e..cd0f9eed9e9c 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -724,7 +724,7 @@
 				reg = <0x30bd0000 0x10000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,
-					 <&clk IMX8MQ_CLK_SDMA1_ROOT>;
+					 <&clk IMX8MQ_CLK_AHB>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				fsl,sdma-ram-script-name = "imx/sdma/sdma-imx7d.bin";

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

* [PATCH 4/4] arm64: dts: imx8mq: Change ahb clock for imx8mq
@ 2019-03-28 13:38 ` Angus Ainslie (Purism)
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-28 13:38 UTC (permalink / raw)
  To: angus
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

Set ahb clock on sdma1 to get rid of "Timeout waiting for CH0"
on the imx8mq.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index 07099f82965e..cd0f9eed9e9c 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -724,7 +724,7 @@
 				reg = <0x30bd0000 0x10000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,
-					 <&clk IMX8MQ_CLK_SDMA1_ROOT>;
+					 <&clk IMX8MQ_CLK_AHB>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				fsl,sdma-ram-script-name = "imx/sdma/sdma-imx7d.bin";
-- 
2.17.1


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

* [PATCH 4/4] arm64: dts: imx8mq: Change ahb clock for imx8mq
@ 2019-03-28 13:38 ` Angus Ainslie (Purism)
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-28 13:38 UTC (permalink / raw)
  To: angus
  Cc: Mark Rutland, devicetree, Carlo Caione, Shawn Guo, Sascha Hauer,
	linux-kernel, Daniel Baluta, Vinod Koul, Rob Herring,
	NXP Linux Team, Pengutronix Kernel Team, dmaengine, Dan Williams,
	Fabio Estevam, Guido Günther, linux-arm-kernel, Lucas Stach

Set ahb clock on sdma1 to get rid of "Timeout waiting for CH0"
on the imx8mq.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index 07099f82965e..cd0f9eed9e9c 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -724,7 +724,7 @@
 				reg = <0x30bd0000 0x10000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,
-					 <&clk IMX8MQ_CLK_SDMA1_ROOT>;
+					 <&clk IMX8MQ_CLK_AHB>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				fsl,sdma-ram-script-name = "imx/sdma/sdma-imx7d.bin";
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
  2019-03-28 13:38 ` [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma " Angus Ainslie (Purism)
  (?)
  (?)
@ 2019-03-28 14:56 ` Daniel Baluta
  -1 siblings, 0 replies; 61+ messages in thread
From: Daniel Baluta @ 2019-03-28 14:56 UTC (permalink / raw)
  To: angus
  Cc: dl-linux-imx, linux-kernel, robh+dt, ccaione, devicetree,
	festevam, agx, dan.j.williams, mark.rutland, dmaengine, shawnguo,
	linux-arm-kernel, vkoul, l.stach, kernel, s.hauer

On Thu, 2019-03-28 at 06:38 -0700, Angus Ainslie (Purism) wrote:
> Fix a typo in the compatible string
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>


Reviwed-by: Daniel Baluta <daniel.baluta@nxp.com>

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

* Re: [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
@ 2019-03-28 14:56 ` Daniel Baluta
  0 siblings, 0 replies; 61+ messages in thread
From: Daniel Baluta @ 2019-03-28 14:56 UTC (permalink / raw)
  To: angus
  Cc: dl-linux-imx, linux-kernel, robh+dt, ccaione, devicetree,
	festevam, agx, dan.j.williams, mark.rutland, dmaengine, shawnguo,
	linux-arm-kernel, vkoul, l.stach, kernel, s.hauer

On Thu, 2019-03-28 at 06:38 -0700, Angus Ainslie (Purism) wrote:
> Fix a typo in the compatible string
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>


Reviwed-by: Daniel Baluta <daniel.baluta@nxp.com>

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

* Re: [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
@ 2019-03-28 14:56 ` Daniel Baluta
  0 siblings, 0 replies; 61+ messages in thread
From: Daniel Baluta @ 2019-03-28 14:56 UTC (permalink / raw)
  To: angus
  Cc: dl-linux-imx, linux-kernel, robh+dt, ccaione, devicetree,
	festevam, agx, dan.j.williams, mark.rutland, dmaengine, shawnguo,
	linux-arm-kernel, vkoul, l.stach, kernel, s.hauer

On Thu, 2019-03-28 at 06:38 -0700, Angus Ainslie (Purism) wrote:
> Fix a typo in the compatible string
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>


Reviwed-by: Daniel Baluta <daniel.baluta@nxp.com>

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

* Re: [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
@ 2019-03-28 14:56 ` Daniel Baluta
  0 siblings, 0 replies; 61+ messages in thread
From: Daniel Baluta @ 2019-03-28 14:56 UTC (permalink / raw)
  To: angus
  Cc: mark.rutland, devicetree, ccaione, shawnguo, agx, linux-kernel,
	vkoul, robh+dt, dl-linux-imx, kernel, dmaengine, dan.j.williams,
	festevam, s.hauer, linux-arm-kernel, l.stach

On Thu, 2019-03-28 at 06:38 -0700, Angus Ainslie (Purism) wrote:
> Fix a typo in the compatible string
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>


Reviwed-by: Daniel Baluta <daniel.baluta@nxp.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [3/4] dt-bindings: Document the new imx8mq-sdma compatible string
  2019-03-28 13:38 ` Angus Ainslie (Purism)
  (?)
@ 2019-03-28 15:18 ` Daniel Baluta
  -1 siblings, 0 replies; 61+ messages in thread
From: Daniel Baluta @ 2019-03-28 15:18 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, Devicetree List,
	linux-arm-kernel, Linux Kernel Mailing List, dmaengine

On Thu, Mar 28, 2019 at 3:41 PM Angus Ainslie (Purism) <angus@akkea.ca> wrote:
>
> The imx8mq needs to be specified to check the clk ratio.
>
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> ---
>  Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
> index 3c9a57a8443b..9d8bbac27d8b 100644
> --- a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
> +++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
> @@ -9,6 +9,7 @@ Required properties:
>        "fsl,imx53-sdma"
>        "fsl,imx6q-sdma"
>        "fsl,imx7d-sdma"
> +      "fsl,imx8mq-sdma"

You can drop this patch. It is already in Shwan's for-next branch.

The joy of working in parallel on similar things.

thanks,
Daniel.

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

* Re: [PATCH 3/4] dt-bindings: Document the new imx8mq-sdma compatible string
@ 2019-03-28 15:18 ` Daniel Baluta
  0 siblings, 0 replies; 61+ messages in thread
From: Daniel Baluta @ 2019-03-28 15:18 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, Devicetree List,
	linux-arm-kernel, Linux Kernel Mailing List, dmaengine

On Thu, Mar 28, 2019 at 3:41 PM Angus Ainslie (Purism) <angus@akkea.ca> wrote:
>
> The imx8mq needs to be specified to check the clk ratio.
>
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> ---
>  Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
> index 3c9a57a8443b..9d8bbac27d8b 100644
> --- a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
> +++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
> @@ -9,6 +9,7 @@ Required properties:
>        "fsl,imx53-sdma"
>        "fsl,imx6q-sdma"
>        "fsl,imx7d-sdma"
> +      "fsl,imx8mq-sdma"

You can drop this patch. It is already in Shwan's for-next branch.

The joy of working in parallel on similar things.

thanks,
Daniel.

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

* Re: [PATCH 3/4] dt-bindings: Document the new imx8mq-sdma compatible string
@ 2019-03-28 15:18 ` Daniel Baluta
  0 siblings, 0 replies; 61+ messages in thread
From: Daniel Baluta @ 2019-03-28 15:18 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: Mark Rutland, Devicetree List, Carlo Caione, Shawn Guo,
	Sascha Hauer, Linux Kernel Mailing List, Daniel Baluta,
	Vinod Koul, Rob Herring, NXP Linux Team, Pengutronix Kernel Team,
	dmaengine, Dan Williams, Fabio Estevam, Guido Günther,
	linux-arm-kernel, Lucas Stach

On Thu, Mar 28, 2019 at 3:41 PM Angus Ainslie (Purism) <angus@akkea.ca> wrote:
>
> The imx8mq needs to be specified to check the clk ratio.
>
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> ---
>  Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
> index 3c9a57a8443b..9d8bbac27d8b 100644
> --- a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
> +++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
> @@ -9,6 +9,7 @@ Required properties:
>        "fsl,imx53-sdma"
>        "fsl,imx6q-sdma"
>        "fsl,imx7d-sdma"
> +      "fsl,imx8mq-sdma"

You can drop this patch. It is already in Shwan's for-next branch.

The joy of working in parallel on similar things.

thanks,
Daniel.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [2/4] dmaengine: imx-sdma: Add clock ratio 1:1 check
  2019-03-28 13:38 ` Angus Ainslie (Purism)
  (?)
@ 2019-03-28 22:52 ` Fabio Estevam
  -1 siblings, 0 replies; 61+ messages in thread
From: Fabio Estevam @ 2019-03-28 22:52 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, NXP Linux Team, Dan Williams,
	Vinod Koul, Lucas Stach, Carlo Caione, Daniel Baluta,
	Guido Günther,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel, dmaengine

Hi Angus,

On Thu, Mar 28, 2019 at 10:39 AM Angus Ainslie (Purism) <angus@akkea.ca> wrote:
>
> On imx8mq B0 chip, AHB/SDMA clock ratio 2:1 can't be supported,
> since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach
> to 500Mhz, so use 1:1 instead.
>
> To limit this change to the imx8mq for now this patch also adds an
> im8mq-sdma compatible string.
>
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>

This has already been applied and it is in linux-next:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20190328&id=25aaa75df1e659901d77085bcdd25eaabf265688

Please send an incremental fix instead.

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

* Re: [PATCH 2/4] dmaengine: imx-sdma: Add clock ratio 1:1 check
@ 2019-03-28 22:52 ` Fabio Estevam
  0 siblings, 0 replies; 61+ messages in thread
From: Fabio Estevam @ 2019-03-28 22:52 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, NXP Linux Team, Dan Williams,
	Vinod Koul, Lucas Stach, Carlo Caione, Daniel Baluta,
	Guido Günther,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel, dmaengine

Hi Angus,

On Thu, Mar 28, 2019 at 10:39 AM Angus Ainslie (Purism) <angus@akkea.ca> wrote:
>
> On imx8mq B0 chip, AHB/SDMA clock ratio 2:1 can't be supported,
> since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach
> to 500Mhz, so use 1:1 instead.
>
> To limit this change to the imx8mq for now this patch also adds an
> im8mq-sdma compatible string.
>
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>

This has already been applied and it is in linux-next:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20190328&id=25aaa75df1e659901d77085bcdd25eaabf265688

Please send an incremental fix instead.

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

* Re: [PATCH 2/4] dmaengine: imx-sdma: Add clock ratio 1:1 check
@ 2019-03-28 22:52 ` Fabio Estevam
  0 siblings, 0 replies; 61+ messages in thread
From: Fabio Estevam @ 2019-03-28 22:52 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Carlo Caione, Daniel Baluta, Sascha Hauer, linux-kernel,
	Vinod Koul, Rob Herring, NXP Linux Team, Pengutronix Kernel Team,
	dmaengine, Dan Williams, Shawn Guo, Guido Günther,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Lucas Stach

Hi Angus,

On Thu, Mar 28, 2019 at 10:39 AM Angus Ainslie (Purism) <angus@akkea.ca> wrote:
>
> On imx8mq B0 chip, AHB/SDMA clock ratio 2:1 can't be supported,
> since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach
> to 500Mhz, so use 1:1 instead.
>
> To limit this change to the imx8mq for now this patch also adds an
> im8mq-sdma compatible string.
>
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>

This has already been applied and it is in linux-next:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20190328&id=25aaa75df1e659901d77085bcdd25eaabf265688

Please send an incremental fix instead.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
  2019-03-28 13:38 ` [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma " Angus Ainslie (Purism)
  (?)
@ 2019-03-29  9:10 ` Aisheng Dong
  -1 siblings, 0 replies; 61+ messages in thread
From: Dong Aisheng @ 2019-03-29  9:10 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

> From: Angus Ainslie (Purism) [mailto:angus@akkea.ca]
> Sent: Thursday, March 28, 2019 9:38 PM
> 
> Fix a typo in the compatible string
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> ---
>  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> index 81d5ce1b1ec1..07099f82965e 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> @@ -720,7 +720,7 @@
>  			};
> 
>  			sdma1: sdma@30bd0000 {
> -				compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
> +				compatible = "fsl,mx8mq-sdma","fsl,imx7d-sdma";

This is a bit strange.
If binding doc says like that, probably we'd better fix the typo in binding doc
to use the same style.

Regards
Dong Aisheng

>  				reg = <0x30bd0000 0x10000>;
>  				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
>  				clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,
> --
> 2.17.1

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

* RE: [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
@ 2019-03-29  9:10 ` Aisheng Dong
  0 siblings, 0 replies; 61+ messages in thread
From: Aisheng Dong @ 2019-03-29  9:10 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

> From: Angus Ainslie (Purism) [mailto:angus@akkea.ca]
> Sent: Thursday, March 28, 2019 9:38 PM
> 
> Fix a typo in the compatible string
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> ---
>  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> index 81d5ce1b1ec1..07099f82965e 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> @@ -720,7 +720,7 @@
>  			};
> 
>  			sdma1: sdma@30bd0000 {
> -				compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
> +				compatible = "fsl,mx8mq-sdma","fsl,imx7d-sdma";

This is a bit strange.
If binding doc says like that, probably we'd better fix the typo in binding doc
to use the same style.

Regards
Dong Aisheng

>  				reg = <0x30bd0000 0x10000>;
>  				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
>  				clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,
> --
> 2.17.1


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

* RE: [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
@ 2019-03-29  9:10 ` Aisheng Dong
  0 siblings, 0 replies; 61+ messages in thread
From: Aisheng Dong @ 2019-03-29  9:10 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: Mark Rutland, devicetree, Carlo Caione, Shawn Guo, Sascha Hauer,
	linux-kernel, Daniel Baluta, Vinod Koul, Rob Herring,
	dl-linux-imx, Pengutronix Kernel Team, dmaengine, Dan Williams,
	Fabio Estevam, Guido Günther, linux-arm-kernel, Lucas Stach

> From: Angus Ainslie (Purism) [mailto:angus@akkea.ca]
> Sent: Thursday, March 28, 2019 9:38 PM
> 
> Fix a typo in the compatible string
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> ---
>  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> index 81d5ce1b1ec1..07099f82965e 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> @@ -720,7 +720,7 @@
>  			};
> 
>  			sdma1: sdma@30bd0000 {
> -				compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
> +				compatible = "fsl,mx8mq-sdma","fsl,imx7d-sdma";

This is a bit strange.
If binding doc says like that, probably we'd better fix the typo in binding doc
to use the same style.

Regards
Dong Aisheng

>  				reg = <0x30bd0000 0x10000>;
>  				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
>  				clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,
> --
> 2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
  2019-03-29  9:10 ` Aisheng Dong
  (?)
  (?)
@ 2019-03-29 11:20 ` Daniel Baluta
  -1 siblings, 0 replies; 61+ messages in thread
From: Daniel Baluta @ 2019-03-29 11:20 UTC (permalink / raw)
  To: Aisheng Dong
  Cc: Angus Ainslie (Purism),
	Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

On Fri, Mar 29, 2019 at 11:11 AM Aisheng Dong <aisheng.dong@nxp.com> wrote:
>
> > From: Angus Ainslie (Purism) [mailto:angus@akkea.ca]
> > Sent: Thursday, March 28, 2019 9:38 PM
> >
> > Fix a typo in the compatible string
> >
> > Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> > ---
> >  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > index 81d5ce1b1ec1..07099f82965e 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > @@ -720,7 +720,7 @@
> >                       };
> >
> >                       sdma1: sdma@30bd0000 {
> > -                             compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
> > +                             compatible = "fsl,mx8mq-sdma","fsl,imx7d-sdma";
>
> This is a bit strange.
> If binding doc says like that, probably we'd better fix the typo in binding doc
> to use the same style.

Oh, indeed.

Angus, shouldn't this be fsl,imx8mq-sdma instead of fsl,mx8mq-sdma. I
was just paying
attention to the extra space in my patch.

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

* Re: [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
@ 2019-03-29 11:20 ` Daniel Baluta
  0 siblings, 0 replies; 61+ messages in thread
From: Daniel Baluta @ 2019-03-29 11:20 UTC (permalink / raw)
  To: Aisheng Dong
  Cc: Angus Ainslie (Purism),
	Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

On Fri, Mar 29, 2019 at 11:11 AM Aisheng Dong <aisheng.dong@nxp.com> wrote:
>
> > From: Angus Ainslie (Purism) [mailto:angus@akkea.ca]
> > Sent: Thursday, March 28, 2019 9:38 PM
> >
> > Fix a typo in the compatible string
> >
> > Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> > ---
> >  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > index 81d5ce1b1ec1..07099f82965e 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > @@ -720,7 +720,7 @@
> >                       };
> >
> >                       sdma1: sdma@30bd0000 {
> > -                             compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
> > +                             compatible = "fsl,mx8mq-sdma","fsl,imx7d-sdma";
>
> This is a bit strange.
> If binding doc says like that, probably we'd better fix the typo in binding doc
> to use the same style.

Oh, indeed.

Angus, shouldn't this be fsl,imx8mq-sdma instead of fsl,mx8mq-sdma. I
was just paying
attention to the extra space in my patch.

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

* Re: [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
@ 2019-03-29 11:20 ` Daniel Baluta
  0 siblings, 0 replies; 61+ messages in thread
From: Daniel Baluta @ 2019-03-29 11:20 UTC (permalink / raw)
  To: Aisheng Dong
  Cc: Angus Ainslie (Purism),
	Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel

On Fri, Mar 29, 2019 at 11:11 AM Aisheng Dong <aisheng.dong@nxp.com> wrote:
>
> > From: Angus Ainslie (Purism) [mailto:angus@akkea.ca]
> > Sent: Thursday, March 28, 2019 9:38 PM
> >
> > Fix a typo in the compatible string
> >
> > Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> > ---
> >  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > index 81d5ce1b1ec1..07099f82965e 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > @@ -720,7 +720,7 @@
> >                       };
> >
> >                       sdma1: sdma@30bd0000 {
> > -                             compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
> > +                             compatible = "fsl,mx8mq-sdma","fsl,imx7d-sdma";
>
> This is a bit strange.
> If binding doc says like that, probably we'd better fix the typo in binding doc
> to use the same style.

Oh, indeed.

Angus, shouldn't this be fsl,imx8mq-sdma instead of fsl,mx8mq-sdma. I
was just paying
attention to the extra space in my patch.

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

* Re: [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
@ 2019-03-29 11:20 ` Daniel Baluta
  0 siblings, 0 replies; 61+ messages in thread
From: Daniel Baluta @ 2019-03-29 11:20 UTC (permalink / raw)
  To: Aisheng Dong
  Cc: Mark Rutland, devicetree, Carlo Caione, Fabio Estevam,
	Sascha Hauer, Angus Ainslie (Purism),
	linux-kernel, Daniel Baluta, Vinod Koul, Rob Herring,
	dl-linux-imx, Pengutronix Kernel Team, dmaengine, Dan Williams,
	Shawn Guo, Guido Günther, linux-arm-kernel, Lucas Stach

On Fri, Mar 29, 2019 at 11:11 AM Aisheng Dong <aisheng.dong@nxp.com> wrote:
>
> > From: Angus Ainslie (Purism) [mailto:angus@akkea.ca]
> > Sent: Thursday, March 28, 2019 9:38 PM
> >
> > Fix a typo in the compatible string
> >
> > Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> > ---
> >  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > index 81d5ce1b1ec1..07099f82965e 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> > @@ -720,7 +720,7 @@
> >                       };
> >
> >                       sdma1: sdma@30bd0000 {
> > -                             compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
> > +                             compatible = "fsl,mx8mq-sdma","fsl,imx7d-sdma";
>
> This is a bit strange.
> If binding doc says like that, probably we'd better fix the typo in binding doc
> to use the same style.

Oh, indeed.

Angus, shouldn't this be fsl,imx8mq-sdma instead of fsl,mx8mq-sdma. I
was just paying
attention to the extra space in my patch.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
  2019-03-29 11:20 ` Daniel Baluta
  (?)
@ 2019-03-29 14:09 ` Angus Ainslie
  -1 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie @ 2019-03-29 14:09 UTC (permalink / raw)
  To: Daniel Baluta
  Cc: Aisheng Dong, Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

On 2019-03-29 04:20, Daniel Baluta wrote:
> On Fri, Mar 29, 2019 at 11:11 AM Aisheng Dong <aisheng.dong@nxp.com> 
> wrote:
>> 
>> > From: Angus Ainslie (Purism) [mailto:angus@akkea.ca]
>> > Sent: Thursday, March 28, 2019 9:38 PM
>> >
>> > Fix a typo in the compatible string
>> >
>> > Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
>> > ---
>> >  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
>> > b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
>> > index 81d5ce1b1ec1..07099f82965e 100644
>> > --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
>> > +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
>> > @@ -720,7 +720,7 @@
>> >                       };
>> >
>> >                       sdma1: sdma@30bd0000 {
>> > -                             compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
>> > +                             compatible = "fsl,mx8mq-sdma","fsl,imx7d-sdma";
>> 
>> This is a bit strange.
>> If binding doc says like that, probably we'd better fix the typo in 
>> binding doc
>> to use the same style.
> 
> Oh, indeed.
> 
> Angus, shouldn't this be fsl,imx8mq-sdma instead of fsl,mx8mq-sdma. I
> was just paying
> attention to the extra space in my patch.

Correct I took too many characters when I dropped the space. I'll fix it 
for v2.

Angus

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

* Re: [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma  compatible string
@ 2019-03-29 14:09 ` Angus Ainslie
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie @ 2019-03-29 14:09 UTC (permalink / raw)
  To: Daniel Baluta
  Cc: Aisheng Dong, Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

On 2019-03-29 04:20, Daniel Baluta wrote:
> On Fri, Mar 29, 2019 at 11:11 AM Aisheng Dong <aisheng.dong@nxp.com> 
> wrote:
>> 
>> > From: Angus Ainslie (Purism) [mailto:angus@akkea.ca]
>> > Sent: Thursday, March 28, 2019 9:38 PM
>> >
>> > Fix a typo in the compatible string
>> >
>> > Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
>> > ---
>> >  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
>> > b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
>> > index 81d5ce1b1ec1..07099f82965e 100644
>> > --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
>> > +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
>> > @@ -720,7 +720,7 @@
>> >                       };
>> >
>> >                       sdma1: sdma@30bd0000 {
>> > -                             compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
>> > +                             compatible = "fsl,mx8mq-sdma","fsl,imx7d-sdma";
>> 
>> This is a bit strange.
>> If binding doc says like that, probably we'd better fix the typo in 
>> binding doc
>> to use the same style.
> 
> Oh, indeed.
> 
> Angus, shouldn't this be fsl,imx8mq-sdma instead of fsl,mx8mq-sdma. I
> was just paying
> attention to the extra space in my patch.

Correct I took too many characters when I dropped the space. I'll fix it 
for v2.

Angus

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

* Re: [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl, imx8mq-sdma  compatible string
@ 2019-03-29 14:09 ` Angus Ainslie
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie @ 2019-03-29 14:09 UTC (permalink / raw)
  To: Daniel Baluta
  Cc: Aisheng Dong, Mark Rutland, linux-arm-kernel, Carlo Caione,
	Fabio Estevam, Sascha Hauer, linux-kernel, Daniel Baluta,
	Vinod Koul, Rob Herring, dl-linux-imx, Pengutronix Kernel Team,
	dmaengine, Dan Williams, Shawn Guo, Guido Günther,
	devicetree, Lucas Stach

On 2019-03-29 04:20, Daniel Baluta wrote:
> On Fri, Mar 29, 2019 at 11:11 AM Aisheng Dong <aisheng.dong@nxp.com> 
> wrote:
>> 
>> > From: Angus Ainslie (Purism) [mailto:angus@akkea.ca]
>> > Sent: Thursday, March 28, 2019 9:38 PM
>> >
>> > Fix a typo in the compatible string
>> >
>> > Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
>> > ---
>> >  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
>> > b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
>> > index 81d5ce1b1ec1..07099f82965e 100644
>> > --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
>> > +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
>> > @@ -720,7 +720,7 @@
>> >                       };
>> >
>> >                       sdma1: sdma@30bd0000 {
>> > -                             compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
>> > +                             compatible = "fsl,mx8mq-sdma","fsl,imx7d-sdma";
>> 
>> This is a bit strange.
>> If binding doc says like that, probably we'd better fix the typo in 
>> binding doc
>> to use the same style.
> 
> Oh, indeed.
> 
> Angus, shouldn't this be fsl,imx8mq-sdma instead of fsl,mx8mq-sdma. I
> was just paying
> attention to the extra space in my patch.

Correct I took too many characters when I dropped the space. I'll fix it 
for v2.

Angus

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2 0/3] Fix imx8mq ratio 1:1 check
  2019-03-28 13:38 ` Angus Ainslie (Purism)
@ 2019-03-29 15:21   ` Angus Ainslie (Purism)
  -1 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-29 15:21 UTC (permalink / raw)
  To: angus.ainslie
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Angus Ainslie (Purism),
	Carlo Caione, Daniel Baluta, Guido Günther, devicetree,
	linux-arm-kernel, linux-kernel, dmaengine

The imx8mq 1:1 check breaks some earlier imx chips so limit the
ratio check to the imx8mq.

Changes since v1:
Use the correct compatible string when fixing things.
Just add the imx8mq parts to the ratio check.
Drop the dt bindings update.

Angus Ainslie (Purism) (3):
  arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
  dmaengine: imx-sdma: Only check ratio on parts that support 1:1
  arm64: dts: imx8mq: Change ahb clock for imx8mq

 arch/arm64/boot/dts/freescale/imx8mq.dtsi |  4 ++--
 drivers/dma/imx-sdma.c                    | 15 ++++++++++++++-
 2 files changed, 16 insertions(+), 3 deletions(-)

-- 
2.17.1


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

* [PATCH v2 0/3] Fix imx8mq ratio 1:1 check
@ 2019-03-29 15:21   ` Angus Ainslie (Purism)
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-29 15:21 UTC (permalink / raw)
  To: angus.ainslie
  Cc: Mark Rutland, devicetree, Carlo Caione, Shawn Guo, Sascha Hauer,
	Angus Ainslie (Purism),
	linux-kernel, Daniel Baluta, Vinod Koul, Rob Herring,
	NXP Linux Team, Pengutronix Kernel Team, dmaengine, Dan Williams,
	Fabio Estevam, Guido Günther, linux-arm-kernel, Lucas Stach

The imx8mq 1:1 check breaks some earlier imx chips so limit the
ratio check to the imx8mq.

Changes since v1:
Use the correct compatible string when fixing things.
Just add the imx8mq parts to the ratio check.
Drop the dt bindings update.

Angus Ainslie (Purism) (3):
  arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
  dmaengine: imx-sdma: Only check ratio on parts that support 1:1
  arm64: dts: imx8mq: Change ahb clock for imx8mq

 arch/arm64/boot/dts/freescale/imx8mq.dtsi |  4 ++--
 drivers/dma/imx-sdma.c                    | 15 ++++++++++++++-
 2 files changed, 16 insertions(+), 3 deletions(-)

-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [v2,1/3] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
  2019-03-29 15:21   ` Angus Ainslie (Purism)
  (?)
@ 2019-03-29 15:21 ` Angus Ainslie (Purism)
  -1 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie @ 2019-03-29 15:21 UTC (permalink / raw)
  To: angus.ainslie
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Angus Ainslie (Purism),
	Carlo Caione, Daniel Baluta, Guido Günther, devicetree,
	linux-arm-kernel, linux-kernel, dmaengine

Fix a typo in the compatible string

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index 81d5ce1b1ec1..06158625f24f 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -720,7 +720,7 @@
 			};
 
 			sdma1: sdma@30bd0000 {
-				compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
+				compatible = "fsl,imx8mq-sdma","fsl,imx7d-sdma";
 				reg = <0x30bd0000 0x10000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,

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

* [PATCH v2 1/3] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
@ 2019-03-29 15:21 ` Angus Ainslie (Purism)
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-29 15:21 UTC (permalink / raw)
  To: angus.ainslie
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Angus Ainslie (Purism),
	Carlo Caione, Daniel Baluta, Guido Günther, devicetree,
	linux-arm-kernel, linux-kernel, dmaengine

Fix a typo in the compatible string

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index 81d5ce1b1ec1..06158625f24f 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -720,7 +720,7 @@
 			};
 
 			sdma1: sdma@30bd0000 {
-				compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
+				compatible = "fsl,imx8mq-sdma","fsl,imx7d-sdma";
 				reg = <0x30bd0000 0x10000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,
-- 
2.17.1


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

* [PATCH v2 1/3] arm64: dts: imx8mq: Fix the fsl, imx8mq-sdma compatible string
@ 2019-03-29 15:21 ` Angus Ainslie (Purism)
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-29 15:21 UTC (permalink / raw)
  To: angus.ainslie
  Cc: Mark Rutland, devicetree, Carlo Caione, Shawn Guo, Sascha Hauer,
	Angus Ainslie (Purism),
	linux-kernel, Daniel Baluta, Vinod Koul, Rob Herring,
	NXP Linux Team, Pengutronix Kernel Team, dmaengine, Dan Williams,
	Fabio Estevam, Guido Günther, linux-arm-kernel, Lucas Stach

Fix a typo in the compatible string

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index 81d5ce1b1ec1..06158625f24f 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -720,7 +720,7 @@
 			};
 
 			sdma1: sdma@30bd0000 {
-				compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
+				compatible = "fsl,imx8mq-sdma","fsl,imx7d-sdma";
 				reg = <0x30bd0000 0x10000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [v2,2/3] dmaengine: imx-sdma: Only check ratio on parts that support 1:1
  2019-03-29 15:21   ` Angus Ainslie (Purism)
  (?)
@ 2019-03-29 15:21 ` Angus Ainslie (Purism)
  -1 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie @ 2019-03-29 15:21 UTC (permalink / raw)
  To: angus.ainslie
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Angus Ainslie (Purism),
	Carlo Caione, Daniel Baluta, Guido Günther, devicetree,
	linux-arm-kernel, linux-kernel, dmaengine

On imx8mq B0 chip, AHB/SDMA clock ratio 2:1 can't be supported,
since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach
to 500Mhz, so use 1:1 instead.

To limit this change to the imx8mq for now this patch also adds an
im8mq-sdma compatible string.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 drivers/dma/imx-sdma.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 5f3c1378b90e..99d9f431ae2c 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -419,6 +419,7 @@ struct sdma_driver_data {
 	int chnenbl0;
 	int num_events;
 	struct sdma_script_start_addrs	*script_addrs;
+	bool check_ratio;
 };
 
 struct sdma_engine {
@@ -557,6 +558,13 @@ static struct sdma_driver_data sdma_imx7d = {
 	.script_addrs = &sdma_script_imx7d,
 };
 
+static struct sdma_driver_data sdma_imx8mq = {
+	.chnenbl0 = SDMA_CHNENBL0_IMX35,
+	.num_events = 48,
+	.script_addrs = &sdma_script_imx7d,
+	.check_ratio = 1,
+};
+
 static const struct platform_device_id sdma_devtypes[] = {
 	{
 		.name = "imx25-sdma",
@@ -579,6 +587,9 @@ static const struct platform_device_id sdma_devtypes[] = {
 	}, {
 		.name = "imx7d-sdma",
 		.driver_data = (unsigned long)&sdma_imx7d,
+	}, {
+		.name = "imx8mq-sdma",
+		.driver_data = (unsigned long)&sdma_imx8mq,
 	}, {
 		/* sentinel */
 	}
@@ -593,6 +604,7 @@ static const struct of_device_id sdma_dt_ids[] = {
 	{ .compatible = "fsl,imx31-sdma", .data = &sdma_imx31, },
 	{ .compatible = "fsl,imx25-sdma", .data = &sdma_imx25, },
 	{ .compatible = "fsl,imx7d-sdma", .data = &sdma_imx7d, },
+	{ .compatible = "fsl,imx8mq-sdma", .data = &sdma_imx8mq, },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, sdma_dt_ids);
@@ -1852,7 +1864,8 @@ static int sdma_init(struct sdma_engine *sdma)
 	if (ret)
 		goto disable_clk_ipg;
 
-	if (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma->clk_ipg))
+	if (sdma->drvdata->check_ratio &&
+	    (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma->clk_ipg)))
 		sdma->clk_ratio = 1;
 
 	/* Be sure SDMA has not started yet */

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

* [PATCH v2 2/3] dmaengine: imx-sdma: Only check ratio on parts that support 1:1
@ 2019-03-29 15:21 ` Angus Ainslie (Purism)
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-29 15:21 UTC (permalink / raw)
  To: angus.ainslie
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Angus Ainslie (Purism),
	Carlo Caione, Daniel Baluta, Guido Günther, devicetree,
	linux-arm-kernel, linux-kernel, dmaengine

On imx8mq B0 chip, AHB/SDMA clock ratio 2:1 can't be supported,
since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach
to 500Mhz, so use 1:1 instead.

To limit this change to the imx8mq for now this patch also adds an
im8mq-sdma compatible string.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 drivers/dma/imx-sdma.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 5f3c1378b90e..99d9f431ae2c 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -419,6 +419,7 @@ struct sdma_driver_data {
 	int chnenbl0;
 	int num_events;
 	struct sdma_script_start_addrs	*script_addrs;
+	bool check_ratio;
 };
 
 struct sdma_engine {
@@ -557,6 +558,13 @@ static struct sdma_driver_data sdma_imx7d = {
 	.script_addrs = &sdma_script_imx7d,
 };
 
+static struct sdma_driver_data sdma_imx8mq = {
+	.chnenbl0 = SDMA_CHNENBL0_IMX35,
+	.num_events = 48,
+	.script_addrs = &sdma_script_imx7d,
+	.check_ratio = 1,
+};
+
 static const struct platform_device_id sdma_devtypes[] = {
 	{
 		.name = "imx25-sdma",
@@ -579,6 +587,9 @@ static const struct platform_device_id sdma_devtypes[] = {
 	}, {
 		.name = "imx7d-sdma",
 		.driver_data = (unsigned long)&sdma_imx7d,
+	}, {
+		.name = "imx8mq-sdma",
+		.driver_data = (unsigned long)&sdma_imx8mq,
 	}, {
 		/* sentinel */
 	}
@@ -593,6 +604,7 @@ static const struct of_device_id sdma_dt_ids[] = {
 	{ .compatible = "fsl,imx31-sdma", .data = &sdma_imx31, },
 	{ .compatible = "fsl,imx25-sdma", .data = &sdma_imx25, },
 	{ .compatible = "fsl,imx7d-sdma", .data = &sdma_imx7d, },
+	{ .compatible = "fsl,imx8mq-sdma", .data = &sdma_imx8mq, },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, sdma_dt_ids);
@@ -1852,7 +1864,8 @@ static int sdma_init(struct sdma_engine *sdma)
 	if (ret)
 		goto disable_clk_ipg;
 
-	if (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma->clk_ipg))
+	if (sdma->drvdata->check_ratio &&
+	    (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma->clk_ipg)))
 		sdma->clk_ratio = 1;
 
 	/* Be sure SDMA has not started yet */
-- 
2.17.1


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

* [PATCH v2 2/3] dmaengine: imx-sdma: Only check ratio on parts that support 1:1
@ 2019-03-29 15:21 ` Angus Ainslie (Purism)
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-29 15:21 UTC (permalink / raw)
  To: angus.ainslie
  Cc: Mark Rutland, devicetree, Carlo Caione, Shawn Guo, Sascha Hauer,
	Angus Ainslie (Purism),
	linux-kernel, Daniel Baluta, Vinod Koul, Rob Herring,
	NXP Linux Team, Pengutronix Kernel Team, dmaengine, Dan Williams,
	Fabio Estevam, Guido Günther, linux-arm-kernel, Lucas Stach

On imx8mq B0 chip, AHB/SDMA clock ratio 2:1 can't be supported,
since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach
to 500Mhz, so use 1:1 instead.

To limit this change to the imx8mq for now this patch also adds an
im8mq-sdma compatible string.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 drivers/dma/imx-sdma.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 5f3c1378b90e..99d9f431ae2c 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -419,6 +419,7 @@ struct sdma_driver_data {
 	int chnenbl0;
 	int num_events;
 	struct sdma_script_start_addrs	*script_addrs;
+	bool check_ratio;
 };
 
 struct sdma_engine {
@@ -557,6 +558,13 @@ static struct sdma_driver_data sdma_imx7d = {
 	.script_addrs = &sdma_script_imx7d,
 };
 
+static struct sdma_driver_data sdma_imx8mq = {
+	.chnenbl0 = SDMA_CHNENBL0_IMX35,
+	.num_events = 48,
+	.script_addrs = &sdma_script_imx7d,
+	.check_ratio = 1,
+};
+
 static const struct platform_device_id sdma_devtypes[] = {
 	{
 		.name = "imx25-sdma",
@@ -579,6 +587,9 @@ static const struct platform_device_id sdma_devtypes[] = {
 	}, {
 		.name = "imx7d-sdma",
 		.driver_data = (unsigned long)&sdma_imx7d,
+	}, {
+		.name = "imx8mq-sdma",
+		.driver_data = (unsigned long)&sdma_imx8mq,
 	}, {
 		/* sentinel */
 	}
@@ -593,6 +604,7 @@ static const struct of_device_id sdma_dt_ids[] = {
 	{ .compatible = "fsl,imx31-sdma", .data = &sdma_imx31, },
 	{ .compatible = "fsl,imx25-sdma", .data = &sdma_imx25, },
 	{ .compatible = "fsl,imx7d-sdma", .data = &sdma_imx7d, },
+	{ .compatible = "fsl,imx8mq-sdma", .data = &sdma_imx8mq, },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, sdma_dt_ids);
@@ -1852,7 +1864,8 @@ static int sdma_init(struct sdma_engine *sdma)
 	if (ret)
 		goto disable_clk_ipg;
 
-	if (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma->clk_ipg))
+	if (sdma->drvdata->check_ratio &&
+	    (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma->clk_ipg)))
 		sdma->clk_ratio = 1;
 
 	/* Be sure SDMA has not started yet */
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [v2,3/3] arm64: dts: imx8mq: Change ahb clock for imx8mq
  2019-03-29 15:21   ` Angus Ainslie (Purism)
  (?)
@ 2019-03-29 15:21 ` Angus Ainslie (Purism)
  -1 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie @ 2019-03-29 15:21 UTC (permalink / raw)
  To: angus.ainslie
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Angus Ainslie (Purism),
	Carlo Caione, Daniel Baluta, Guido Günther, devicetree,
	linux-arm-kernel, linux-kernel, dmaengine

Set ahb clock on sdma1 to get rid of "Timeout waiting for CH0"
on the imx8mq.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index 06158625f24f..7233d9a315b8 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -724,7 +724,7 @@
 				reg = <0x30bd0000 0x10000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,
-					 <&clk IMX8MQ_CLK_SDMA1_ROOT>;
+					 <&clk IMX8MQ_CLK_AHB>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				fsl,sdma-ram-script-name = "imx/sdma/sdma-imx7d.bin";

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

* [PATCH v2 3/3] arm64: dts: imx8mq: Change ahb clock for imx8mq
@ 2019-03-29 15:21 ` Angus Ainslie (Purism)
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-29 15:21 UTC (permalink / raw)
  To: angus.ainslie
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Angus Ainslie (Purism),
	Carlo Caione, Daniel Baluta, Guido Günther, devicetree,
	linux-arm-kernel, linux-kernel, dmaengine

Set ahb clock on sdma1 to get rid of "Timeout waiting for CH0"
on the imx8mq.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index 06158625f24f..7233d9a315b8 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -724,7 +724,7 @@
 				reg = <0x30bd0000 0x10000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,
-					 <&clk IMX8MQ_CLK_SDMA1_ROOT>;
+					 <&clk IMX8MQ_CLK_AHB>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				fsl,sdma-ram-script-name = "imx/sdma/sdma-imx7d.bin";
-- 
2.17.1


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

* [PATCH v2 3/3] arm64: dts: imx8mq: Change ahb clock for imx8mq
@ 2019-03-29 15:21 ` Angus Ainslie (Purism)
  0 siblings, 0 replies; 61+ messages in thread
From: Angus Ainslie (Purism) @ 2019-03-29 15:21 UTC (permalink / raw)
  To: angus.ainslie
  Cc: Mark Rutland, devicetree, Carlo Caione, Shawn Guo, Sascha Hauer,
	Angus Ainslie (Purism),
	linux-kernel, Daniel Baluta, Vinod Koul, Rob Herring,
	NXP Linux Team, Pengutronix Kernel Team, dmaengine, Dan Williams,
	Fabio Estevam, Guido Günther, linux-arm-kernel, Lucas Stach

Set ahb clock on sdma1 to get rid of "Timeout waiting for CH0"
on the imx8mq.

Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index 06158625f24f..7233d9a315b8 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -724,7 +724,7 @@
 				reg = <0x30bd0000 0x10000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,
-					 <&clk IMX8MQ_CLK_SDMA1_ROOT>;
+					 <&clk IMX8MQ_CLK_AHB>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				fsl,sdma-ram-script-name = "imx/sdma/sdma-imx7d.bin";
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [v2,1/3] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
  2019-03-29 15:21 ` [PATCH v2 1/3] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma " Angus Ainslie (Purism)
  (?)
@ 2019-03-30 16:55 ` Daniel Baluta
  -1 siblings, 0 replies; 61+ messages in thread
From: Daniel Baluta @ 2019-03-30 16:55 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: Angus Ainslie, Rob Herring, Mark Rutland, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	dl-linux-imx, Dan Williams, Vinod Koul, Lucas Stach,
	Carlo Caione, Guido Günther, Devicetree List,
	linux-arm-kernel, Linux Kernel Mailing List, dmaengine

On Fri, Mar 29, 2019 at 5:22 PM Angus Ainslie (Purism) <angus@akkea.ca> wrote:
>
> Fix a typo in the compatible string
>
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>

> ---
>  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> index 81d5ce1b1ec1..06158625f24f 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> @@ -720,7 +720,7 @@
>                         };
>
>                         sdma1: sdma@30bd0000 {
> -                               compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
> +                               compatible = "fsl,imx8mq-sdma","fsl,imx7d-sdma";
>                                 reg = <0x30bd0000 0x10000>;
>                                 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
>                                 clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,
> --
> 2.17.1
>

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

* Re: [PATCH v2 1/3] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
@ 2019-03-30 16:55 ` Daniel Baluta
  0 siblings, 0 replies; 61+ messages in thread
From: Daniel Baluta @ 2019-03-30 16:55 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: Angus Ainslie, Rob Herring, Mark Rutland, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	dl-linux-imx, Dan Williams, Vinod Koul, Lucas Stach,
	Carlo Caione, Guido Günther, Devicetree List,
	linux-arm-kernel, Linux Kernel Mailing List, dmaengine

On Fri, Mar 29, 2019 at 5:22 PM Angus Ainslie (Purism) <angus@akkea.ca> wrote:
>
> Fix a typo in the compatible string
>
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>

> ---
>  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> index 81d5ce1b1ec1..06158625f24f 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> @@ -720,7 +720,7 @@
>                         };
>
>                         sdma1: sdma@30bd0000 {
> -                               compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
> +                               compatible = "fsl,imx8mq-sdma","fsl,imx7d-sdma";
>                                 reg = <0x30bd0000 0x10000>;
>                                 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
>                                 clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,
> --
> 2.17.1
>

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

* Re: [PATCH v2 1/3] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
@ 2019-03-30 16:55 ` Daniel Baluta
  0 siblings, 0 replies; 61+ messages in thread
From: Daniel Baluta @ 2019-03-30 17:01 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: Mark Rutland, Devicetree List, Carlo Caione, Fabio Estevam,
	Sascha Hauer, Linux Kernel Mailing List, dmaengine, Vinod Koul,
	Rob Herring, dl-linux-imx, Pengutronix Kernel Team,
	Angus Ainslie, Dan Williams, Shawn Guo, Guido Günther,
	linux-arm-kernel, Lucas Stach

On Fri, Mar 29, 2019 at 5:22 PM Angus Ainslie (Purism) <angus@akkea.ca> wrote:
>
> Fix a typo in the compatible string
>
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>

> ---
>  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> index 81d5ce1b1ec1..06158625f24f 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> @@ -720,7 +720,7 @@
>                         };
>
>                         sdma1: sdma@30bd0000 {
> -                               compatible = "fsl, imx8mq-sdma","fsl,imx7d-sdma";
> +                               compatible = "fsl,imx8mq-sdma","fsl,imx7d-sdma";
>                                 reg = <0x30bd0000 0x10000>;
>                                 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
>                                 clocks = <&clk IMX8MQ_CLK_SDMA1_ROOT>,
> --
> 2.17.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [v2,1/3] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
  2019-03-29 15:21 ` [PATCH v2 1/3] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma " Angus Ainslie (Purism)
  (?)
@ 2019-04-03 10:59 ` Shawn Guo
  -1 siblings, 0 replies; 61+ messages in thread
From: Shawn Guo @ 2019-04-03 10:59 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: angus.ainslie, Rob Herring, Mark Rutland, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

On Fri, Mar 29, 2019 at 08:21:28AM -0700, Angus Ainslie (Purism) wrote:
> Fix a typo in the compatible string
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>

Applied, thanks.

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

* Re: [PATCH v2 1/3] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
@ 2019-04-03 10:59 ` Shawn Guo
  0 siblings, 0 replies; 61+ messages in thread
From: Shawn Guo @ 2019-04-03 10:59 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: angus.ainslie, Rob Herring, Mark Rutland, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

On Fri, Mar 29, 2019 at 08:21:28AM -0700, Angus Ainslie (Purism) wrote:
> Fix a typo in the compatible string
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>

Applied, thanks.

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

* Re: [PATCH v2 1/3] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string
@ 2019-04-03 10:59 ` Shawn Guo
  0 siblings, 0 replies; 61+ messages in thread
From: Shawn Guo @ 2019-04-03 10:59 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: Mark Rutland, devicetree, Carlo Caione, Daniel Baluta,
	Sascha Hauer, linux-kernel, dmaengine, Vinod Koul, Rob Herring,
	NXP Linux Team, Pengutronix Kernel Team, angus.ainslie,
	Dan Williams, Fabio Estevam, Guido Günther,
	linux-arm-kernel, Lucas Stach

On Fri, Mar 29, 2019 at 08:21:28AM -0700, Angus Ainslie (Purism) wrote:
> Fix a typo in the compatible string
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>

Applied, thanks.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [v2,3/3] arm64: dts: imx8mq: Change ahb clock for imx8mq
  2019-03-29 15:21 ` Angus Ainslie (Purism)
  (?)
@ 2019-04-03 11:00 ` Shawn Guo
  -1 siblings, 0 replies; 61+ messages in thread
From: Shawn Guo @ 2019-04-03 11:00 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: angus.ainslie, Rob Herring, Mark Rutland, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

On Fri, Mar 29, 2019 at 08:21:30AM -0700, Angus Ainslie (Purism) wrote:
> Set ahb clock on sdma1 to get rid of "Timeout waiting for CH0"
> on the imx8mq.
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>

Applied, thanks.

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

* Re: [PATCH v2 3/3] arm64: dts: imx8mq: Change ahb clock for imx8mq
@ 2019-04-03 11:00 ` Shawn Guo
  0 siblings, 0 replies; 61+ messages in thread
From: Shawn Guo @ 2019-04-03 11:00 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: angus.ainslie, Rob Herring, Mark Rutland, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Dan Williams, Vinod Koul, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

On Fri, Mar 29, 2019 at 08:21:30AM -0700, Angus Ainslie (Purism) wrote:
> Set ahb clock on sdma1 to get rid of "Timeout waiting for CH0"
> on the imx8mq.
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>

Applied, thanks.

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

* Re: [PATCH v2 3/3] arm64: dts: imx8mq: Change ahb clock for imx8mq
@ 2019-04-03 11:00 ` Shawn Guo
  0 siblings, 0 replies; 61+ messages in thread
From: Shawn Guo @ 2019-04-03 11:00 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: Mark Rutland, devicetree, Carlo Caione, Daniel Baluta,
	Sascha Hauer, linux-kernel, dmaengine, Vinod Koul, Rob Herring,
	NXP Linux Team, Pengutronix Kernel Team, angus.ainslie,
	Dan Williams, Fabio Estevam, Guido Günther,
	linux-arm-kernel, Lucas Stach

On Fri, Mar 29, 2019 at 08:21:30AM -0700, Angus Ainslie (Purism) wrote:
> Set ahb clock on sdma1 to get rid of "Timeout waiting for CH0"
> on the imx8mq.
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>

Applied, thanks.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [v2,2/3] dmaengine: imx-sdma: Only check ratio on parts that support 1:1
@ 2019-04-18  8:54 ` Robin Gong
  0 siblings, 0 replies; 61+ messages in thread
From: Robin Gong @ 2019-04-18  8:54 UTC (permalink / raw)
  To: Angus Ainslie, angus
  Cc: dl-linux-imx, linux-kernel, robh+dt, ccaione, devicetree,
	festevam, agx, dan.j.williams, mark.rutland, dmaengine, shawnguo,
	linux-arm-kernel, vkoul, Daniel Baluta, l.stach, kernel, s.hauer

Acked-by: Robin Gong <yibin.gong@nxp.com>
On 2019-03-29 at 15:21 +0000, Angus Ainslie (Purism) wrote:
> On imx8mq B0 chip, AHB/SDMA clock ratio 2:1 can't be supported,
> since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach
> to 500Mhz, so use 1:1 instead.
> 
> To limit this change to the imx8mq for now this patch also adds an
> im8mq-sdma compatible string.
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> ---
>  drivers/dma/imx-sdma.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
> index 5f3c1378b90e..99d9f431ae2c 100644
> --- a/drivers/dma/imx-sdma.c
> +++ b/drivers/dma/imx-sdma.c
> @@ -419,6 +419,7 @@ struct sdma_driver_data {
>  	int chnenbl0;
>  	int num_events;
>  	struct sdma_script_start_addrs	*script_addrs;
> +	bool check_ratio;
>  };
>  
>  struct sdma_engine {
> @@ -557,6 +558,13 @@ static struct sdma_driver_data sdma_imx7d = {
>  	.script_addrs = &sdma_script_imx7d,
>  };
>  
> +static struct sdma_driver_data sdma_imx8mq = {
> +	.chnenbl0 = SDMA_CHNENBL0_IMX35,
> +	.num_events = 48,
> +	.script_addrs = &sdma_script_imx7d,
> +	.check_ratio = 1,
> +};
> +
>  static const struct platform_device_id sdma_devtypes[] = {
>  	{
>  		.name = "imx25-sdma",
> @@ -579,6 +587,9 @@ static const struct platform_device_id
> sdma_devtypes[] = {
>  	}, {
>  		.name = "imx7d-sdma",
>  		.driver_data = (unsigned long)&sdma_imx7d,
> +	}, {
> +		.name = "imx8mq-sdma",
> +		.driver_data = (unsigned long)&sdma_imx8mq,
>  	}, {
>  		/* sentinel */
>  	}
> @@ -593,6 +604,7 @@ static const struct of_device_id sdma_dt_ids[] =
> {
>  	{ .compatible = "fsl,imx31-sdma", .data = &sdma_imx31, },
>  	{ .compatible = "fsl,imx25-sdma", .data = &sdma_imx25, },
>  	{ .compatible = "fsl,imx7d-sdma", .data = &sdma_imx7d, },
> +	{ .compatible = "fsl,imx8mq-sdma", .data = &sdma_imx8mq, },
>  	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, sdma_dt_ids);
> @@ -1852,7 +1864,8 @@ static int sdma_init(struct sdma_engine *sdma)
>  	if (ret)
>  		goto disable_clk_ipg;
>  
> -	if (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma-
> >clk_ipg))
> +	if (sdma->drvdata->check_ratio &&
> +	    (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma-
> >clk_ipg)))
>  		sdma->clk_ratio = 1;
>  
>  	/* Be sure SDMA has not started yet */

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

* Re: [PATCH v2 2/3] dmaengine: imx-sdma: Only check ratio on parts that support 1:1
@ 2019-04-18  8:54 ` Robin Gong
  0 siblings, 0 replies; 61+ messages in thread
From: Robin Gong @ 2019-04-18  8:54 UTC (permalink / raw)
  To: Angus Ainslie, angus
  Cc: dl-linux-imx, linux-kernel, robh+dt, ccaione, devicetree,
	festevam, agx, dan.j.williams, mark.rutland, dmaengine, shawnguo,
	linux-arm-kernel, vkoul, Daniel Baluta, l.stach, kernel, s.hauer

Acked-by: Robin Gong <yibin.gong@nxp.com>
On 2019-03-29 at 15:21 +0000, Angus Ainslie (Purism) wrote:
> On imx8mq B0 chip, AHB/SDMA clock ratio 2:1 can't be supported,
> since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach
> to 500Mhz, so use 1:1 instead.
> 
> To limit this change to the imx8mq for now this patch also adds an
> im8mq-sdma compatible string.
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> ---
>  drivers/dma/imx-sdma.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
> index 5f3c1378b90e..99d9f431ae2c 100644
> --- a/drivers/dma/imx-sdma.c
> +++ b/drivers/dma/imx-sdma.c
> @@ -419,6 +419,7 @@ struct sdma_driver_data {
>  	int chnenbl0;
>  	int num_events;
>  	struct sdma_script_start_addrs	*script_addrs;
> +	bool check_ratio;
>  };
>  
>  struct sdma_engine {
> @@ -557,6 +558,13 @@ static struct sdma_driver_data sdma_imx7d = {
>  	.script_addrs = &sdma_script_imx7d,
>  };
>  
> +static struct sdma_driver_data sdma_imx8mq = {
> +	.chnenbl0 = SDMA_CHNENBL0_IMX35,
> +	.num_events = 48,
> +	.script_addrs = &sdma_script_imx7d,
> +	.check_ratio = 1,
> +};
> +
>  static const struct platform_device_id sdma_devtypes[] = {
>  	{
>  		.name = "imx25-sdma",
> @@ -579,6 +587,9 @@ static const struct platform_device_id
> sdma_devtypes[] = {
>  	}, {
>  		.name = "imx7d-sdma",
>  		.driver_data = (unsigned long)&sdma_imx7d,
> +	}, {
> +		.name = "imx8mq-sdma",
> +		.driver_data = (unsigned long)&sdma_imx8mq,
>  	}, {
>  		/* sentinel */
>  	}
> @@ -593,6 +604,7 @@ static const struct of_device_id sdma_dt_ids[] =
> {
>  	{ .compatible = "fsl,imx31-sdma", .data = &sdma_imx31, },
>  	{ .compatible = "fsl,imx25-sdma", .data = &sdma_imx25, },
>  	{ .compatible = "fsl,imx7d-sdma", .data = &sdma_imx7d, },
> +	{ .compatible = "fsl,imx8mq-sdma", .data = &sdma_imx8mq, },
>  	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, sdma_dt_ids);
> @@ -1852,7 +1864,8 @@ static int sdma_init(struct sdma_engine *sdma)
>  	if (ret)
>  		goto disable_clk_ipg;
>  
> -	if (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma-
> >clk_ipg))
> +	if (sdma->drvdata->check_ratio &&
> +	    (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma-
> >clk_ipg)))
>  		sdma->clk_ratio = 1;
>  
>  	/* Be sure SDMA has not started yet */

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

* Re: [PATCH v2 2/3] dmaengine: imx-sdma: Only check ratio on parts that support 1:1
@ 2019-04-18  8:54 ` Robin Gong
  0 siblings, 0 replies; 61+ messages in thread
From: Robin Gong @ 2019-04-18  8:54 UTC (permalink / raw)
  To: Angus Ainslie, angus
  Cc: dl-linux-imx, linux-kernel, robh+dt, ccaione, devicetree,
	festevam, agx, dan.j.williams, mark.rutland, dmaengine, shawnguo,
	linux-arm-kernel, vkoul, Daniel Baluta, l.stach

Acked-by: Robin Gong <yibin.gong@nxp.com>
On 2019-03-29 at 15:21 +0000, Angus Ainslie (Purism) wrote:
> On imx8mq B0 chip, AHB/SDMA clock ratio 2:1 can't be supported,
> since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach
> to 500Mhz, so use 1:1 instead.
> 
> To limit this change to the imx8mq for now this patch also adds an
> im8mq-sdma compatible string.
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> ---
>  drivers/dma/imx-sdma.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
> index 5f3c1378b90e..99d9f431ae2c 100644
> --- a/drivers/dma/imx-sdma.c
> +++ b/drivers/dma/imx-sdma.c
> @@ -419,6 +419,7 @@ struct sdma_driver_data {
>  	int chnenbl0;
>  	int num_events;
>  	struct sdma_script_start_addrs	*script_addrs;
> +	bool check_ratio;
>  };
>  
>  struct sdma_engine {
> @@ -557,6 +558,13 @@ static struct sdma_driver_data sdma_imx7d = {
>  	.script_addrs = &sdma_script_imx7d,
>  };
>  
> +static struct sdma_driver_data sdma_imx8mq = {
> +	.chnenbl0 = SDMA_CHNENBL0_IMX35,
> +	.num_events = 48,
> +	.script_addrs = &sdma_script_imx7d,
> +	.check_ratio = 1,
> +};
> +
>  static const struct platform_device_id sdma_devtypes[] = {
>  	{
>  		.name = "imx25-sdma",
> @@ -579,6 +587,9 @@ static const struct platform_device_id
> sdma_devtypes[] = {
>  	}, {
>  		.name = "imx7d-sdma",
>  		.driver_data = (unsigned long)&sdma_imx7d,
> +	}, {
> +		.name = "imx8mq-sdma",
> +		.driver_data = (unsigned long)&sdma_imx8mq,
>  	}, {
>  		/* sentinel */
>  	}
> @@ -593,6 +604,7 @@ static const struct of_device_id sdma_dt_ids[] =
> {
>  	{ .compatible = "fsl,imx31-sdma", .data = &sdma_imx31, },
>  	{ .compatible = "fsl,imx25-sdma", .data = &sdma_imx25, },
>  	{ .compatible = "fsl,imx7d-sdma", .data = &sdma_imx7d, },
> +	{ .compatible = "fsl,imx8mq-sdma", .data = &sdma_imx8mq, },
>  	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, sdma_dt_ids);
> @@ -1852,7 +1864,8 @@ static int sdma_init(struct sdma_engine *sdma)
>  	if (ret)
>  		goto disable_clk_ipg;
>  
> -	if (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma-
> >clk_ipg))
> +	if (sdma->drvdata->check_ratio &&
> +	    (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma-
> >clk_ipg)))
>  		sdma->clk_ratio = 1;
>  
>  	/* Be sure SDMA has not started yet */

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

* Re: [PATCH v2 2/3] dmaengine: imx-sdma: Only check ratio on parts that support 1:1
@ 2019-04-18  8:54 ` Robin Gong
  0 siblings, 0 replies; 61+ messages in thread
From: Robin Gong @ 2019-04-18  8:54 UTC (permalink / raw)
  To: Angus Ainslie, angus
  Cc: mark.rutland, devicetree, ccaione, shawnguo, agx, linux-kernel,
	Daniel Baluta, vkoul, robh+dt, dl-linux-imx, kernel, dmaengine,
	dan.j.williams, festevam, s.hauer, linux-arm-kernel, l.stach

Acked-by: Robin Gong <yibin.gong@nxp.com>
On 2019-03-29 at 15:21 +0000, Angus Ainslie (Purism) wrote:
> On imx8mq B0 chip, AHB/SDMA clock ratio 2:1 can't be supported,
> since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach
> to 500Mhz, so use 1:1 instead.
> 
> To limit this change to the imx8mq for now this patch also adds an
> im8mq-sdma compatible string.
> 
> Signed-off-by: Angus Ainslie (Purism) <angus@akkea.ca>
> ---
>  drivers/dma/imx-sdma.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
> index 5f3c1378b90e..99d9f431ae2c 100644
> --- a/drivers/dma/imx-sdma.c
> +++ b/drivers/dma/imx-sdma.c
> @@ -419,6 +419,7 @@ struct sdma_driver_data {
>  	int chnenbl0;
>  	int num_events;
>  	struct sdma_script_start_addrs	*script_addrs;
> +	bool check_ratio;
>  };
>  
>  struct sdma_engine {
> @@ -557,6 +558,13 @@ static struct sdma_driver_data sdma_imx7d = {
>  	.script_addrs = &sdma_script_imx7d,
>  };
>  
> +static struct sdma_driver_data sdma_imx8mq = {
> +	.chnenbl0 = SDMA_CHNENBL0_IMX35,
> +	.num_events = 48,
> +	.script_addrs = &sdma_script_imx7d,
> +	.check_ratio = 1,
> +};
> +
>  static const struct platform_device_id sdma_devtypes[] = {
>  	{
>  		.name = "imx25-sdma",
> @@ -579,6 +587,9 @@ static const struct platform_device_id
> sdma_devtypes[] = {
>  	}, {
>  		.name = "imx7d-sdma",
>  		.driver_data = (unsigned long)&sdma_imx7d,
> +	}, {
> +		.name = "imx8mq-sdma",
> +		.driver_data = (unsigned long)&sdma_imx8mq,
>  	}, {
>  		/* sentinel */
>  	}
> @@ -593,6 +604,7 @@ static const struct of_device_id sdma_dt_ids[] =
> {
>  	{ .compatible = "fsl,imx31-sdma", .data = &sdma_imx31, },
>  	{ .compatible = "fsl,imx25-sdma", .data = &sdma_imx25, },
>  	{ .compatible = "fsl,imx7d-sdma", .data = &sdma_imx7d, },
> +	{ .compatible = "fsl,imx8mq-sdma", .data = &sdma_imx8mq, },
>  	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, sdma_dt_ids);
> @@ -1852,7 +1864,8 @@ static int sdma_init(struct sdma_engine *sdma)
>  	if (ret)
>  		goto disable_clk_ipg;
>  
> -	if (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma-
> >clk_ipg))
> +	if (sdma->drvdata->check_ratio &&
> +	    (clk_get_rate(sdma->clk_ahb) == clk_get_rate(sdma-
> >clk_ipg)))
>  		sdma->clk_ratio = 1;
>  
>  	/* Be sure SDMA has not started yet */
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [v2,2/3] dmaengine: imx-sdma: Only check ratio on parts that support 1:1
@ 2019-04-26 11:48 ` Vinod Koul
  0 siblings, 0 replies; 61+ messages in thread
From: Vinod Koul @ 2019-04-26 11:48 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: angus.ainslie, Rob Herring, Mark Rutland, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Dan Williams, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

On 29-03-19, 08:21, Angus Ainslie (Purism) wrote:
> On imx8mq B0 chip, AHB/SDMA clock ratio 2:1 can't be supported,
> since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach
> to 500Mhz, so use 1:1 instead.
> 
> To limit this change to the imx8mq for now this patch also adds an
> im8mq-sdma compatible string.

Applied, thanks

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

* Re: [PATCH v2 2/3] dmaengine: imx-sdma: Only check ratio on parts that support 1:1
@ 2019-04-26 11:48 ` Vinod Koul
  0 siblings, 0 replies; 61+ messages in thread
From: Vinod Koul @ 2019-04-26 11:48 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: angus.ainslie, Rob Herring, Mark Rutland, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Dan Williams, Lucas Stach, Carlo Caione,
	Daniel Baluta, Guido Günther, devicetree, linux-arm-kernel,
	linux-kernel, dmaengine

On 29-03-19, 08:21, Angus Ainslie (Purism) wrote:
> On imx8mq B0 chip, AHB/SDMA clock ratio 2:1 can't be supported,
> since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach
> to 500Mhz, so use 1:1 instead.
> 
> To limit this change to the imx8mq for now this patch also adds an
> im8mq-sdma compatible string.

Applied, thanks

-- 
~Vinod

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

* Re: [PATCH v2 2/3] dmaengine: imx-sdma: Only check ratio on parts that support 1:1
@ 2019-04-26 11:48 ` Vinod Koul
  0 siblings, 0 replies; 61+ messages in thread
From: Vinod Koul @ 2019-04-26 11:48 UTC (permalink / raw)
  To: Angus Ainslie (Purism)
  Cc: Mark Rutland, devicetree, Carlo Caione, Fabio Estevam,
	Sascha Hauer, linux-kernel, Daniel Baluta, dmaengine,
	Rob Herring, NXP Linux Team, Pengutronix Kernel Team,
	angus.ainslie, Dan Williams, Shawn Guo, Guido Günther,
	linux-arm-kernel, Lucas Stach

On 29-03-19, 08:21, Angus Ainslie (Purism) wrote:
> On imx8mq B0 chip, AHB/SDMA clock ratio 2:1 can't be supported,
> since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach
> to 500Mhz, so use 1:1 instead.
> 
> To limit this change to the imx8mq for now this patch also adds an
> im8mq-sdma compatible string.

Applied, thanks

-- 
~Vinod

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-04-26 11:48 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-28 14:56 [1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string Daniel Baluta
2019-03-28 14:56 ` [PATCH 1/4] " Daniel Baluta
2019-03-28 14:56 ` Daniel Baluta
2019-03-28 14:56 ` Daniel Baluta
  -- strict thread matches above, loose matches on Subject: below --
2019-04-26 11:48 [v2,2/3] dmaengine: imx-sdma: Only check ratio on parts that support 1:1 Vinod Koul
2019-04-26 11:48 ` [PATCH v2 2/3] " Vinod Koul
2019-04-26 11:48 ` Vinod Koul
2019-04-18  8:54 [v2,2/3] " Robin Gong
2019-04-18  8:54 ` [PATCH v2 2/3] " Robin Gong
2019-04-18  8:54 ` Robin Gong
2019-04-18  8:54 ` Robin Gong
2019-04-03 11:00 [v2,3/3] arm64: dts: imx8mq: Change ahb clock for imx8mq Shawn Guo
2019-04-03 11:00 ` [PATCH v2 3/3] " Shawn Guo
2019-04-03 11:00 ` Shawn Guo
2019-04-03 10:59 [v2,1/3] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string Shawn Guo
2019-04-03 10:59 ` [PATCH v2 1/3] " Shawn Guo
2019-04-03 10:59 ` Shawn Guo
2019-03-30 16:55 [v2,1/3] " Daniel Baluta
2019-03-30 17:01 ` [PATCH v2 1/3] " Daniel Baluta
2019-03-30 16:55 ` Daniel Baluta
2019-03-29 15:21 [v2,3/3] arm64: dts: imx8mq: Change ahb clock for imx8mq Angus Ainslie
2019-03-29 15:21 ` [PATCH v2 3/3] " Angus Ainslie (Purism)
2019-03-29 15:21 ` Angus Ainslie (Purism)
2019-03-29 15:21 [v2,2/3] dmaengine: imx-sdma: Only check ratio on parts that support 1:1 Angus Ainslie
2019-03-29 15:21 ` [PATCH v2 2/3] " Angus Ainslie (Purism)
2019-03-29 15:21 ` Angus Ainslie (Purism)
2019-03-29 15:21 [v2,1/3] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string Angus Ainslie
2019-03-29 15:21 ` [PATCH v2 1/3] arm64: dts: imx8mq: Fix the fsl, imx8mq-sdma " Angus Ainslie (Purism)
2019-03-29 15:21 ` [PATCH v2 1/3] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma " Angus Ainslie (Purism)
2019-03-29 14:09 [1/4] " Angus Ainslie
2019-03-29 14:09 ` [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl, imx8mq-sdma " Angus Ainslie
2019-03-29 14:09 ` [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma " Angus Ainslie
2019-03-29 11:20 [1/4] " Daniel Baluta
2019-03-29 11:20 ` [PATCH 1/4] " Daniel Baluta
2019-03-29 11:20 ` Daniel Baluta
2019-03-29 11:20 ` Daniel Baluta
2019-03-29  9:10 [1/4] " Dong Aisheng
2019-03-29  9:10 ` [PATCH 1/4] " Aisheng Dong
2019-03-29  9:10 ` Aisheng Dong
2019-03-28 22:52 [2/4] dmaengine: imx-sdma: Add clock ratio 1:1 check Fabio Estevam
2019-03-28 22:52 ` [PATCH 2/4] " Fabio Estevam
2019-03-28 22:52 ` Fabio Estevam
2019-03-28 15:18 [3/4] dt-bindings: Document the new imx8mq-sdma compatible string Daniel Baluta
2019-03-28 15:18 ` [PATCH 3/4] " Daniel Baluta
2019-03-28 15:18 ` Daniel Baluta
2019-03-28 13:38 [4/4] arm64: dts: imx8mq: Change ahb clock for imx8mq Angus Ainslie
2019-03-28 13:38 ` [PATCH 4/4] " Angus Ainslie (Purism)
2019-03-28 13:38 ` Angus Ainslie (Purism)
2019-03-28 13:38 [3/4] dt-bindings: Document the new imx8mq-sdma compatible string Angus Ainslie
2019-03-28 13:38 ` [PATCH 3/4] " Angus Ainslie (Purism)
2019-03-28 13:38 ` Angus Ainslie (Purism)
2019-03-28 13:38 [2/4] dmaengine: imx-sdma: Add clock ratio 1:1 check Angus Ainslie
2019-03-28 13:38 ` [PATCH 2/4] " Angus Ainslie (Purism)
2019-03-28 13:38 ` Angus Ainslie (Purism)
2019-03-28 13:38 [1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma compatible string Angus Ainslie
2019-03-28 13:38 ` [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl, imx8mq-sdma " Angus Ainslie (Purism)
2019-03-28 13:38 ` [PATCH 1/4] arm64: dts: imx8mq: Fix the fsl,imx8mq-sdma " Angus Ainslie (Purism)
2019-03-28 13:38 [PATCH 0/4] Fix imx8mq ratio 1:1 check Angus Ainslie (Purism)
2019-03-28 13:38 ` Angus Ainslie (Purism)
2019-03-29 15:21 ` [PATCH v2 0/3] " Angus Ainslie (Purism)
2019-03-29 15:21   ` Angus Ainslie (Purism)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.