diff mbox

dma: imx-sdma: Add support for version 3 firmware

Message ID 1426087858-21984-1-git-send-email-festevam@gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

Fabio Estevam March 11, 2015, 3:30 p.m. UTC
From: Fabio Estevam <fabio.estevam@freescale.com>

Currently when version 3.1 of the mx6q SDMA firmware is used we get:

[    0.392169] imx-sdma 20ec000.sdma: unknown firmware version                  
[    0.399281] imx-sdma 20ec000.sdma: initialized  

Add support for it.

Based on a patch from Shengjiu Wang from the internal FSL kernel. 

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/dma/imx-sdma.c                     | 4 ++++
 include/linux/platform_data/dma-imx-sdma.h | 3 +++
 2 files changed, 7 insertions(+)

Comments

Vinod Koul March 18, 2015, 8:24 a.m. UTC | #1
On Wed, Mar 11, 2015 at 12:30:58PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Currently when version 3.1 of the mx6q SDMA firmware is used we get:
> 
> [    0.392169] imx-sdma 20ec000.sdma: unknown firmware version                  
> [    0.399281] imx-sdma 20ec000.sdma: initialized  
> 
> Add support for it.
> 
> Based on a patch from Shengjiu Wang from the internal FSL kernel. 

Applied, thanks

Pls ensure you use the right subsystem name in your patches
diff mbox

Patch

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 18c0a13..eb10109 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1256,6 +1256,7 @@  static void sdma_issue_pending(struct dma_chan *chan)
 
 #define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1	34
 #define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V2	38
+#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V3	41
 
 static void sdma_add_scripts(struct sdma_engine *sdma,
 		const struct sdma_script_start_addrs *addr)
@@ -1302,6 +1303,9 @@  static void sdma_load_firmware(const struct firmware *fw, void *context)
 	case 2:
 		sdma->script_number = SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V2;
 		break;
+	case 3:
+		sdma->script_number = SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V3;
+		break;
 	default:
 		dev_err(sdma->dev, "unknown firmware version\n");
 		goto err_firmware;
diff --git a/include/linux/platform_data/dma-imx-sdma.h b/include/linux/platform_data/dma-imx-sdma.h
index eabac4e..2d08816 100644
--- a/include/linux/platform_data/dma-imx-sdma.h
+++ b/include/linux/platform_data/dma-imx-sdma.h
@@ -48,6 +48,9 @@  struct sdma_script_start_addrs {
 	s32 ssish_2_mcu_addr;
 	s32 hdmi_dma_addr;
 	/* End of v2 array */
+	s32 zcanfd_2_mcu_addr;
+	s32 zqspi_2_mcu_addr;
+	/* End of v3 array */
 };
 
 /**