bus: omap_l3_noc: un-obfuscate l3_targ address computation
[deliverable/linux.git] / drivers / bus / omap_l3_noc.h
CommitLineData
ed0e3520 1/*
c10d5c9e 2 * OMAP L3 Interconnect error handling driver header
ed0e3520 3 *
c5f2aea0 4 * Copyright (C) 2011-2014 Texas Instruments Incorporated - http://www.ti.com/
ed0e3520 5 * Santosh Shilimkar <santosh.shilimkar@ti.com>
6 * sricharan <r.sricharan@ti.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
c5f2aea0
NM
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
ed0e3520 11 *
c5f2aea0
NM
12 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
13 * kind, whether express or implied; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ed0e3520 15 * GNU General Public License for more details.
ed0e3520 16 */
c10d5c9e
S
17#ifndef __OMAP_L3_NOC_H
18#define __OMAP_L3_NOC_H
2722e56d 19
2722e56d
SS
20#define L3_MODULES 3
21#define CLEAR_STDERR_LOG (1 << 31)
22#define CUSTOM_ERROR 0x2
23#define STANDARD_ERROR 0x0
24#define INBAND_ERROR 0x0
2722e56d
SS
25#define L3_APPLICATION_ERROR 0x0
26#define L3_DEBUG_ERROR 0x1
27
342fd144 28/* L3 TARG register offsets */
ed0e3520 29#define L3_TARG_STDERRLOG_MAIN 0x48
30#define L3_TARG_STDERRLOG_SLVOFSLSB 0x5c
551a9fa9 31#define L3_TARG_STDERRLOG_MSTADDR 0x68
ed0e3520 32#define L3_FLAGMUX_REGERR0 0xc
342fd144 33
551a9fa9 34#define NUM_OF_L3_MASTERS (sizeof(l3_masters)/sizeof(l3_masters[0]))
35
6616aac6 36static u32 l3_flagmux[L3_MODULES] = {
342fd144
TP
37 0x500,
38 0x1000,
39 0X0200
2722e56d
SS
40};
41
342fd144 42/* L3 Target standard Error register offsets */
6616aac6 43static u32 l3_targ_inst_clk1[] = {
342fd144
TP
44 0x100, /* DMM1 */
45 0x200, /* DMM2 */
46 0x300, /* ABE */
47 0x400, /* L4CFG */
e17933c2
S
48 0x600, /* CLK2 PWR DISC */
49 0x0, /* Host CLK1 */
50 0x900 /* L4 Wakeup */
2722e56d
SS
51};
52
6616aac6 53static u32 l3_targ_inst_clk2[] = {
342fd144
TP
54 0x500, /* CORTEX M3 */
55 0x300, /* DSS */
56 0x100, /* GPMC */
57 0x400, /* ISS */
58 0x700, /* IVAHD */
59 0xD00, /* missing in TRM corresponds to AES1*/
60 0x900, /* L4 PER0*/
61 0x200, /* OCMRAM */
62 0x100, /* missing in TRM corresponds to GPMC sERROR*/
63 0x600, /* SGX */
64 0x800, /* SL2 */
65 0x1600, /* C2C */
66 0x1100, /* missing in TRM corresponds PWR DISC CLK1*/
67 0xF00, /* missing in TRM corrsponds to SHA1*/
68 0xE00, /* missing in TRM corresponds to AES2*/
69 0xC00, /* L4 PER3 */
70 0xA00, /* L4 PER1*/
e17933c2
S
71 0xB00, /* L4 PER2*/
72 0x0, /* HOST CLK2 */
73 0x1800, /* CAL */
74 0x1700 /* LLI */
2722e56d
SS
75};
76
6616aac6 77static u32 l3_targ_inst_clk3[] = {
e17933c2
S
78 0x0100 /* EMUSS */,
79 0x0300, /* DEBUGSS_CT_TBR */
80 0x0 /* HOST CLK3 */
2722e56d
SS
81};
82
551a9fa9 83static struct l3_masters_data {
84 u32 id;
85 char name[10];
86} l3_masters[] = {
87 { 0x0 , "MPU"},
88 { 0x10, "CS_ADP"},
89 { 0x14, "xxx"},
90 { 0x20, "DSP"},
91 { 0x30, "IVAHD"},
92 { 0x40, "ISS"},
93 { 0x44, "DucatiM3"},
94 { 0x48, "FaceDetect"},
95 { 0x50, "SDMA_Rd"},
96 { 0x54, "SDMA_Wr"},
97 { 0x58, "xxx"},
98 { 0x5C, "xxx"},
99 { 0x60, "SGX"},
100 { 0x70, "DSS"},
101 { 0x80, "C2C"},
102 { 0x88, "xxx"},
103 { 0x8C, "xxx"},
104 { 0x90, "HSI"},
105 { 0xA0, "MMC1"},
106 { 0xA4, "MMC2"},
107 { 0xA8, "MMC6"},
108 { 0xB0, "UNIPRO1"},
109 { 0xC0, "USBHOSTHS"},
110 { 0xC4, "USBOTGHS"},
111 { 0xC8, "USBHOSTFS"}
112};
113
e17933c2 114static char *l3_targ_inst_name[L3_MODULES][21] = {
2722e56d 115 {
ed0e3520 116 "DMM1",
117 "DMM2",
118 "ABE",
119 "L4CFG",
120 "CLK2 PWR DISC",
e17933c2
S
121 "HOST CLK1",
122 "L4 WAKEUP"
2722e56d
SS
123 },
124 {
ed0e3520 125 "CORTEX M3" ,
126 "DSS ",
127 "GPMC ",
128 "ISS ",
129 "IVAHD ",
130 "AES1",
131 "L4 PER0",
132 "OCMRAM ",
133 "GPMC sERROR",
134 "SGX ",
135 "SL2 ",
136 "C2C ",
137 "PWR DISC CLK1",
138 "SHA1",
139 "AES2",
140 "L4 PER3",
141 "L4 PER1",
142 "L4 PER2",
e17933c2
S
143 "HOST CLK2",
144 "CAL",
145 "LLI"
2722e56d
SS
146 },
147 {
ed0e3520 148 "EMUSS",
e17933c2
S
149 "DEBUG SOURCE",
150 "HOST CLK3"
2722e56d
SS
151 },
152};
153
6616aac6 154static u32 *l3_targ[L3_MODULES] = {
342fd144
TP
155 l3_targ_inst_clk1,
156 l3_targ_inst_clk2,
157 l3_targ_inst_clk3,
2722e56d
SS
158};
159
c10d5c9e 160struct omap_l3 {
ed0e3520 161 struct device *dev;
2722e56d
SS
162
163 /* memory base */
342fd144 164 void __iomem *l3_base[L3_MODULES];
2722e56d 165
ed0e3520 166 int debug_irq;
167 int app_irq;
2722e56d 168};
c10d5c9e
S
169
170#endif /* __OMAP_L3_NOC_H */
This page took 0.197345 seconds and 5 git commands to generate.