Manorit Chawdhry | 6f2fad6 | 2023-12-29 16:16:28 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* |
| 3 | * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ |
| 4 | */ |
| 5 | |
| 6 | #ifndef DTS_ARM64_TI_K3_FIREWALL_H |
| 7 | #define DTS_ARM64_TI_K3_FIREWALL_H |
| 8 | |
| 9 | #define FWPRIVID_ALL 0xc3 |
| 10 | #define FWPRIVID_ARMV8 1 |
| 11 | #define FWPRIVID_SHIFT 16 |
| 12 | |
| 13 | #define FWCTRL_EN 0xA |
| 14 | #define FWCTRL_LOCK (1 << 4) |
| 15 | #define FWCTRL_BG (1 << 8) |
| 16 | #define FWCTRL_CACHE (1 << 9) |
| 17 | |
| 18 | #define FWPERM_SECURE_PRIV_WRITE (1 << 0) |
| 19 | #define FWPERM_SECURE_PRIV_READ (1 << 1) |
| 20 | #define FWPERM_SECURE_PRIV_CACHEABLE (1 << 2) |
| 21 | #define FWPERM_SECURE_PRIV_DEBUG (1 << 3) |
| 22 | |
| 23 | #define FWPERM_SECURE_PRIV_RWCD (FWPERM_SECURE_PRIV_READ | \ |
| 24 | FWPERM_SECURE_PRIV_WRITE | \ |
| 25 | FWPERM_SECURE_PRIV_CACHEABLE | \ |
| 26 | FWPERM_SECURE_PRIV_DEBUG) |
| 27 | |
| 28 | #define FWPERM_SECURE_USER_WRITE (1 << 4) |
| 29 | #define FWPERM_SECURE_USER_READ (1 << 5) |
| 30 | #define FWPERM_SECURE_USER_CACHEABLE (1 << 6) |
| 31 | #define FWPERM_SECURE_USER_DEBUG (1 << 7) |
| 32 | |
| 33 | #define FWPERM_SECURE_USER_RWCD (FWPERM_SECURE_USER_READ | \ |
| 34 | FWPERM_SECURE_USER_WRITE | \ |
| 35 | FWPERM_SECURE_USER_CACHEABLE | \ |
| 36 | FWPERM_SECURE_USER_DEBUG) |
| 37 | |
| 38 | #define FWPERM_NON_SECURE_PRIV_WRITE (1 << 8) |
| 39 | #define FWPERM_NON_SECURE_PRIV_READ (1 << 9) |
| 40 | #define FWPERM_NON_SECURE_PRIV_CACHEABLE (1 << 10) |
| 41 | #define FWPERM_NON_SECURE_PRIV_DEBUG (1 << 11) |
| 42 | |
| 43 | #define FWPERM_NON_SECURE_PRIV_RWCD (FWPERM_NON_SECURE_PRIV_READ | \ |
| 44 | FWPERM_NON_SECURE_PRIV_WRITE | \ |
| 45 | FWPERM_NON_SECURE_PRIV_CACHEABLE | \ |
| 46 | FWPERM_NON_SECURE_PRIV_DEBUG) |
| 47 | |
| 48 | #define FWPERM_NON_SECURE_USER_WRITE (1 << 12) |
| 49 | #define FWPERM_NON_SECURE_USER_READ (1 << 13) |
| 50 | #define FWPERM_NON_SECURE_USER_CACHEABLE (1 << 14) |
| 51 | #define FWPERM_NON_SECURE_USER_DEBUG (1 << 15) |
| 52 | |
| 53 | #define FWPERM_NON_SECURE_USER_RWCD (FWPERM_NON_SECURE_USER_READ | \ |
| 54 | FWPERM_NON_SECURE_USER_WRITE | \ |
| 55 | FWPERM_NON_SECURE_USER_CACHEABLE | \ |
| 56 | FWPERM_NON_SECURE_USER_DEBUG) |
| 57 | |
| 58 | #endif |