blob: 5d555c498db9a921e89246bdbf03109f46a29b8f [file] [log] [blame]
Peng Fan9c87e462021-08-07 16:00:59 +08001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright 2021 NXP
4 */
5
6#ifndef __ASM_ARCH_IMX8ULP_RDC_H
7#define __ASM_ARCH_IMX8ULP_RDC_H
8
9enum rdc_type {
10 RDC_TRDC,
11 RDC_XRDC,
12};
13
14int release_rdc(enum rdc_type type);
15void xrdc_mrc_region_set_access(int mrc_index, u32 addr, u32 access);
16int xrdc_config_mrc_dx_perm(u32 mrc_con, u32 region, u32 dom, u32 dxsel);
17int xrdc_config_mrc_w0_w1(u32 mrc_con, u32 region, u32 w0, u32 size);
18int xrdc_config_mrc_w3_w4(u32 mrc_con, u32 region, u32 w3, u32 w4);
19int xrdc_config_pdac(u32 bridge, u32 index, u32 dom, u32 perm);
20int xrdc_config_pdac_openacc(u32 bridge, u32 index);
21int trdc_mbc_set_access(u32 mbc_x, u32 dom_x, u32 mem_x, u32 blk_x, bool sec_access);
22int trdc_mrc_region_set_access(u32 mrc_x, u32 dom_x, u32 addr_start, u32 addr_end, bool sec_access);
23
24void xrdc_init_mda(void);
25void xrdc_init_mrc(void);
Ye Li7edb3622023-01-31 16:42:24 +080026void xrdc_init_pdac_msc(void);
Peng Fan9c87e462021-08-07 16:00:59 +080027
28#endif