blob: 3fe09ea59684ce5e4e3937f995d4e9102c456b65 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Hao Zhangbccf0b72014-07-16 00:59:24 +03002/*
3 * MSMC controller
4 *
5 * (C) Copyright 2014
6 * Texas Instruments Incorporated, <www.ti.com>
Hao Zhangbccf0b72014-07-16 00:59:24 +03007 */
8
9#ifndef _MSMC_H_
10#define _MSMC_H_
11
12#include <asm/arch/hardware.h>
13
Vitaly Andrianov5184ff92014-10-22 17:47:57 +030014enum 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
Hao Zhangbccf0b72014-07-16 00:59:24 +030038void msmc_share_all_segments(int priv_id);
Vitaly Andrianov5184ff92014-10-22 17:47:57 +030039void msmc_get_ses_mpax(int priv_id, int ses_pair, u32 *mpax);
40void msmc_set_ses_mpax(int priv_id, int ses_pair, u32 *mpax);
41void msmc_map_ses_segment(int priv_id, int ses_pair,
42 u32 src_pfn, u32 dst_pfn, enum mpax_seg_size size);
Hao Zhangbccf0b72014-07-16 00:59:24 +030043
44#endif