diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-10-15 14:33:52 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-10-15 14:33:52 -0700 |
commit | f065199d4df0b1512f935621d2de128ddb3fcc3a (patch) | |
tree | e337fac0a06e9eeb7657ca0dc5cce530d730d0c6 /drivers/dma/ti/k3-psil.c | |
parent | c48b75b7271db23c1b2d1204d6e8496d91f27711 (diff) | |
parent | fc143e38ddd47d3b01ac276786ee78edf053bf5d (diff) |
Merge tag 'dmaengine-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine
Pull dmaengine updates from Vinod Koul:
"Core:
- Mark dma_request_slave_channel() deprecated in favour of
dma_request_chan()
- subsystem conversion for tasklet_setup() API
- subsystem removal of local dma_parms for arm drivers
Also updates to bunch of driver notably TI, DW and AXI-DMAC"
* tag 'dmaengine-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (104 commits)
dmaengine: owl-dma: fix kernel-doc style for enum
dmaengine: zynqmp_dma: fix kernel-doc style for tasklet
dmaengine: xilinx_dma: fix kernel-doc style for tasklet
dmaengine: qcom: bam_dma: fix kernel-doc style for tasklet
dmaengine: altera-msgdma: fix kernel-doc style for tasklet
dmaengine: xilinx: dpdma: convert tasklets to use new tasklet_setup() API
dmaengine: sf-pdma: convert tasklets to use new tasklet_setup() API
dt-bindings: Fix 'reg' size issues in zynqmp examples
dmaengine: rcar-dmac: drop double zeroing
dmaengine: sh: drop double zeroing
dmaengine: ioat: Allocate correct size for descriptor chunk
dmaengine: ti: k3-udma: use devm_platform_ioremap_resource_byname
dmaengine: fsl: remove bad channel update
dmaengine: dma-jz4780: Fix race in jz4780_dma_tx_status
dmaengine: pl330: fix argument for tasklet
dmaengine: dmatest: Return boolean result directly in filter()
dmaengine: dmatest: Check list for emptiness before access its last entry
dmaengine: ti: k3-udma-glue: fix channel enable functions
dmaengine: iop-adma: Fix pointer cast warnings
dmaengine: dw-edma: Fix Using plain integer as NULL pointer in dw-edma-v0-debugfs.c
...
Diffstat (limited to 'drivers/dma/ti/k3-psil.c')
-rw-r--r-- | drivers/dma/ti/k3-psil.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/dma/ti/k3-psil.c b/drivers/dma/ti/k3-psil.c index fb7c8150b0d1..837853aab95a 100644 --- a/drivers/dma/ti/k3-psil.c +++ b/drivers/dma/ti/k3-psil.c @@ -9,11 +9,19 @@ #include <linux/init.h> #include <linux/mutex.h> #include <linux/of.h> +#include <linux/sys_soc.h> #include "k3-psil-priv.h" static DEFINE_MUTEX(ep_map_mutex); -static struct psil_ep_map *soc_ep_map; +static const struct psil_ep_map *soc_ep_map; + +static const struct soc_device_attribute k3_soc_devices[] = { + { .family = "AM65X", .data = &am654_ep_map }, + { .family = "J721E", .data = &j721e_ep_map }, + { .family = "J7200", .data = &j7200_ep_map }, + { /* sentinel */ } +}; struct psil_endpoint_config *psil_get_ep_config(u32 thread_id) { @@ -21,10 +29,11 @@ struct psil_endpoint_config *psil_get_ep_config(u32 thread_id) mutex_lock(&ep_map_mutex); if (!soc_ep_map) { - if (of_machine_is_compatible("ti,am654")) { - soc_ep_map = &am654_ep_map; - } else if (of_machine_is_compatible("ti,j721e")) { - soc_ep_map = &j721e_ep_map; + const struct soc_device_attribute *soc; + + soc = soc_device_match(k3_soc_devices); + if (soc) { + soc_ep_map = soc->data; } else { pr_err("PSIL: No compatible machine found for map\n"); mutex_unlock(&ep_map_mutex); |