Skip to content

Commit d850b5b

Browse files
Robin Gongvinodkoul
authored andcommitted
dmaengine: imx-sdma: Add i2c dma support
New sdma script (sdma-6q: v3.6, sdma-7d: v4.6) support i2c at imx8mp and imx6ull. So add I2C dma support. Signed-off-by: Robin Gong <[email protected]> Acked-by: Clark Wang <[email protected]> Reviewed-by: Joy Zou <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Signed-off-by: Frank Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 1cb49f3 commit d850b5b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

drivers/dma/imx-sdma.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ struct sdma_script_start_addrs {
251251
s32 sai_2_mcu_addr;
252252
s32 uart_2_mcu_rom_addr;
253253
s32 uartsh_2_mcu_rom_addr;
254+
s32 i2c_2_mcu_addr;
255+
s32 mcu_2_i2c_addr;
254256
/* End of v3 array */
255257
union { s32 v3_end; s32 mcu_2_zqspi_addr; };
256258
/* End of v4 array */
@@ -1082,6 +1084,11 @@ static int sdma_get_pc(struct sdma_channel *sdmac,
10821084
per_2_emi = sdma->script_addrs->sai_2_mcu_addr;
10831085
emi_2_per = sdma->script_addrs->mcu_2_sai_addr;
10841086
break;
1087+
case IMX_DMATYPE_I2C:
1088+
per_2_emi = sdma->script_addrs->i2c_2_mcu_addr;
1089+
emi_2_per = sdma->script_addrs->mcu_2_i2c_addr;
1090+
sdmac->is_ram_script = true;
1091+
break;
10851092
case IMX_DMATYPE_HDMI:
10861093
emi_2_per = sdma->script_addrs->hdmi_dma_addr;
10871094
sdmac->is_ram_script = true;

include/linux/dma/imx-dma.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ enum sdma_peripheral_type {
4141
IMX_DMATYPE_SAI, /* SAI */
4242
IMX_DMATYPE_MULTI_SAI, /* MULTI FIFOs For Audio */
4343
IMX_DMATYPE_HDMI, /* HDMI Audio */
44+
IMX_DMATYPE_I2C, /* I2C */
4445
};
4546

4647
enum imx_dma_prio {

0 commit comments

Comments
 (0)