Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dmaengine: ti: k3-udma: Add support for BCDMA CSI RX

BCDMA CSI RX present on AM62Ax SoC is a dedicated DMA for servicing
Camera Serial Interface (CSI) IP. Add support for the same.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20221213164304.1126945-6-vigneshr@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Vignesh Raghavendra and committed by
Vinod Koul
3f58e106 c1475ad3

+32 -5
+32 -5
drivers/dma/ti/k3-udma.c
··· 135 135 u32 flags; 136 136 u32 statictr_z_mask; 137 137 u8 burst_size[3]; 138 + struct udma_soc_data *soc_data; 138 139 }; 139 140 140 141 struct udma_soc_data { ··· 4296 4295 }, 4297 4296 }; 4298 4297 4298 + static struct udma_soc_data am62a_dmss_csi_soc_data = { 4299 + .oes = { 4300 + .bcdma_rchan_data = 0xe00, 4301 + .bcdma_rchan_ring = 0x1000, 4302 + }, 4303 + }; 4304 + 4305 + static struct udma_match_data am62a_bcdma_csirx_data = { 4306 + .type = DMA_TYPE_BCDMA, 4307 + .psil_base = 0x3100, 4308 + .enable_memcpy_support = false, 4309 + .burst_size = { 4310 + TI_SCI_RM_UDMAP_CHAN_BURST_SIZE_64_BYTES, /* Normal Channels */ 4311 + 0, /* No H Channels */ 4312 + 0, /* No UH Channels */ 4313 + }, 4314 + .soc_data = &am62a_dmss_csi_soc_data, 4315 + }; 4316 + 4299 4317 static struct udma_match_data am64_bcdma_data = { 4300 4318 .type = DMA_TYPE_BCDMA, 4301 4319 .psil_base = 0x2000, /* for tchan and rchan, not applicable to bchan */ ··· 4363 4343 { 4364 4344 .compatible = "ti,am64-dmss-pktdma", 4365 4345 .data = &am64_pktdma_data, 4346 + }, 4347 + { 4348 + .compatible = "ti,am62a-dmss-bcdma-csirx", 4349 + .data = &am62a_bcdma_csirx_data, 4366 4350 }, 4367 4351 { /* Sentinel */ }, 4368 4352 }; ··· 5298 5274 } 5299 5275 ud->match_data = match->data; 5300 5276 5301 - soc = soc_device_match(k3_soc_devices); 5302 - if (!soc) { 5303 - dev_err(dev, "No compatible SoC found\n"); 5304 - return -ENODEV; 5277 + ud->soc_data = ud->match_data->soc_data; 5278 + if (!ud->soc_data) { 5279 + soc = soc_device_match(k3_soc_devices); 5280 + if (!soc) { 5281 + dev_err(dev, "No compatible SoC found\n"); 5282 + return -ENODEV; 5283 + } 5284 + ud->soc_data = soc->data; 5305 5285 } 5306 - ud->soc_data = soc->data; 5307 5286 5308 5287 ret = udma_get_mmrs(pdev, ud); 5309 5288 if (ret)