]> git.ipfire.org Git - people/ms/u-boot.git/blob - arch/arm/cpu/armv7/keystone/msmc.c
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
[people/ms/u-boot.git] / arch / arm / cpu / armv7 / keystone / msmc.c
1 /*
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>
11 #include <asm/arch/hardware.h>
12
13 struct mpax {
14 u32 mpaxl;
15 u32 mpaxh;
16 };
17
18 struct 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
59 void share_all_segments(int priv_id)
60 {
61 struct msms_regs *msmc = (struct msms_regs *)K2HK_MSMC_CTRL_BASE;
62 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 }