blob: 3a43e45a61d98ac227c3a7c0bb415cb844f54064 [file] [log] [blame]
Pankaj Gupta513a36d2020-12-09 14:02:39 +05301/*
Pankaj Gupta7834b462021-03-25 15:15:52 +05302 * Copyright 2021 NXP
Pankaj Gupta513a36d2020-12-09 14:02:39 +05303 *
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