linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.14 058/252] spi: imx: fix ERR009165
       [not found] <20210909114106.141462-1-sashal@kernel.org>
@ 2021-09-09 11:37 ` Sasha Levin
  2021-09-09 16:42   ` Lucas Stach
  2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 059/252] spi: imx: remove ERR009165 workaround on i.mx6ul Sasha Levin
  2021-09-09 11:39 ` [PATCH AUTOSEL 5.14 133/252] spi: tegra20-slink: Improve runtime PM usage Sasha Levin
  2 siblings, 1 reply; 12+ messages in thread
From: Sasha Levin @ 2021-09-09 11:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Robin Gong, Lucas Stach, Mark Brown, Shawn Guo, Sasha Levin,
	linux-spi, linux-arm-kernel

From: Robin Gong <yibin.gong@nxp.com>

[ Upstream commit 980f884866eed4dda2a18de888c5a67dde67d640 ]

Change to XCH  mode even in dma mode, please refer to the below
errata:
https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/spi/spi-imx.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index fa68e9817929..d89b11205815 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -622,8 +622,8 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx,
 	ctrl |= mx51_ecspi_clkdiv(spi_imx, spi_imx->spi_bus_clk, &clk);
 	spi_imx->spi_bus_clk = clk;
 
-	if (spi_imx->usedma)
-		ctrl |= MX51_ECSPI_CTRL_SMC;
+	/* ERR009165: work in XHC mode as PIO */
+	ctrl &= ~MX51_ECSPI_CTRL_SMC;
 
 	writel(ctrl, spi_imx->base + MX51_ECSPI_CTRL);
 
@@ -637,7 +637,7 @@ static void mx51_setup_wml(struct spi_imx_data *spi_imx)
 	 * and enable DMA request.
 	 */
 	writel(MX51_ECSPI_DMA_RX_WML(spi_imx->wml - 1) |
-		MX51_ECSPI_DMA_TX_WML(spi_imx->wml) |
+		MX51_ECSPI_DMA_TX_WML(0) |
 		MX51_ECSPI_DMA_RXT_WML(spi_imx->wml) |
 		MX51_ECSPI_DMA_TEDEN | MX51_ECSPI_DMA_RXDEN |
 		MX51_ECSPI_DMA_RXTDEN, spi_imx->base + MX51_ECSPI_DMA);
@@ -1253,10 +1253,6 @@ static int spi_imx_sdma_init(struct device *dev, struct spi_imx_data *spi_imx,
 {
 	int ret;
 
-	/* use pio mode for i.mx6dl chip TKT238285 */
-	if (of_machine_is_compatible("fsl,imx6dl"))
-		return 0;
-
 	spi_imx->wml = spi_imx->devtype_data->fifo_size / 2;
 
 	/* Prepare for TX DMA: */
-- 
2.30.2


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

* [PATCH AUTOSEL 5.14 059/252] spi: imx: remove ERR009165 workaround on i.mx6ul
       [not found] <20210909114106.141462-1-sashal@kernel.org>
  2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 058/252] spi: imx: fix ERR009165 Sasha Levin
@ 2021-09-09 11:37 ` Sasha Levin
  2021-09-09 11:39 ` [PATCH AUTOSEL 5.14 133/252] spi: tegra20-slink: Improve runtime PM usage Sasha Levin
  2 siblings, 0 replies; 12+ messages in thread
From: Sasha Levin @ 2021-09-09 11:37 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Robin Gong, Lucas Stach, Mark Brown, Shawn Guo, Sasha Levin,
	linux-spi, linux-arm-kernel

From: Robin Gong <yibin.gong@nxp.com>

[ Upstream commit 8eb1252bbedfb0e800bbbd3e9055a7db0ae2cac9 ]

ERR009165 fixed on i.mx6ul/6ull/6sll. All other i.mx6/7 and
i.mx8m/8mm still need this errata. Please refer to nxp official
errata document from https://www.nxp.com/ .

For removing workaround on those chips. Add new i.mx6ul type.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/spi/spi-imx.c | 39 ++++++++++++++++++++++++++++++++++++---
 1 file changed, 36 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index d89b11205815..289ed3d4eda2 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -77,6 +77,11 @@ struct spi_imx_devtype_data {
 	bool has_slavemode;
 	unsigned int fifo_size;
 	bool dynamic_burst;
+	/*
+	 * ERR009165 fixed or not:
+	 * https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf
+	 */
+	bool tx_glitch_fixed;
 	enum spi_imx_devtype devtype;
 };
 
@@ -622,8 +627,14 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx,
 	ctrl |= mx51_ecspi_clkdiv(spi_imx, spi_imx->spi_bus_clk, &clk);
 	spi_imx->spi_bus_clk = clk;
 
-	/* ERR009165: work in XHC mode as PIO */
-	ctrl &= ~MX51_ECSPI_CTRL_SMC;
+	/*
+	 * ERR009165: work in XHC mode instead of SMC as PIO on the chips
+	 * before i.mx6ul.
+	 */
+	if (spi_imx->usedma && spi_imx->devtype_data->tx_glitch_fixed)
+		ctrl |= MX51_ECSPI_CTRL_SMC;
+	else
+		ctrl &= ~MX51_ECSPI_CTRL_SMC;
 
 	writel(ctrl, spi_imx->base + MX51_ECSPI_CTRL);
 
@@ -632,12 +643,16 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx,
 
 static void mx51_setup_wml(struct spi_imx_data *spi_imx)
 {
+	u32 tx_wml = 0;
+
+	if (spi_imx->devtype_data->tx_glitch_fixed)
+		tx_wml = spi_imx->wml;
 	/*
 	 * Configure the DMA register: setup the watermark
 	 * and enable DMA request.
 	 */
 	writel(MX51_ECSPI_DMA_RX_WML(spi_imx->wml - 1) |
-		MX51_ECSPI_DMA_TX_WML(0) |
+		MX51_ECSPI_DMA_TX_WML(tx_wml) |
 		MX51_ECSPI_DMA_RXT_WML(spi_imx->wml) |
 		MX51_ECSPI_DMA_TEDEN | MX51_ECSPI_DMA_RXDEN |
 		MX51_ECSPI_DMA_RXTDEN, spi_imx->base + MX51_ECSPI_DMA);
@@ -1028,6 +1043,23 @@ static struct spi_imx_devtype_data imx53_ecspi_devtype_data = {
 	.devtype = IMX53_ECSPI,
 };
 
+static struct spi_imx_devtype_data imx6ul_ecspi_devtype_data = {
+	.intctrl = mx51_ecspi_intctrl,
+	.prepare_message = mx51_ecspi_prepare_message,
+	.prepare_transfer = mx51_ecspi_prepare_transfer,
+	.trigger = mx51_ecspi_trigger,
+	.rx_available = mx51_ecspi_rx_available,
+	.reset = mx51_ecspi_reset,
+	.setup_wml = mx51_setup_wml,
+	.fifo_size = 64,
+	.has_dmamode = true,
+	.dynamic_burst = true,
+	.has_slavemode = true,
+	.tx_glitch_fixed = true,
+	.disable = mx51_ecspi_disable,
+	.devtype = IMX51_ECSPI,
+};
+
 static const struct of_device_id spi_imx_dt_ids[] = {
 	{ .compatible = "fsl,imx1-cspi", .data = &imx1_cspi_devtype_data, },
 	{ .compatible = "fsl,imx21-cspi", .data = &imx21_cspi_devtype_data, },
@@ -1036,6 +1068,7 @@ static const struct of_device_id spi_imx_dt_ids[] = {
 	{ .compatible = "fsl,imx35-cspi", .data = &imx35_cspi_devtype_data, },
 	{ .compatible = "fsl,imx51-ecspi", .data = &imx51_ecspi_devtype_data, },
 	{ .compatible = "fsl,imx53-ecspi", .data = &imx53_ecspi_devtype_data, },
+	{ .compatible = "fsl,imx6ul-ecspi", .data = &imx6ul_ecspi_devtype_data, },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, spi_imx_dt_ids);
-- 
2.30.2


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

* [PATCH AUTOSEL 5.14 133/252] spi: tegra20-slink: Improve runtime PM usage
       [not found] <20210909114106.141462-1-sashal@kernel.org>
  2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 058/252] spi: imx: fix ERR009165 Sasha Levin
  2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 059/252] spi: imx: remove ERR009165 workaround on i.mx6ul Sasha Levin
@ 2021-09-09 11:39 ` Sasha Levin
  2021-09-09 12:37   ` Mark Brown
  2 siblings, 1 reply; 12+ messages in thread
From: Sasha Levin @ 2021-09-09 11:39 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Dmitry Osipenko, Mark Brown, Sasha Levin, linux-spi, linux-tegra

From: Dmitry Osipenko <digetx@gmail.com>

[ Upstream commit e4bb903fda0e9bbafa1338dcd2ee5e4d3ccc50da ]

The Tegra SPI driver supports runtime PM, which controls the clock
enable state, but the clk is also enabled separately from the RPM
at the driver probe time, and thus, stays always on. Fix it.

Runtime PM now is always available on Tegra, hence there is no need to
check the RPM presence in the driver anymore. Remove these checks.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210731192731.5869-1-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/spi/spi-tegra20-slink.c | 73 +++++++++++----------------------
 1 file changed, 25 insertions(+), 48 deletions(-)

diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
index 6a726c95ac7a..501eca1d0f89 100644
--- a/drivers/spi/spi-tegra20-slink.c
+++ b/drivers/spi/spi-tegra20-slink.c
@@ -1061,33 +1061,12 @@ static int tegra_slink_probe(struct platform_device *pdev)
 		dev_err(&pdev->dev, "Can not get clock %d\n", ret);
 		goto exit_free_master;
 	}
-	ret = clk_prepare(tspi->clk);
-	if (ret < 0) {
-		dev_err(&pdev->dev, "Clock prepare failed %d\n", ret);
-		goto exit_free_master;
-	}
-	ret = clk_enable(tspi->clk);
-	if (ret < 0) {
-		dev_err(&pdev->dev, "Clock enable failed %d\n", ret);
-		goto exit_clk_unprepare;
-	}
-
-	spi_irq = platform_get_irq(pdev, 0);
-	tspi->irq = spi_irq;
-	ret = request_threaded_irq(tspi->irq, tegra_slink_isr,
-			tegra_slink_isr_thread, IRQF_ONESHOT,
-			dev_name(&pdev->dev), tspi);
-	if (ret < 0) {
-		dev_err(&pdev->dev, "Failed to register ISR for IRQ %d\n",
-					tspi->irq);
-		goto exit_clk_disable;
-	}
 
 	tspi->rst = devm_reset_control_get_exclusive(&pdev->dev, "spi");
 	if (IS_ERR(tspi->rst)) {
 		dev_err(&pdev->dev, "can not get reset\n");
 		ret = PTR_ERR(tspi->rst);
-		goto exit_free_irq;
+		goto exit_free_master;
 	}
 
 	tspi->max_buf_size = SLINK_FIFO_DEPTH << 2;
@@ -1095,7 +1074,7 @@ static int tegra_slink_probe(struct platform_device *pdev)
 
 	ret = tegra_slink_init_dma_param(tspi, true);
 	if (ret < 0)
-		goto exit_free_irq;
+		goto exit_free_master;
 	ret = tegra_slink_init_dma_param(tspi, false);
 	if (ret < 0)
 		goto exit_rx_dma_free;
@@ -1106,16 +1085,9 @@ static int tegra_slink_probe(struct platform_device *pdev)
 	init_completion(&tspi->xfer_completion);
 
 	pm_runtime_enable(&pdev->dev);
-	if (!pm_runtime_enabled(&pdev->dev)) {
-		ret = tegra_slink_runtime_resume(&pdev->dev);
-		if (ret)
-			goto exit_pm_disable;
-	}
-
-	ret = pm_runtime_get_sync(&pdev->dev);
-	if (ret < 0) {
+	ret = pm_runtime_resume_and_get(&pdev->dev);
+	if (ret) {
 		dev_err(&pdev->dev, "pm runtime get failed, e = %d\n", ret);
-		pm_runtime_put_noidle(&pdev->dev);
 		goto exit_pm_disable;
 	}
 
@@ -1123,33 +1095,43 @@ static int tegra_slink_probe(struct platform_device *pdev)
 	udelay(2);
 	reset_control_deassert(tspi->rst);
 
+	spi_irq = platform_get_irq(pdev, 0);
+	tspi->irq = spi_irq;
+	ret = request_threaded_irq(tspi->irq, tegra_slink_isr,
+				   tegra_slink_isr_thread, IRQF_ONESHOT,
+				   dev_name(&pdev->dev), tspi);
+	if (ret < 0) {
+		dev_err(&pdev->dev, "Failed to register ISR for IRQ %d\n",
+			tspi->irq);
+		goto exit_pm_put;
+	}
+
 	tspi->def_command_reg  = SLINK_M_S;
 	tspi->def_command2_reg = SLINK_CS_ACTIVE_BETWEEN;
 	tegra_slink_writel(tspi, tspi->def_command_reg, SLINK_COMMAND);
 	tegra_slink_writel(tspi, tspi->def_command2_reg, SLINK_COMMAND2);
-	pm_runtime_put(&pdev->dev);
 
 	master->dev.of_node = pdev->dev.of_node;
 	ret = devm_spi_register_master(&pdev->dev, master);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "can not register to master err %d\n", ret);
-		goto exit_pm_disable;
+		goto exit_free_irq;
 	}
+
+	pm_runtime_put(&pdev->dev);
+
 	return ret;
 
+exit_free_irq:
+	free_irq(spi_irq, tspi);
+exit_pm_put:
+	pm_runtime_put(&pdev->dev);
 exit_pm_disable:
 	pm_runtime_disable(&pdev->dev);
-	if (!pm_runtime_status_suspended(&pdev->dev))
-		tegra_slink_runtime_suspend(&pdev->dev);
+
 	tegra_slink_deinit_dma_param(tspi, false);
 exit_rx_dma_free:
 	tegra_slink_deinit_dma_param(tspi, true);
-exit_free_irq:
-	free_irq(spi_irq, tspi);
-exit_clk_disable:
-	clk_disable(tspi->clk);
-exit_clk_unprepare:
-	clk_unprepare(tspi->clk);
 exit_free_master:
 	spi_master_put(master);
 	return ret;
@@ -1162,8 +1144,7 @@ static int tegra_slink_remove(struct platform_device *pdev)
 
 	free_irq(tspi->irq, tspi);
 
-	clk_disable(tspi->clk);
-	clk_unprepare(tspi->clk);
+	pm_runtime_disable(&pdev->dev);
 
 	if (tspi->tx_dma_chan)
 		tegra_slink_deinit_dma_param(tspi, false);
@@ -1171,10 +1152,6 @@ static int tegra_slink_remove(struct platform_device *pdev)
 	if (tspi->rx_dma_chan)
 		tegra_slink_deinit_dma_param(tspi, true);
 
-	pm_runtime_disable(&pdev->dev);
-	if (!pm_runtime_status_suspended(&pdev->dev))
-		tegra_slink_runtime_suspend(&pdev->dev);
-
 	return 0;
 }
 
-- 
2.30.2


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

* Re: [PATCH AUTOSEL 5.14 133/252] spi: tegra20-slink: Improve runtime PM usage
  2021-09-09 11:39 ` [PATCH AUTOSEL 5.14 133/252] spi: tegra20-slink: Improve runtime PM usage Sasha Levin
