Vignesh Raghavendra | 53b04c6 | 2020-07-07 13:43:33 +0530 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com |
| 4 | * Author: Peter Ujfalusi <peter.ujfalusi@ti.com> |
| 5 | */ |
| 6 | |
| 7 | #include <linux/kernel.h> |
| 8 | |
| 9 | #include "k3-psil-priv.h" |
| 10 | |
| 11 | #define PSIL_ETHERNET(x) \ |
| 12 | { \ |
| 13 | .thread_id = x, \ |
| 14 | .ep_config = { \ |
| 15 | .ep_type = PSIL_EP_NATIVE, \ |
| 16 | .pkt_mode = 1, \ |
| 17 | .needs_epib = 1, \ |
| 18 | .psd_size = 16, \ |
| 19 | }, \ |
| 20 | } |
| 21 | |
| 22 | /* PSI-L source thread IDs, used for RX (DMA_DEV_TO_MEM) */ |
| 23 | static struct psil_ep j721e_src_ep_map[] = { |
| 24 | /* CPSW0 */ |
| 25 | PSIL_ETHERNET(0x7000), |
| 26 | }; |
| 27 | |
| 28 | /* PSI-L destination thread IDs, used for TX (DMA_MEM_TO_DEV) */ |
| 29 | static struct psil_ep j721e_dst_ep_map[] = { |
| 30 | /* CPSW0 */ |
| 31 | PSIL_ETHERNET(0xf000), |
| 32 | PSIL_ETHERNET(0xf001), |
| 33 | PSIL_ETHERNET(0xf002), |
| 34 | PSIL_ETHERNET(0xf003), |
| 35 | PSIL_ETHERNET(0xf004), |
| 36 | PSIL_ETHERNET(0xf005), |
| 37 | PSIL_ETHERNET(0xf006), |
| 38 | PSIL_ETHERNET(0xf007), |
| 39 | }; |
| 40 | |
| 41 | struct psil_ep_map j721e_ep_map = { |
| 42 | .name = "j721e", |
| 43 | .src = j721e_src_ep_map, |
| 44 | .src_count = ARRAY_SIZE(j721e_src_ep_map), |
| 45 | .dst = j721e_dst_ep_map, |
| 46 | .dst_count = ARRAY_SIZE(j721e_dst_ep_map), |
| 47 | }; |