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