@ 2021-09-09 12:37   ` Mark Brown
  2021-09-09 12:45     ` Dmitry Osipenko
  0 siblings, 1 reply; 12+ messages in thread
From: Mark Brown @ 2021-09-09 12:37 UTC (permalink / raw)
  To: Sasha Levin; +Cc: linux-kernel, stable, Dmitry Osipenko, linux-spi, linux-tegra

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

On Thu, Sep 09, 2021 at 07:39:07AM -0400, Sasha Levin wrote:
> From: Dmitry Osipenko <digetx@gmail.com>
> 
> [ Upstream commit e4bb903fda0e9bbafa1338dcd2ee5e4d3ccc50da ]
> 
> The Tegra SPI driver supports runtime PM, which controls the clock
> enable state, but the clk is also enabled separately from the RPM
> at the driver probe time, and thus, stays always on. Fix it.
> 
> Runtime PM now is always available on Tegra, hence there is no need to
> check the RPM presence in the driver anymore. Remove these checks.

This feels new featureish to me - it'll give you runtime PM where
previously there was none.

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

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

* Re: [PATCH AUTOSEL 5.14 133/252] spi: tegra20-slink: Improve runtime PM usage
  2021-09-09 12:37   ` Mark Brown
@ 2021-09-09 12:45     ` Dmitry Osipenko
  2021-09-09 13:04       ` Mark Brown
  0 siblings, 1 reply; 12+ messages in thread
From: Dmitry Osipenko @ 2021-09-09 12:45 UTC (permalink / raw)
  To: Mark Brown, Sasha Levin; +Cc: linux-kernel, stable, linux-spi, linux-tegra

09.09.2021 15:37, Mark Brown пишет:
> On Thu, Sep 09, 2021 at 07:39:07AM -0400, Sasha Levin wrote:
>> From: Dmitry Osipenko <digetx@gmail.com>
>>
>> [ Upstream commit e4bb903fda0e9bbafa1338dcd2ee5e4d3ccc50da ]
>>
>> The Tegra SPI driver supports runtime PM, which controls the clock
>> enable state, but the clk is also enabled separately from the RPM
>> at the driver probe time, and thus, stays always on. Fix it.
>>
>> Runtime PM now is always available on Tegra, hence there is no need to
>> check the RPM presence in the driver anymore. Remove these checks.
> 
> This feels new featureish to me - it'll give you runtime PM where
> previously there was none.
> 

Apparently all patches which have a word 'fix' in commit message are
auto-selected. I agree that it's better not to port this patch.

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

* Re: [PATCH AUTOSEL 5.14 133/252] spi: tegra20-slink: Improve runtime PM usage
  2021-09-09 12:45     ` Dmitry Osipenko
