1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * MSMC controller
4  *
5  * (C) Copyright 2014
6  *     Texas Instruments Incorporated, <www.ti.com>
7  */
8 
9 #ifndef _MSMC_H_
10 #define _MSMC_H_
11 
12 #include <asm/arch/hardware.h>
13 
14 enum mpax_seg_size {
15 	MPAX_SEG_4K = 0x0b,
16 	MPAX_SEG_8K,
17 	MPAX_SEG_16K,
18 	MPAX_SEG_32K,
19 	MPAX_SEG_64K,
20 	MPAX_SEG_128K,
21 	MPAX_SEG_256K,
22 	MPAX_SEG_512K,
23 	MPAX_SEG_1M,
24 	MPAX_SEG_2M,
25 	MPAX_SEG_4M,
26 	MPAX_SEG_8M,
27 	MPAX_SEG_16M,
28 	MPAX_SEG_32M,
29 	MPAX_SEG_64M,
30 	MPAX_SEG_128M,
31 	MPAX_SEG_256M,
32 	MPAX_SEG_512M,
33 	MPAX_SEG_1G,
34 	MPAX_SEG_2G,
35 	MPAX_SEG_4G
36 };
37 
38 void msmc_share_all_segments(int priv_id);
39 void msmc_get_ses_mpax(int priv_id, int ses_pair, u32 *mpax);
40 void msmc_set_ses_mpax(int priv_id, int ses_pair, u32 *mpax);
41 void msmc_map_ses_segment(int priv_id, int ses_pair,
42 			  u32 src_pfn, u32 dst_pfn, enum mpax_seg_size size);
43 
44 #endif
45