blob: 083f5ba0522ba9e760877acfa8a4d0c99ce9c06c [file] [log] [blame]
Hao Zhangbccf0b72014-07-16 00:59:24 +03001/*
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
Vitaly Andrianov5184ff92014-10-22 17:47:57 +030015enum 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
Hao Zhangbccf0b72014-07-16 00:59:24 +030039void msmc_share_all_segments(int priv_id);
Vitaly Andrianov5184ff92014-10-22 17:47:57 +030040void msmc_get_ses_mpax(int priv_id, int ses_pair, u32 *mpax);
41void msmc_set_ses_mpax(int priv_id, int ses_pair, u32 *mpax);
42void msmc_map_ses_segment(int priv_id, int ses_pair,
43 u32 src_pfn, u32 dst_pfn, enum mpax_seg_size size);
Hao Zhangbccf0b72014-07-16 00:59:24 +030044
45#endif