@ 2021-09-09 13:04       ` Mark Brown
  2021-09-13 17:14         ` Sasha Levin
  0 siblings, 1 reply; 12+ messages in thread
From: Mark Brown @ 2021-09-09 13:04 UTC (permalink / raw)
  To: Dmitry Osipenko; +Cc: Sasha Levin, linux-kernel, stable, linux-spi, linux-tegra

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

On Thu, Sep 09, 2021 at 03:45:45PM +0300, Dmitry Osipenko wrote:
> 09.09.2021 15:37, Mark Brown пишет:

> > This feels new featureish to me - it'll give you runtime PM where
> > previously there was none.

> Apparently all patches which have a word 'fix' in commit message are
> auto-selected. I agree that it's better not to port this patch.

Yeah, it's a fairly common source of false positives :/

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

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

* Re: [PATCH AUTOSEL 5.14 058/252] spi: imx: fix ERR009165
  2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 058/252] spi: imx: fix ERR009165 Sasha Levin
@ 2021-09-09 16:42   ` Lucas Stach
  2021-09-09 16:48     ` Fabio Estevam
  0 siblings, 1 reply; 12+ messages in thread
From: Lucas Stach @ 2021-09-09 16:42 UTC (permalink / raw)
  To: Sasha Levin, linux-kernel, stable
  Cc: Robin Gong, Mark Brown, Shawn Guo, linux-spi, linux-arm-kernel

