xref: /rk3399_ARM-atf/plat/rockchip/rk3568/drivers/secure/secure.h (revision a77efb6ba4407696ae21676535ee17f923e15930)
1 /*
2  * Copyright (c) 2024-2026, Rockchip, Inc. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef SECURE_H
8 #define SECURE_H
9 
10 #define SGRF_FIREWALL_SLV_CON(i)	(0x240 + i * 4)
11 
12 /* ddr firewall */
13 #define FIREWALL_DDR_RGN(i)		((i) * 0x4)
14 #define FIREWALL_DDR_RGN_CNT		16
15 #define FIREWALL_DDR_CON		0x80
16 
17 #define RG_MAP_SECURE(top, base)	\
18 	(((((top) - 1) & 0x7fff) << 16) | ((base) & 0x7fff))
19 
20 void secure_timer_init(void);
21 void sgrf_init(void);
22 
23 #endif /* SECURE_H */
24