blob: 7d8e5978dfad307a5bbe97afa7a8aae59265b56b [file] [log] [blame]
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -04001/*
2 * MSMC controller utilities
3 *
4 * (C) Copyright 2012-2014
5 * Texas Instruments Incorporated, <www.ti.com>
6 *
7 * SPDX-License-Identifier: GPL-2.0+
8 */
9
10#include <common.h>
Hao Zhangbccf0b72014-07-16 00:59:24 +030011#include <asm/arch/msmc.h>
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040012
13struct mpax {
14 u32 mpaxl;
15 u32 mpaxh;
16};
17
18struct msms_regs {
19 u32 pid;
20 u32 _res_04;
21 u32 smcerrar;
22 u32 smcerrxr;
23 u32 smedcc;
24 u32 smcea;
25 u32 smsecc;
26 u32 smpfar;
27 u32 smpfxr;
28 u32 smpfr;
29 u32 smpfcr;
30 u32 _res_2c;
31 u32 sbndc[8];
32 u32 sbndm;
33 u32 sbnde;
34 u32 _res_58;
35 u32 cfglck;
36 u32 cfgulck;
37 u32 cfglckstat;
38 u32 sms_mpax_lck;
39 u32 sms_mpax_ulck;
40 u32 sms_mpax_lckstat;
41 u32 ses_mpax_lck;
42 u32 ses_mpax_ulck;
43 u32 ses_mpax_lckstat;
44 u32 smestat;
45 u32 smirstat;
46 u32 smirc;
47 u32 smiestat;
48 u32 smiec;
49 u32 _res_94_c0[12];
50 u32 smncerrar;
51 u32 smncerrxr;
52 u32 smncea;
53 u32 _res_d0_1fc[76];
54 struct mpax sms[16][8];
55 struct mpax ses[16][8];
56};
57
58
Hao Zhangbccf0b72014-07-16 00:59:24 +030059void msmc_share_all_segments(int priv_id)
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040060{
Khoronzhuk, Ivand5cb1bb2014-07-09 23:44:44 +030061 struct msms_regs *msmc = (struct msms_regs *)KS2_MSMC_CTRL_BASE;
Vitaly Andrianov7bcf4d62014-04-04 13:16:53 -040062 int j;
63
64 for (j = 0; j < 8; j++) {
65 msmc->sms[priv_id][j].mpaxh &= 0xffffff7ful;
66 msmc->ses[priv_id][j].mpaxh &= 0xffffff7ful;
67 }
68}