Hi Sasha,

Am Donnerstag, dem 09.09.2021 um 07:37 -0400 schrieb Sasha Levin:
> From: Robin Gong <yibin.gong@nxp.com>
> 
> [ Upstream commit 980f884866eed4dda2a18de888c5a67dde67d640 ]
> 
> Change to XCH  mode even in dma mode, please refer to the below
> errata:
> https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf
> 

This patch is part of a quite extensive series touching multiple
drivers and devicetree descriptions and will do more harm than good if
backported without the rest of the series. The options here are:
a) backport the entire series (this will most likely not match the
stable criteria)
b) drop the patch from the stable queue

Regards,
Lucas

> Signed-off-by: Robin Gong <yibin.gong@nxp.com>
> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
> Acked-by: Mark Brown <broonie@kernel.org>
> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
>  drivers/spi/spi-imx.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
> index fa68e9817929..d89b11205815 100644
> --- a/drivers/spi/spi-imx.c
> +++ b/drivers/spi/spi-imx.c
> @@ -622,8 +622,8 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx,
>  	ctrl |= mx51_ecspi_clkdiv(spi_imx, spi_imx->spi_bus_clk, &clk);
>  	spi_imx->spi_bus_clk = clk;
>  
> -	if (spi_imx->usedma)
> -		ctrl |= MX51_ECSPI_CTRL_SMC;
> +	/* ERR009165: work in XHC mode as PIO */
> +	ctrl &= ~MX51_ECSPI_CTRL_SMC;
>  
>  	writel(ctrl, spi_imx->base + MX51_ECSPI_CTRL);
>  
> @@ -637,7 +637,7 @@ static void mx51_setup_wml(struct spi_imx_data *spi_imx)
>  	 * and enable DMA request.
>  	 */
>  	writel(MX51_ECSPI_DMA_RX_WML(spi_imx->wml - 1) |
> -		MX51_ECSPI_DMA_TX_WML(spi_imx->wml) |
> +		MX51_ECSPI_DMA_TX_WML(0) |
>  		MX51_ECSPI_DMA_RXT_WML(spi_imx->wml) |
>  		MX51_ECSPI_DMA_TEDEN | MX51_ECSPI_DMA_RXDEN |
>  		MX51_ECSPI_DMA_RXTDEN, spi_imx->base + MX51_ECSPI_DMA);
> @@ -1253,10 +1253,6 @@ static int spi_imx_sdma_init(struct device *dev, struct spi_imx_data *spi_imx,
>  {
>  	int ret;
>  
> -	/* use pio mode for i.mx6dl chip TKT238285 */
> -	if (of_machine_is_compatible("fsl,imx6dl"))
> -		return 0;
> -
>  	spi_imx->wml = spi_imx->devtype_data->fifo_size / 2;
>  
>  	/* Prepare for TX DMA: */



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

* Re: [PATCH AUTOSEL 5.14 058/252] spi: imx: fix ERR009165
  2021-09-09 16:42   ` Lucas Stach
@ 2021-09-09 16:48     ` Fabio Estevam
  2021-09-10  3:30       ` Robin Gong
  0 siblings, 1 reply; 12+ messages in thread
From: Fabio Estevam @ 2021-09-09 16:48 UTC (permalink / raw)
  To: Lucas Stach
  Cc: Sasha Levin, linux-kernel, stable, Robin Gong, Mark Brown,
	Shawn Guo, linux-spi,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

Hi Lucas,

On Thu, Sep 9, 2021 at 1:43 PM Lucas Stach <l.stach@pengutronix.de> wrote:
>
> Hi Sasha,
>
> Am Donnerstag, dem 09.09.2021 um 07:37 -0400 schrieb Sasha Levin:
> > From: Robin Gong <yibin.gong@nxp.com>
> >
> > [ Upstream commit 980f884866eed4dda2a18de888c5a67dde67d640 ]
> >
> > Change to XCH  mode even in dma mode, please refer to the below
> > errata:
> > https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf
> >
>
> This patch is part of a quite extensive series touching multiple
> drivers and devicetree descriptions and will do more harm than good if
> backported without the rest of the series. The options here are:
> a) backport the entire series (this will most likely not match the
> stable criteria)
> b) drop the patch from the stable queue

Yes, I agree. I prefer going with option b).

Thanks

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

* RE: [PATCH AUTOSEL 5.14 058/252] spi: imx: fix ERR009165
  2021-09-09 16:48     ` Fabio Estevam
@ 2021-09-10  3:30       ` Robin Gong
  2021-09-13 16:47         ` Sasha Levin
  0 siblings, 1 reply; 12+ messages in thread
From: Robin Gong @ 2021-09-10  3:30 UTC (permalink / raw)
  To: Fabio Estevam, Lucas Stach
  Cc: Sasha Levin, linux-kernel, stable, Mark Brown, Shawn Guo,
	linux-spi,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

> Hi Lucas,
> 
> On Thu, Sep 9, 2021 at 1:43 PM Lucas Stach <l.stach@pengutronix.de> wrote:
> >
> > Hi Sasha,
> >
> > Am Donnerstag, dem 09.09.2021 um 07:37 -0400 schrieb Sasha Levin:
> > > From: Robin Gong <yibin.gong@nxp.com>
> > >
> > > [ Upstream commit 980f884866eed4dda2a18de888c5a67dde67d640 ]
> > >
> > > Change to XCH  mode even in dma mode, please refer to the below
> > > errata:
> > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
> > >
> w.nxp.com%2Fdocs%2Fen%2Ferrata%2FIMX6DQCE.pdf&amp;data=04%7C01
> %7Cyib
> > >
> in.gong%40nxp.com%7C39f3117d59434df46fc108d973b1bb3e%7C686ea1d3
> bc2b4
> > >
> c6fa92cd99c5c301635%7C0%7C1%7C637668029454898655%7CUnknown%7
> CTWFpbGZ
> > >
> sb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn
> 0
> > > %3D%7C1000&amp;sdata=NxCByvu4qCGniWnXccSxLNy9ilvQhFpid7O9Ag
> 1HloI%3D&
> > > amp;reserved=0
> > >
> >
> > This patch is part of a quite extensive series touching multiple
> > drivers and devicetree descriptions and will do more harm than good if
> > backported without the rest of the series. The options here are:
> > a) backport the entire series (this will most likely not match the
> > stable criteria)
> > b) drop the patch from the stable queue
> 
> Yes, I agree. I prefer going with option b).
Agree, vote for option b.


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

