1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com 4*4882a593Smuzhiyun */ 5*4882a593Smuzhiyun 6*4882a593Smuzhiyun #ifndef K3_PSIL_PRIV_H_ 7*4882a593Smuzhiyun #define K3_PSIL_PRIV_H_ 8*4882a593Smuzhiyun 9*4882a593Smuzhiyun #include <linux/dma/k3-psil.h> 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun struct psil_ep { 12*4882a593Smuzhiyun u32 thread_id; 13*4882a593Smuzhiyun struct psil_endpoint_config ep_config; 14*4882a593Smuzhiyun }; 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun /** 17*4882a593Smuzhiyun * struct psil_ep_map - PSI-L thread ID configuration maps 18*4882a593Smuzhiyun * @name: Name of the map, set it to the name of the SoC 19*4882a593Smuzhiyun * @src: Array of source PSI-L thread configurations 20*4882a593Smuzhiyun * @src_count: Number of entries in the src array 21*4882a593Smuzhiyun * @dst: Array of destination PSI-L thread configurations 22*4882a593Smuzhiyun * @dst_count: Number of entries in the dst array 23*4882a593Smuzhiyun * 24*4882a593Smuzhiyun * In case of symmetric configuration for a matching src/dst thread (for example 25*4882a593Smuzhiyun * 0x4400 and 0xc400) only the src configuration can be present. If no dst 26*4882a593Smuzhiyun * configuration found the code will look for (dst_thread_id & ~0x8000) to find 27*4882a593Smuzhiyun * the symmetric match. 28*4882a593Smuzhiyun */ 29*4882a593Smuzhiyun struct psil_ep_map { 30*4882a593Smuzhiyun char *name; 31*4882a593Smuzhiyun struct psil_ep *src; 32*4882a593Smuzhiyun int src_count; 33*4882a593Smuzhiyun struct psil_ep *dst; 34*4882a593Smuzhiyun int dst_count; 35*4882a593Smuzhiyun }; 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun struct psil_endpoint_config *psil_get_ep_config(u32 thread_id); 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun /* SoC PSI-L endpoint maps */ 40*4882a593Smuzhiyun extern struct psil_ep_map am654_ep_map; 41*4882a593Smuzhiyun extern struct psil_ep_map j721e_ep_map; 42*4882a593Smuzhiyun extern struct psil_ep_map j7200_ep_map; 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun #endif /* K3_PSIL_PRIV_H_ */ 45