blob: 9f82feb0a3cbf0b75ee4e7b14db1e7510831813f [file] [log] [blame]
Pankaj Gupta513a36d2020-12-09 14:02:39 +05301/*
2 * Copyright 2020 NXP
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 */
16enum 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
32struct csu_ns_dev_st {
33 uintptr_t ind;
34 uint32_t val;
35};
36
37void enable_layerscape_ns_access(struct csu_ns_dev_st *csu_ns_dev,
38 uint32_t num, uintptr_t nxp_csu_addr);
39
40#endif