* Re: [PATCH AUTOSEL 5.14 058/252] spi: imx: fix ERR009165
  2021-09-10  3:30       ` Robin Gong
@ 2021-09-13 16:47         ` Sasha Levin
  0 siblings, 0 replies; 12+ messages in thread
From: Sasha Levin @ 2021-09-13 16:47 UTC (permalink / raw)
  To: Robin Gong
  Cc: Fabio Estevam, Lucas Stach, linux-kernel, stable, Mark Brown,
	Shawn Guo, linux-spi,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Fri, Sep 10, 2021 at 03:30:27AM +0000, Robin Gong wrote:
>> Hi Lucas,
>>
>> On Thu, Sep 9, 2021 at 1:43 PM Lucas Stach <l.stach@pengutronix.de> wrote:
>> >
>> > Hi Sasha,
>> >
>> > Am Donnerstag, dem 09.09.2021 um 07:37 -0400 schrieb Sasha Levin:
>> > > From: Robin Gong <yibin.gong@nxp.com>
>> > >
>> > > [ Upstream commit 980f884866eed4dda2a18de888c5a67dde67d640 ]
>> > >
>> > > Change to XCH  mode even in dma mode, please refer to the below
>> > > errata:
>> > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
>> > >
>> w.nxp.com%2Fdocs%2Fen%2Ferrata%2FIMX6DQCE.pdf&amp;data=04%7C01
>> %7Cyib
>> > >
>> in.gong%40nxp.com%7C39f3117d59434df46fc108d973b1bb3e%7C686ea1d3
>> bc2b4
>> > >
>> c6fa92cd99c5c301635%7C0%7C1%7C637668029454898655%7CUnknown%7
>> CTWFpbGZ
>> > >
>> sb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn
>> 0
>> > > %3D%7C1000&amp;sdata=NxCByvu4qCGniWnXccSxLNy9ilvQhFpid7O9Ag
>> 1HloI%3D&
>> > > amp;reserved=0
>> > >
>> >
>> > This patch is part of a quite extensive series touching multiple
>> > drivers and devicetree descriptions and will do more harm than good if
>> > backported without the rest of the series. The options here are:
>> > a) backport the entire series (this will most likely not match the
>> > stable criteria)
>> > b) drop the patch from the stable queue
>>
>> Yes, I agree. I prefer going with option b).
>Agree, vote for option b.

