18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#ifndef K3_PSIL_PRIV_H_ 78c2ecf20Sopenharmony_ci#define K3_PSIL_PRIV_H_ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#include <linux/dma/k3-psil.h> 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_cistruct psil_ep { 128c2ecf20Sopenharmony_ci u32 thread_id; 138c2ecf20Sopenharmony_ci struct psil_endpoint_config ep_config; 148c2ecf20Sopenharmony_ci}; 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci/** 178c2ecf20Sopenharmony_ci * struct psil_ep_map - PSI-L thread ID configuration maps 188c2ecf20Sopenharmony_ci * @name: Name of the map, set it to the name of the SoC 198c2ecf20Sopenharmony_ci * @src: Array of source PSI-L thread configurations 208c2ecf20Sopenharmony_ci * @src_count: Number of entries in the src array 218c2ecf20Sopenharmony_ci * @dst: Array of destination PSI-L thread configurations 228c2ecf20Sopenharmony_ci * @dst_count: Number of entries in the dst array 238c2ecf20Sopenharmony_ci * 248c2ecf20Sopenharmony_ci * In case of symmetric configuration for a matching src/dst thread (for example 258c2ecf20Sopenharmony_ci * 0x4400 and 0xc400) only the src configuration can be present. If no dst 268c2ecf20Sopenharmony_ci * configuration found the code will look for (dst_thread_id & ~0x8000) to find 278c2ecf20Sopenharmony_ci * the symmetric match. 288c2ecf20Sopenharmony_ci */ 298c2ecf20Sopenharmony_cistruct psil_ep_map { 308c2ecf20Sopenharmony_ci char *name; 318c2ecf20Sopenharmony_ci struct psil_ep *src; 328c2ecf20Sopenharmony_ci int src_count; 338c2ecf20Sopenharmony_ci struct psil_ep *dst; 348c2ecf20Sopenharmony_ci int dst_count; 358c2ecf20Sopenharmony_ci}; 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_cistruct psil_endpoint_config *psil_get_ep_config(u32 thread_id); 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci/* SoC PSI-L endpoint maps */ 408c2ecf20Sopenharmony_ciextern struct psil_ep_map am654_ep_map; 418c2ecf20Sopenharmony_ciextern struct psil_ep_map j721e_ep_map; 428c2ecf20Sopenharmony_ciextern struct psil_ep_map j7200_ep_map; 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci#endif /* K3_PSIL_PRIV_H_ */ 45