Pankaj Gupta | 513a36d | 2020-12-09 14:02:39 +0530 | [diff] [blame] | 1 | /* |
Pankaj Gupta | 7834b46 | 2021-03-25 15:15:52 +0530 | [diff] [blame] | 2 | * Copyright 2021 NXP |
Pankaj Gupta | 513a36d | 2020-12-09 14:02:39 +0530 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #ifndef CSU_H |
| 9 | #define CSU_H |
| 10 | |
| 11 | #define CSU_SEC_ACCESS_REG_OFFSET (0x0021CU) |
| 12 | |
| 13 | /* Macros defining access permissions to configure |
| 14 | * the regions controlled by Central Security Unit. |
| 15 | */ |
| 16 | enum csu_cslx_access { |
| 17 | CSU_NS_SUP_R = (0x8U), |
| 18 | CSU_NS_SUP_W = (0x80U), |
| 19 | CSU_NS_SUP_RW = (0x88U), |
| 20 | CSU_NS_USER_R = (0x4U), |
| 21 | CSU_NS_USER_W = (0x40U), |
| 22 | CSU_NS_USER_RW = (0x44U), |
| 23 | CSU_S_SUP_R = (0x2U), |
| 24 | CSU_S_SUP_W = (0x20U), |
| 25 | CSU_S_SUP_RW = (0x22U), |
| 26 | CSU_S_USER_R = (0x1U), |
| 27 | CSU_S_USER_W = (0x10U), |
| 28 | CSU_S_USER_RW = (0x11U), |
| 29 | CSU_ALL_RW = (0xffU), |
| 30 | }; |
| 31 | |
| 32 | struct csu_ns_dev_st { |
| 33 | uintptr_t ind; |
| 34 | uint32_t val; |
| 35 | }; |
| 36 | |
| 37 | void enable_layerscape_ns_access(struct csu_ns_dev_st *csu_ns_dev, |
| 38 | uint32_t num, uintptr_t nxp_csu_addr); |
| 39 | |
| 40 | #endif |