It's gone, thanks!

-- 
Thanks,
Sasha

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

* Re: [PATCH AUTOSEL 5.14 133/252] spi: tegra20-slink: Improve runtime PM usage
  2021-09-09 13:04       ` Mark Brown
@ 2021-09-13 17:14         ` Sasha Levin
  2021-09-14 13:44           ` Dmitry Osipenko
  0 siblings, 1 reply; 12+ messages in thread
From: Sasha Levin @ 2021-09-13 17:14 UTC (permalink / raw)
  To: Mark Brown; +Cc: Dmitry Osipenko, linux-kernel, stable, linux-spi, linux-tegra

On Thu, Sep 09, 2021 at 02:04:50PM +0100, Mark Brown wrote:
>On Thu, Sep 09, 2021 at 03:45:45PM +0300, Dmitry Osipenko wrote:
>> 09.09.2021 15:37, Mark Brown пишет:
>
>> > This feels new featureish to me - it'll give you runtime PM where
>> > previously there was none.
>
>> Apparently all patches which have a word 'fix' in commit message are
>> auto-selected. I agree that it's better not to port this patch.
>
>Yeah, it's a fairly common source of false positives :/

And some of that falls on me: if it's obvious that the "fix" isn't a
real fix, I won't take it. In cases like this it's not clear to me
whether it's purely a better behaviour, or whether the devices staying
on/off/etc causes an actual problem.

-- 
Thanks,
Sasha

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

* Re: [PATCH AUTOSEL 5.14 133/252] spi: tegra20-slink: Improve runtime PM usage
  2021-09-13 17:14         ` Sasha Levin
