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