Aradhya Bhatia | 5b09538 | 2024-02-12 15:36:35 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Quality of Service (QoS) Configuration Header File |
| 4 | * |
| 5 | * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ |
| 6 | */ |
| 7 | #ifndef _K3_QOS_H_ |
| 8 | #define _K3_QOS_H_ |
| 9 | |
| 10 | #include <linux/kernel.h> |
| 11 | |
Jayesh Choudhary | 61a70b9 | 2024-06-14 18:14:35 +0530 | [diff] [blame^] | 12 | #define QOS_0 (0 << 0) |
| 13 | #define QOS_1 (1 << 0) |
| 14 | #define QOS_2 (2 << 0) |
| 15 | #define QOS_3 (3 << 0) |
| 16 | #define QOS_4 (4 << 0) |
| 17 | #define QOS_5 (5 << 0) |
| 18 | #define QOS_6 (6 << 0) |
| 19 | #define QOS_7 (7 << 0) |
| 20 | |
| 21 | #define ORDERID_0 (0 << 4) |
| 22 | #define ORDERID_1 (1 << 4) |
| 23 | #define ORDERID_2 (2 << 4) |
| 24 | #define ORDERID_3 (3 << 4) |
| 25 | #define ORDERID_4 (4 << 4) |
| 26 | #define ORDERID_5 (5 << 4) |
| 27 | #define ORDERID_6 (6 << 4) |
| 28 | #define ORDERID_7 (7 << 4) |
| 29 | #define ORDERID_8 (8 << 4) |
| 30 | #define ORDERID_9 (9 << 4) |
| 31 | #define ORDERID_10 (10 << 4) |
| 32 | #define ORDERID_11 (11 << 4) |
| 33 | #define ORDERID_12 (12 << 4) |
| 34 | #define ORDERID_13 (13 << 4) |
| 35 | #define ORDERID_14 (14 << 4) |
| 36 | #define ORDERID_15 (15 << 4) |
| 37 | |
| 38 | #define ASEL_0 (0 << 8) |
| 39 | #define ASEL_1 (1 << 8) |
| 40 | #define ASEL_2 (2 << 8) |
| 41 | #define ASEL_3 (3 << 8) |
| 42 | #define ASEL_4 (4 << 8) |
| 43 | #define ASEL_5 (5 << 8) |
| 44 | #define ASEL_6 (6 << 8) |
| 45 | #define ASEL_7 (7 << 8) |
| 46 | #define ASEL_8 (8 << 8) |
| 47 | #define ASEL_9 (9 << 8) |
| 48 | #define ASEL_10 (10 << 8) |
| 49 | #define ASEL_11 (11 << 8) |
| 50 | #define ASEL_12 (12 << 8) |
| 51 | #define ASEL_13 (13 << 8) |
| 52 | #define ASEL_14 (14 << 8) |
| 53 | #define ASEL_15 (15 << 8) |
| 54 | |
| 55 | #define EPRIORITY_0 (0 << 12) |
| 56 | #define EPRIORITY_1 (1 << 12) |
| 57 | #define EPRIORITY_2 (2 << 12) |
| 58 | #define EPRIORITY_3 (3 << 12) |
| 59 | #define EPRIORITY_4 (4 << 12) |
| 60 | #define EPRIORITY_5 (5 << 12) |
| 61 | #define EPRIORITY_6 (6 << 12) |
| 62 | #define EPRIORITY_7 (7 << 12) |
| 63 | |
| 64 | #define VIRTID_0 (0 << 16) |
| 65 | #define VIRTID_1 (1 << 16) |
| 66 | #define VIRTID_2 (2 << 16) |
| 67 | #define VIRTID_3 (3 << 16) |
| 68 | #define VIRTID_4 (4 << 16) |
| 69 | #define VIRTID_5 (5 << 16) |
| 70 | #define VIRTID_6 (6 << 16) |
| 71 | #define VIRTID_7 (7 << 16) |
| 72 | #define VIRTID_8 (8 << 16) |
| 73 | #define VIRTID_9 (9 << 16) |
| 74 | #define VIRTID_10 (10 << 16) |
| 75 | #define VIRTID_11 (11 << 16) |
| 76 | #define VIRTID_12 (12 << 16) |
| 77 | #define VIRTID_13 (13 << 16) |
| 78 | #define VIRTID_14 (14 << 16) |
| 79 | #define VIRTID_15 (15 << 16) |
| 80 | |
| 81 | #define ATYPE_0 (0 << 28) |
| 82 | #define ATYPE_1 (1 << 28) |
| 83 | #define ATYPE_2 (2 << 28) |
| 84 | #define ATYPE_3 (3 << 28) |
| 85 | |
Aradhya Bhatia | 5b09538 | 2024-02-12 15:36:35 +0530 | [diff] [blame] | 86 | struct k3_qos_data { |
| 87 | u32 reg; |
| 88 | u32 val; |
| 89 | }; |
| 90 | |
| 91 | #if (IS_ENABLED(CONFIG_K3_QOS)) |
| 92 | extern struct k3_qos_data qos_data[]; |
| 93 | extern u32 qos_count; |
| 94 | #endif |
| 95 | |
| 96 | #endif /* _K3_QOS_H_ */ |