@ 2021-09-14 13:44           ` Dmitry Osipenko
  0 siblings, 0 replies; 12+ messages in thread
From: Dmitry Osipenko @ 2021-09-14 13:44 UTC (permalink / raw)
  To: Sasha Levin, Mark Brown; +Cc: linux-kernel, stable, linux-spi, linux-tegra

13.09.2021 20:14, Sasha Levin пишет:
> On Thu, Sep 09, 2021 at 02:04:50PM +0100, Mark Brown wrote:
>> On Thu, Sep 09, 2021 at 03:45:45PM +0300, Dmitry Osipenko wrote:
>>> 09.09.2021 15:37, Mark Brown пишет:
>>
>>> > This feels new featureish to me - it'll give you runtime PM where
>>> > previously there was none.
>>
>>> Apparently all patches which have a word 'fix' in commit message are
>>> auto-selected. I agree that it's better not to port this patch.
>>
>> Yeah, it's a fairly common source of false positives :/
> 
> And some of that falls on me: if it's obvious that the "fix" isn't a
> real fix, I won't take it. In cases like this it's not clear to me
> whether it's purely a better behaviour, or whether the devices staying
> on/off/etc causes an actual problem.
> 

You made the right choice. It's indeed not obvious from commit message
what is achieved with this change. This patch shouldn't have any visible
effect on older kernels which don't support power management in a case
of Tegra SoCs. It will have effect using the upcoming kernels, once the
full set of in-progress power management patches will be merged.

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

end of thread, other threads:[~2021-09-14 13:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210909114106.141462-1-sashal@kernel.org>
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 058/252] spi: imx: fix ERR009165 Sasha Levin
2021-09-09 16:42   ` Lucas Stach
2021-09-09 16:48     ` Fabio Estevam
2021-09-10  3:30       ` Robin Gong
2021-09-13 16:47         ` Sasha Levin
2021-09-09 11:37 ` [PATCH AUTOSEL 5.14 059/252] spi: imx: remove ERR009165 workaround on i.mx6ul Sasha Levin
2021-09-09 11:39 ` [PATCH AUTOSEL 5.14 133/252] spi: tegra20-slink: Improve runtime PM usage Sasha Levin
2021-09-09 12:37   ` Mark Brown
2021-09-09 12:45     ` Dmitry Osipenko
2021-09-09 13:04       ` Mark Brown
2021-09-13 17:14         ` Sasha Levin
2021-09-14 13:44           ` Dmitry Osipenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).