Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Hao Zhang | bccf0b7 | 2014-07-16 00:59:24 +0300 | [diff] [blame] | 2 | /* |
| 3 | * MSMC controller |
| 4 | * |
| 5 | * (C) Copyright 2014 |
| 6 | * Texas Instruments Incorporated, <www.ti.com> |
Hao Zhang | bccf0b7 | 2014-07-16 00:59:24 +0300 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef _MSMC_H_ |
| 10 | #define _MSMC_H_ |
| 11 | |
| 12 | #include <asm/arch/hardware.h> |
| 13 | |
Vitaly Andrianov | 5184ff9 | 2014-10-22 17:47:57 +0300 | [diff] [blame] | 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 | |
Hao Zhang | bccf0b7 | 2014-07-16 00:59:24 +0300 | [diff] [blame] | 38 | void msmc_share_all_segments(int priv_id); |
Vitaly Andrianov | 5184ff9 | 2014-10-22 17:47:57 +0300 | [diff] [blame] | 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); |
Hao Zhang | bccf0b7 | 2014-07-16 00:59:24 +0300 | [diff] [blame] | 43 | |
| 44 | #endif |