xref: /OK3568_Linux_fs/kernel/drivers/bus/omap_l3_noc.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * OMAP L3 Interconnect  error handling driver header
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * Copyright (C) 2011-2015 Texas Instruments Incorporated - http://www.ti.com/
5*4882a593Smuzhiyun  *	Santosh Shilimkar <santosh.shilimkar@ti.com>
6*4882a593Smuzhiyun  *	sricharan <r.sricharan@ti.com>
7*4882a593Smuzhiyun  *
8*4882a593Smuzhiyun  * This program is free software; you can redistribute it and/or modify
9*4882a593Smuzhiyun  * it under the terms of the GNU General Public License version 2 as
10*4882a593Smuzhiyun  * published by the Free Software Foundation.
11*4882a593Smuzhiyun  *
12*4882a593Smuzhiyun  * This program is distributed "as is" WITHOUT ANY WARRANTY of any
13*4882a593Smuzhiyun  * kind, whether express or implied; without even the implied warranty
14*4882a593Smuzhiyun  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15*4882a593Smuzhiyun  * GNU General Public License for more details.
16*4882a593Smuzhiyun  */
17*4882a593Smuzhiyun #ifndef __OMAP_L3_NOC_H
18*4882a593Smuzhiyun #define __OMAP_L3_NOC_H
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun #define MAX_L3_MODULES			3
21*4882a593Smuzhiyun #define MAX_CLKDM_TARGETS		31
22*4882a593Smuzhiyun 
23*4882a593Smuzhiyun #define CLEAR_STDERR_LOG		(1 << 31)
24*4882a593Smuzhiyun #define CUSTOM_ERROR			0x2
25*4882a593Smuzhiyun #define STANDARD_ERROR			0x0
26*4882a593Smuzhiyun #define INBAND_ERROR			0x0
27*4882a593Smuzhiyun #define L3_APPLICATION_ERROR		0x0
28*4882a593Smuzhiyun #define L3_DEBUG_ERROR			0x1
29*4882a593Smuzhiyun 
30*4882a593Smuzhiyun /* L3 TARG register offsets */
31*4882a593Smuzhiyun #define L3_TARG_STDERRLOG_MAIN		0x48
32*4882a593Smuzhiyun #define L3_TARG_STDERRLOG_HDR		0x4c
33*4882a593Smuzhiyun #define L3_TARG_STDERRLOG_MSTADDR	0x50
34*4882a593Smuzhiyun #define L3_TARG_STDERRLOG_INFO		0x58
35*4882a593Smuzhiyun #define L3_TARG_STDERRLOG_SLVOFSLSB	0x5c
36*4882a593Smuzhiyun #define L3_TARG_STDERRLOG_CINFO_INFO	0x64
37*4882a593Smuzhiyun #define L3_TARG_STDERRLOG_CINFO_MSTADDR	0x68
38*4882a593Smuzhiyun #define L3_TARG_STDERRLOG_CINFO_OPCODE	0x6c
39*4882a593Smuzhiyun #define L3_FLAGMUX_REGERR0		0xc
40*4882a593Smuzhiyun #define L3_FLAGMUX_MASK0		0x8
41*4882a593Smuzhiyun 
42*4882a593Smuzhiyun #define L3_TARGET_NOT_SUPPORTED		NULL
43*4882a593Smuzhiyun 
44*4882a593Smuzhiyun #define L3_BASE_IS_SUBMODULE		((void __iomem *)(1 << 0))
45*4882a593Smuzhiyun 
46*4882a593Smuzhiyun static const char * const l3_transaction_type[] = {
47*4882a593Smuzhiyun 	/* 0 0 0 */ "Idle",
48*4882a593Smuzhiyun 	/* 0 0 1 */ "Write",
49*4882a593Smuzhiyun 	/* 0 1 0 */ "Read",
50*4882a593Smuzhiyun 	/* 0 1 1 */ "ReadEx",
51*4882a593Smuzhiyun 	/* 1 0 0 */ "Read Link",
52*4882a593Smuzhiyun 	/* 1 0 1 */ "Write Non-Posted",
53*4882a593Smuzhiyun 	/* 1 1 0 */ "Write Conditional",
54*4882a593Smuzhiyun 	/* 1 1 1 */ "Write Broadcast",
55*4882a593Smuzhiyun };
56*4882a593Smuzhiyun 
57*4882a593Smuzhiyun /**
58*4882a593Smuzhiyun  * struct l3_masters_data - L3 Master information
59*4882a593Smuzhiyun  * @id:		ID of the L3 Master
60*4882a593Smuzhiyun  * @name:	master name
61*4882a593Smuzhiyun  */
62*4882a593Smuzhiyun struct l3_masters_data {
63*4882a593Smuzhiyun 	u32 id;
64*4882a593Smuzhiyun 	char *name;
65*4882a593Smuzhiyun };
66*4882a593Smuzhiyun 
67*4882a593Smuzhiyun /**
68*4882a593Smuzhiyun  * struct l3_target_data - L3 Target information
69*4882a593Smuzhiyun  * @offset:	Offset from base for L3 Target
70*4882a593Smuzhiyun  * @name:	Target name
71*4882a593Smuzhiyun  *
72*4882a593Smuzhiyun  * Target information is organized indexed by bit field definitions.
73*4882a593Smuzhiyun  */
74*4882a593Smuzhiyun struct l3_target_data {
75*4882a593Smuzhiyun 	u32 offset;
76*4882a593Smuzhiyun 	char *name;
77*4882a593Smuzhiyun };
78*4882a593Smuzhiyun 
79*4882a593Smuzhiyun /**
80*4882a593Smuzhiyun  * struct l3_flagmux_data - Flag Mux information
81*4882a593Smuzhiyun  * @offset:	offset from base for flagmux register
82*4882a593Smuzhiyun  * @l3_targ:	array indexed by flagmux index (bit offset) pointing to the
83*4882a593Smuzhiyun  *		target data. unsupported ones are marked with
84*4882a593Smuzhiyun  *		L3_TARGET_NOT_SUPPORTED
85*4882a593Smuzhiyun  * @num_targ_data: number of entries in target data
86*4882a593Smuzhiyun  * @mask_app_bits: ignore these from raw application irq status
87*4882a593Smuzhiyun  * @mask_dbg_bits: ignore these from raw debug irq status
88*4882a593Smuzhiyun  */
89*4882a593Smuzhiyun struct l3_flagmux_data {
90*4882a593Smuzhiyun 	u32 offset;
91*4882a593Smuzhiyun 	struct l3_target_data *l3_targ;
92*4882a593Smuzhiyun 	u8 num_targ_data;
93*4882a593Smuzhiyun 	u32 mask_app_bits;
94*4882a593Smuzhiyun 	u32 mask_dbg_bits;
95*4882a593Smuzhiyun };
96*4882a593Smuzhiyun 
97*4882a593Smuzhiyun 
98*4882a593Smuzhiyun /**
99*4882a593Smuzhiyun  * struct omap_l3 - Description of data relevant for L3 bus.
100*4882a593Smuzhiyun  * @dev:	device representing the bus (populated runtime)
101*4882a593Smuzhiyun  * @l3_base:	base addresses of modules (populated runtime if 0)
102*4882a593Smuzhiyun  *		if set to L3_BASE_IS_SUBMODULE, then uses previous
103*4882a593Smuzhiyun  *		module index as the base address
104*4882a593Smuzhiyun  * @l3_flag_mux: array containing flag mux data per module
105*4882a593Smuzhiyun  *		 offset from corresponding module base indexed per
106*4882a593Smuzhiyun  *		 module.
107*4882a593Smuzhiyun  * @num_modules: number of clock domains / modules.
108*4882a593Smuzhiyun  * @l3_masters:	array pointing to master data containing name and register
109*4882a593Smuzhiyun  *		offset for the master.
110*4882a593Smuzhiyun  * @num_master: number of masters
111*4882a593Smuzhiyun  * @mst_addr_mask: Mask representing MSTADDR information of NTTP packet
112*4882a593Smuzhiyun  * @debug_irq:	irq number of the debug interrupt (populated runtime)
113*4882a593Smuzhiyun  * @app_irq:	irq number of the application interrupt (populated runtime)
114*4882a593Smuzhiyun  */
115*4882a593Smuzhiyun struct omap_l3 {
116*4882a593Smuzhiyun 	struct device *dev;
117*4882a593Smuzhiyun 
118*4882a593Smuzhiyun 	void __iomem *l3_base[MAX_L3_MODULES];
119*4882a593Smuzhiyun 	struct l3_flagmux_data **l3_flagmux;
120*4882a593Smuzhiyun 	int num_modules;
121*4882a593Smuzhiyun 
122*4882a593Smuzhiyun 	struct l3_masters_data *l3_masters;
123*4882a593Smuzhiyun 	int num_masters;
124*4882a593Smuzhiyun 	u32 mst_addr_mask;
125*4882a593Smuzhiyun 
126*4882a593Smuzhiyun 	int debug_irq;
127*4882a593Smuzhiyun 	int app_irq;
128*4882a593Smuzhiyun };
129*4882a593Smuzhiyun 
130*4882a593Smuzhiyun static struct l3_target_data omap_l3_target_data_clk1[] = {
131*4882a593Smuzhiyun 	{0x100,	"DMM1",},
132*4882a593Smuzhiyun 	{0x200,	"DMM2",},
133*4882a593Smuzhiyun 	{0x300,	"ABE",},
134*4882a593Smuzhiyun 	{0x400,	"L4CFG",},
135*4882a593Smuzhiyun 	{0x600,	"CLK2PWRDISC",},
136*4882a593Smuzhiyun 	{0x0,	"HOSTCLK1",},
137*4882a593Smuzhiyun 	{0x900,	"L4WAKEUP",},
138*4882a593Smuzhiyun };
139*4882a593Smuzhiyun 
140*4882a593Smuzhiyun static struct l3_flagmux_data omap_l3_flagmux_clk1 = {
141*4882a593Smuzhiyun 	.offset = 0x500,
142*4882a593Smuzhiyun 	.l3_targ = omap_l3_target_data_clk1,
143*4882a593Smuzhiyun 	.num_targ_data = ARRAY_SIZE(omap_l3_target_data_clk1),
144*4882a593Smuzhiyun };
145*4882a593Smuzhiyun 
146*4882a593Smuzhiyun 
147*4882a593Smuzhiyun static struct l3_target_data omap_l3_target_data_clk2[] = {
148*4882a593Smuzhiyun 	{0x500,	"CORTEXM3",},
149*4882a593Smuzhiyun 	{0x300,	"DSS",},
150*4882a593Smuzhiyun 	{0x100,	"GPMC",},
151*4882a593Smuzhiyun 	{0x400,	"ISS",},
152*4882a593Smuzhiyun 	{0x700,	"IVAHD",},
153*4882a593Smuzhiyun 	{0xD00,	"AES1",},
154*4882a593Smuzhiyun 	{0x900,	"L4PER0",},
155*4882a593Smuzhiyun 	{0x200,	"OCMRAM",},
156*4882a593Smuzhiyun 	{0x100,	"GPMCsERROR",},
157*4882a593Smuzhiyun 	{0x600,	"SGX",},
158*4882a593Smuzhiyun 	{0x800,	"SL2",},
159*4882a593Smuzhiyun 	{0x1600, "C2C",},
160*4882a593Smuzhiyun 	{0x1100, "PWRDISCCLK1",},
161*4882a593Smuzhiyun 	{0xF00,	"SHA1",},
162*4882a593Smuzhiyun 	{0xE00,	"AES2",},
163*4882a593Smuzhiyun 	{0xC00,	"L4PER3",},
164*4882a593Smuzhiyun 	{0xA00,	"L4PER1",},
165*4882a593Smuzhiyun 	{0xB00,	"L4PER2",},
166*4882a593Smuzhiyun 	{0x0,	"HOSTCLK2",},
167*4882a593Smuzhiyun 	{0x1800, "CAL",},
168*4882a593Smuzhiyun 	{0x1700, "LLI",},
169*4882a593Smuzhiyun };
170*4882a593Smuzhiyun 
171*4882a593Smuzhiyun static struct l3_flagmux_data omap_l3_flagmux_clk2 = {
172*4882a593Smuzhiyun 	.offset = 0x1000,
173*4882a593Smuzhiyun 	.l3_targ = omap_l3_target_data_clk2,
174*4882a593Smuzhiyun 	.num_targ_data = ARRAY_SIZE(omap_l3_target_data_clk2),
175*4882a593Smuzhiyun };
176*4882a593Smuzhiyun 
177*4882a593Smuzhiyun 
178*4882a593Smuzhiyun static struct l3_target_data omap4_l3_target_data_clk3[] = {
179*4882a593Smuzhiyun 	{0x0100, "DEBUGSS",},
180*4882a593Smuzhiyun };
181*4882a593Smuzhiyun 
182*4882a593Smuzhiyun static struct l3_flagmux_data omap4_l3_flagmux_clk3 = {
183*4882a593Smuzhiyun 	.offset = 0x0200,
184*4882a593Smuzhiyun 	.l3_targ = omap4_l3_target_data_clk3,
185*4882a593Smuzhiyun 	.num_targ_data = ARRAY_SIZE(omap4_l3_target_data_clk3),
186*4882a593Smuzhiyun };
187*4882a593Smuzhiyun 
188*4882a593Smuzhiyun static struct l3_masters_data omap_l3_masters[] = {
189*4882a593Smuzhiyun 	{ 0x00, "MPU"},
190*4882a593Smuzhiyun 	{ 0x04, "CS_ADP"},
191*4882a593Smuzhiyun 	{ 0x05, "xxx"},
192*4882a593Smuzhiyun 	{ 0x08, "DSP"},
193*4882a593Smuzhiyun 	{ 0x0C, "IVAHD"},
194*4882a593Smuzhiyun 	{ 0x10, "ISS"},
195*4882a593Smuzhiyun 	{ 0x11, "DucatiM3"},
196*4882a593Smuzhiyun 	{ 0x12, "FaceDetect"},
197*4882a593Smuzhiyun 	{ 0x14, "SDMA_Rd"},
198*4882a593Smuzhiyun 	{ 0x15, "SDMA_Wr"},
199*4882a593Smuzhiyun 	{ 0x16, "xxx"},
200*4882a593Smuzhiyun 	{ 0x17, "xxx"},
201*4882a593Smuzhiyun 	{ 0x18, "SGX"},
202*4882a593Smuzhiyun 	{ 0x1C, "DSS"},
203*4882a593Smuzhiyun 	{ 0x20, "C2C"},
204*4882a593Smuzhiyun 	{ 0x22, "xxx"},
205*4882a593Smuzhiyun 	{ 0x23, "xxx"},
206*4882a593Smuzhiyun 	{ 0x24, "HSI"},
207*4882a593Smuzhiyun 	{ 0x28, "MMC1"},
208*4882a593Smuzhiyun 	{ 0x29, "MMC2"},
209*4882a593Smuzhiyun 	{ 0x2A, "MMC6"},
210*4882a593Smuzhiyun 	{ 0x2C, "UNIPRO1"},
211*4882a593Smuzhiyun 	{ 0x30, "USBHOSTHS"},
212*4882a593Smuzhiyun 	{ 0x31, "USBOTGHS"},
213*4882a593Smuzhiyun 	{ 0x32, "USBHOSTFS"}
214*4882a593Smuzhiyun };
215*4882a593Smuzhiyun 
216*4882a593Smuzhiyun static struct l3_flagmux_data *omap4_l3_flagmux[] = {
217*4882a593Smuzhiyun 	&omap_l3_flagmux_clk1,
218*4882a593Smuzhiyun 	&omap_l3_flagmux_clk2,
219*4882a593Smuzhiyun 	&omap4_l3_flagmux_clk3,
220*4882a593Smuzhiyun };
221*4882a593Smuzhiyun 
222*4882a593Smuzhiyun static const struct omap_l3 omap4_l3_data = {
223*4882a593Smuzhiyun 	.l3_flagmux = omap4_l3_flagmux,
224*4882a593Smuzhiyun 	.num_modules = ARRAY_SIZE(omap4_l3_flagmux),
225*4882a593Smuzhiyun 	.l3_masters = omap_l3_masters,
226*4882a593Smuzhiyun 	.num_masters = ARRAY_SIZE(omap_l3_masters),
227*4882a593Smuzhiyun 	/* The 6 MSBs of register field used to distinguish initiator */
228*4882a593Smuzhiyun 	.mst_addr_mask = 0xFC,
229*4882a593Smuzhiyun };
230*4882a593Smuzhiyun 
231*4882a593Smuzhiyun /* OMAP5 data */
232*4882a593Smuzhiyun static struct l3_target_data omap5_l3_target_data_clk3[] = {
233*4882a593Smuzhiyun 	{0x0100, "L3INSTR",},
234*4882a593Smuzhiyun 	{0x0300, "DEBUGSS",},
235*4882a593Smuzhiyun 	{0x0,	 "HOSTCLK3",},
236*4882a593Smuzhiyun };
237*4882a593Smuzhiyun 
238*4882a593Smuzhiyun static struct l3_flagmux_data omap5_l3_flagmux_clk3 = {
239*4882a593Smuzhiyun 	.offset = 0x0200,
240*4882a593Smuzhiyun 	.l3_targ = omap5_l3_target_data_clk3,
241*4882a593Smuzhiyun 	.num_targ_data = ARRAY_SIZE(omap5_l3_target_data_clk3),
242*4882a593Smuzhiyun };
243*4882a593Smuzhiyun 
244*4882a593Smuzhiyun static struct l3_flagmux_data *omap5_l3_flagmux[] = {
245*4882a593Smuzhiyun 	&omap_l3_flagmux_clk1,
246*4882a593Smuzhiyun 	&omap_l3_flagmux_clk2,
247*4882a593Smuzhiyun 	&omap5_l3_flagmux_clk3,
248*4882a593Smuzhiyun };
249*4882a593Smuzhiyun 
250*4882a593Smuzhiyun static const struct omap_l3 omap5_l3_data = {
251*4882a593Smuzhiyun 	.l3_flagmux = omap5_l3_flagmux,
252*4882a593Smuzhiyun 	.num_modules = ARRAY_SIZE(omap5_l3_flagmux),
253*4882a593Smuzhiyun 	.l3_masters = omap_l3_masters,
254*4882a593Smuzhiyun 	.num_masters = ARRAY_SIZE(omap_l3_masters),
255*4882a593Smuzhiyun 	/* The 6 MSBs of register field used to distinguish initiator */
256*4882a593Smuzhiyun 	.mst_addr_mask = 0x7E0,
257*4882a593Smuzhiyun };
258*4882a593Smuzhiyun 
259*4882a593Smuzhiyun /* DRA7 data */
260*4882a593Smuzhiyun static struct l3_target_data dra_l3_target_data_clk1[] = {
261*4882a593Smuzhiyun 	{0x2a00, "AES1",},
262*4882a593Smuzhiyun 	{0x0200, "DMM_P1",},
263*4882a593Smuzhiyun 	{0x0600, "DSP2_SDMA",},
264*4882a593Smuzhiyun 	{0x0b00, "EVE2",},
265*4882a593Smuzhiyun 	{0x1300, "DMM_P2",},
266*4882a593Smuzhiyun 	{0x2c00, "AES2",},
267*4882a593Smuzhiyun 	{0x0300, "DSP1_SDMA",},
268*4882a593Smuzhiyun 	{0x0a00, "EVE1",},
269*4882a593Smuzhiyun 	{0x0c00, "EVE3",},
270*4882a593Smuzhiyun 	{0x0d00, "EVE4",},
271*4882a593Smuzhiyun 	{0x2900, "DSS",},
272*4882a593Smuzhiyun 	{0x0100, "GPMC",},
273*4882a593Smuzhiyun 	{0x3700, "PCIE1",},
274*4882a593Smuzhiyun 	{0x1600, "IVA_CONFIG",},
275*4882a593Smuzhiyun 	{0x1800, "IVA_SL2IF",},
276*4882a593Smuzhiyun 	{0x0500, "L4_CFG",},
277*4882a593Smuzhiyun 	{0x1d00, "L4_WKUP",},
278*4882a593Smuzhiyun 	{0x3800, "PCIE2",},
279*4882a593Smuzhiyun 	{0x3300, "SHA2_1",},
280*4882a593Smuzhiyun 	{0x1200, "GPU",},
281*4882a593Smuzhiyun 	{0x1000, "IPU1",},
282*4882a593Smuzhiyun 	{0x1100, "IPU2",},
283*4882a593Smuzhiyun 	{0x2000, "TPCC_EDMA",},
284*4882a593Smuzhiyun 	{0x2e00, "TPTC1_EDMA",},
285*4882a593Smuzhiyun 	{0x2b00, "TPTC2_EDMA",},
286*4882a593Smuzhiyun 	{0x0700, "VCP1",},
287*4882a593Smuzhiyun 	{0x2500, "L4_PER2_P3",},
288*4882a593Smuzhiyun 	{0x0e00, "L4_PER3_P3",},
289*4882a593Smuzhiyun 	{0x2200, "MMU1",},
290*4882a593Smuzhiyun 	{0x1400, "PRUSS1",},
291*4882a593Smuzhiyun 	{0x1500, "PRUSS2"},
292*4882a593Smuzhiyun 	{0x0800, "VCP1",},
293*4882a593Smuzhiyun };
294*4882a593Smuzhiyun 
295*4882a593Smuzhiyun static struct l3_flagmux_data dra_l3_flagmux_clk1 = {
296*4882a593Smuzhiyun 	.offset = 0x803500,
297*4882a593Smuzhiyun 	.l3_targ = dra_l3_target_data_clk1,
298*4882a593Smuzhiyun 	.num_targ_data = ARRAY_SIZE(dra_l3_target_data_clk1),
299*4882a593Smuzhiyun };
300*4882a593Smuzhiyun 
301*4882a593Smuzhiyun static struct l3_target_data dra_l3_target_data_clk2[] = {
302*4882a593Smuzhiyun 	{0x0,	"HOST CLK1",},
303*4882a593Smuzhiyun 	{0x800000, "HOST CLK2",},
304*4882a593Smuzhiyun 	{0xdead, L3_TARGET_NOT_SUPPORTED,},
305*4882a593Smuzhiyun 	{0x3400, "SHA2_2",},
306*4882a593Smuzhiyun 	{0x0900, "BB2D",},
307*4882a593Smuzhiyun 	{0xdead, L3_TARGET_NOT_SUPPORTED,},
308*4882a593Smuzhiyun 	{0x2100, "L4_PER1_P3",},
309*4882a593Smuzhiyun 	{0x1c00, "L4_PER1_P1",},
310*4882a593Smuzhiyun 	{0x1f00, "L4_PER1_P2",},
311*4882a593Smuzhiyun 	{0x2300, "L4_PER2_P1",},
312*4882a593Smuzhiyun 	{0x2400, "L4_PER2_P2",},
313*4882a593Smuzhiyun 	{0x2600, "L4_PER3_P1",},
314*4882a593Smuzhiyun 	{0x2700, "L4_PER3_P2",},
315*4882a593Smuzhiyun 	{0x2f00, "MCASP1",},
316*4882a593Smuzhiyun 	{0x3000, "MCASP2",},
317*4882a593Smuzhiyun 	{0x3100, "MCASP3",},
318*4882a593Smuzhiyun 	{0x2800, "MMU2",},
319*4882a593Smuzhiyun 	{0x0f00, "OCMC_RAM1",},
320*4882a593Smuzhiyun 	{0x1700, "OCMC_RAM2",},
321*4882a593Smuzhiyun 	{0x1900, "OCMC_RAM3",},
322*4882a593Smuzhiyun 	{0x1e00, "OCMC_ROM",},
323*4882a593Smuzhiyun 	{0x3900, "QSPI",},
324*4882a593Smuzhiyun };
325*4882a593Smuzhiyun 
326*4882a593Smuzhiyun static struct l3_flagmux_data dra_l3_flagmux_clk2 = {
327*4882a593Smuzhiyun 	.offset = 0x803600,
328*4882a593Smuzhiyun 	.l3_targ = dra_l3_target_data_clk2,
329*4882a593Smuzhiyun 	.num_targ_data = ARRAY_SIZE(dra_l3_target_data_clk2),
330*4882a593Smuzhiyun };
331*4882a593Smuzhiyun 
332*4882a593Smuzhiyun static struct l3_target_data dra_l3_target_data_clk3[] = {
333*4882a593Smuzhiyun 	{0x0100, "L3_INSTR"},
334*4882a593Smuzhiyun 	{0x0300, "DEBUGSS_CT_TBR"},
335*4882a593Smuzhiyun 	{0x0,	 "HOST CLK3"},
336*4882a593Smuzhiyun };
337*4882a593Smuzhiyun 
338*4882a593Smuzhiyun static struct l3_flagmux_data dra_l3_flagmux_clk3 = {
339*4882a593Smuzhiyun 	.offset = 0x200,
340*4882a593Smuzhiyun 	.l3_targ = dra_l3_target_data_clk3,
341*4882a593Smuzhiyun 	.num_targ_data = ARRAY_SIZE(dra_l3_target_data_clk3),
342*4882a593Smuzhiyun };
343*4882a593Smuzhiyun 
344*4882a593Smuzhiyun static struct l3_masters_data dra_l3_masters[] = {
345*4882a593Smuzhiyun 	{ 0x0, "MPU" },
346*4882a593Smuzhiyun 	{ 0x4, "CS_DAP" },
347*4882a593Smuzhiyun 	{ 0x5, "IEEE1500_2_OCP" },
348*4882a593Smuzhiyun 	{ 0x8, "DSP1_MDMA" },
349*4882a593Smuzhiyun 	{ 0x9, "DSP1_CFG" },
350*4882a593Smuzhiyun 	{ 0xA, "DSP1_DMA" },
351*4882a593Smuzhiyun 	{ 0xB, "DSP2_MDMA" },
352*4882a593Smuzhiyun 	{ 0xC, "DSP2_CFG" },
353*4882a593Smuzhiyun 	{ 0xD, "DSP2_DMA" },
354*4882a593Smuzhiyun 	{ 0xE, "IVA" },
355*4882a593Smuzhiyun 	{ 0x10, "EVE1_P1" },
356*4882a593Smuzhiyun 	{ 0x11, "EVE2_P1" },
357*4882a593Smuzhiyun 	{ 0x12, "EVE3_P1" },
358*4882a593Smuzhiyun 	{ 0x13, "EVE4_P1" },
359*4882a593Smuzhiyun 	{ 0x14, "PRUSS1 PRU1" },
360*4882a593Smuzhiyun 	{ 0x15, "PRUSS1 PRU2" },
361*4882a593Smuzhiyun 	{ 0x16, "PRUSS2 PRU1" },
362*4882a593Smuzhiyun 	{ 0x17, "PRUSS2 PRU2" },
363*4882a593Smuzhiyun 	{ 0x18, "IPU1" },
364*4882a593Smuzhiyun 	{ 0x19, "IPU2" },
365*4882a593Smuzhiyun 	{ 0x1A, "SDMA" },
366*4882a593Smuzhiyun 	{ 0x1B, "CDMA" },
367*4882a593Smuzhiyun 	{ 0x1C, "TC1_EDMA" },
368*4882a593Smuzhiyun 	{ 0x1D, "TC2_EDMA" },
369*4882a593Smuzhiyun 	{ 0x20, "DSS" },
370*4882a593Smuzhiyun 	{ 0x21, "MMU1" },
371*4882a593Smuzhiyun 	{ 0x22, "PCIE1" },
372*4882a593Smuzhiyun 	{ 0x23, "MMU2" },
373*4882a593Smuzhiyun 	{ 0x24, "VIP1" },
374*4882a593Smuzhiyun 	{ 0x25, "VIP2" },
375*4882a593Smuzhiyun 	{ 0x26, "VIP3" },
376*4882a593Smuzhiyun 	{ 0x27, "VPE" },
377*4882a593Smuzhiyun 	{ 0x28, "GPU_P1" },
378*4882a593Smuzhiyun 	{ 0x29, "BB2D" },
379*4882a593Smuzhiyun 	{ 0x29, "GPU_P2" },
380*4882a593Smuzhiyun 	{ 0x2B, "GMAC_SW" },
381*4882a593Smuzhiyun 	{ 0x2C, "USB3" },
382*4882a593Smuzhiyun 	{ 0x2D, "USB2_SS" },
383*4882a593Smuzhiyun 	{ 0x2E, "USB2_ULPI_SS1" },
384*4882a593Smuzhiyun 	{ 0x2F, "USB2_ULPI_SS2" },
385*4882a593Smuzhiyun 	{ 0x30, "CSI2_1" },
386*4882a593Smuzhiyun 	{ 0x31, "CSI2_2" },
387*4882a593Smuzhiyun 	{ 0x33, "SATA" },
388*4882a593Smuzhiyun 	{ 0x34, "EVE1_P2" },
389*4882a593Smuzhiyun 	{ 0x35, "EVE2_P2" },
390*4882a593Smuzhiyun 	{ 0x36, "EVE3_P2" },
391*4882a593Smuzhiyun 	{ 0x37, "EVE4_P2" }
392*4882a593Smuzhiyun };
393*4882a593Smuzhiyun 
394*4882a593Smuzhiyun static struct l3_flagmux_data *dra_l3_flagmux[] = {
395*4882a593Smuzhiyun 	&dra_l3_flagmux_clk1,
396*4882a593Smuzhiyun 	&dra_l3_flagmux_clk2,
397*4882a593Smuzhiyun 	&dra_l3_flagmux_clk3,
398*4882a593Smuzhiyun };
399*4882a593Smuzhiyun 
400*4882a593Smuzhiyun static const struct omap_l3 dra_l3_data = {
401*4882a593Smuzhiyun 	.l3_base = { [1] = L3_BASE_IS_SUBMODULE },
402*4882a593Smuzhiyun 	.l3_flagmux = dra_l3_flagmux,
403*4882a593Smuzhiyun 	.num_modules = ARRAY_SIZE(dra_l3_flagmux),
404*4882a593Smuzhiyun 	.l3_masters = dra_l3_masters,
405*4882a593Smuzhiyun 	.num_masters = ARRAY_SIZE(dra_l3_masters),
406*4882a593Smuzhiyun 	/* The 6 MSBs of register field used to distinguish initiator */
407*4882a593Smuzhiyun 	.mst_addr_mask = 0xFC,
408*4882a593Smuzhiyun };
409*4882a593Smuzhiyun 
410*4882a593Smuzhiyun /* AM4372 data */
411*4882a593Smuzhiyun static struct l3_target_data am4372_l3_target_data_200f[] = {
412*4882a593Smuzhiyun 	{0xf00,  "EMIF",},
413*4882a593Smuzhiyun 	{0x1200, "DES",},
414*4882a593Smuzhiyun 	{0x400,  "OCMCRAM",},
415*4882a593Smuzhiyun 	{0x700,  "TPTC0",},
416*4882a593Smuzhiyun 	{0x800,  "TPTC1",},
417*4882a593Smuzhiyun 	{0x900,  "TPTC2"},
418*4882a593Smuzhiyun 	{0xb00,  "TPCC",},
419*4882a593Smuzhiyun 	{0xd00,  "DEBUGSS",},
420*4882a593Smuzhiyun 	{0xdead, L3_TARGET_NOT_SUPPORTED,},
421*4882a593Smuzhiyun 	{0x200,  "SHA",},
422*4882a593Smuzhiyun 	{0xc00,  "SGX530",},
423*4882a593Smuzhiyun 	{0x500,  "AES0",},
424*4882a593Smuzhiyun 	{0xa00,  "L4_FAST",},
425*4882a593Smuzhiyun 	{0x300,  "MPUSS_L2_RAM",},
426*4882a593Smuzhiyun 	{0x100,  "ICSS",},
427*4882a593Smuzhiyun };
428*4882a593Smuzhiyun 
429*4882a593Smuzhiyun static struct l3_flagmux_data am4372_l3_flagmux_200f = {
430*4882a593Smuzhiyun 	.offset = 0x1000,
431*4882a593Smuzhiyun 	.l3_targ = am4372_l3_target_data_200f,
432*4882a593Smuzhiyun 	.num_targ_data = ARRAY_SIZE(am4372_l3_target_data_200f),
433*4882a593Smuzhiyun };
434*4882a593Smuzhiyun 
435*4882a593Smuzhiyun static struct l3_target_data am4372_l3_target_data_100s[] = {
436*4882a593Smuzhiyun 	{0x100, "L4_PER_0",},
437*4882a593Smuzhiyun 	{0x200, "L4_PER_1",},
438*4882a593Smuzhiyun 	{0x300, "L4_PER_2",},
439*4882a593Smuzhiyun 	{0x400, "L4_PER_3",},
440*4882a593Smuzhiyun 	{0x800, "McASP0",},
441*4882a593Smuzhiyun 	{0x900, "McASP1",},
442*4882a593Smuzhiyun 	{0xC00, "MMCHS2",},
443*4882a593Smuzhiyun 	{0x700, "GPMC",},
444*4882a593Smuzhiyun 	{0xD00, "L4_FW",},
445*4882a593Smuzhiyun 	{0xdead, L3_TARGET_NOT_SUPPORTED,},
446*4882a593Smuzhiyun 	{0x500, "ADCTSC",},
447*4882a593Smuzhiyun 	{0xE00, "L4_WKUP",},
448*4882a593Smuzhiyun 	{0xA00, "MAG_CARD",},
449*4882a593Smuzhiyun };
450*4882a593Smuzhiyun 
451*4882a593Smuzhiyun static struct l3_flagmux_data am4372_l3_flagmux_100s = {
452*4882a593Smuzhiyun 	.offset = 0x600,
453*4882a593Smuzhiyun 	.l3_targ = am4372_l3_target_data_100s,
454*4882a593Smuzhiyun 	.num_targ_data = ARRAY_SIZE(am4372_l3_target_data_100s),
455*4882a593Smuzhiyun };
456*4882a593Smuzhiyun 
457*4882a593Smuzhiyun static struct l3_masters_data am4372_l3_masters[] = {
458*4882a593Smuzhiyun 	{ 0x0, "M1 (128-bit)"},
459*4882a593Smuzhiyun 	{ 0x1, "M2 (64-bit)"},
460*4882a593Smuzhiyun 	{ 0x4, "DAP"},
461*4882a593Smuzhiyun 	{ 0x5, "P1500"},
462*4882a593Smuzhiyun 	{ 0xC, "ICSS0"},
463*4882a593Smuzhiyun 	{ 0xD, "ICSS1"},
464*4882a593Smuzhiyun 	{ 0x14, "Wakeup Processor"},
465*4882a593Smuzhiyun 	{ 0x18, "TPTC0 Read"},
466*4882a593Smuzhiyun 	{ 0x19, "TPTC0 Write"},
467*4882a593Smuzhiyun 	{ 0x1A, "TPTC1 Read"},
468*4882a593Smuzhiyun 	{ 0x1B, "TPTC1 Write"},
469*4882a593Smuzhiyun 	{ 0x1C, "TPTC2 Read"},
470*4882a593Smuzhiyun 	{ 0x1D, "TPTC2 Write"},
471*4882a593Smuzhiyun 	{ 0x20, "SGX530"},
472*4882a593Smuzhiyun 	{ 0x21, "OCP WP Traffic Probe"},
473*4882a593Smuzhiyun 	{ 0x22, "OCP WP DMA Profiling"},
474*4882a593Smuzhiyun 	{ 0x23, "OCP WP Event Trace"},
475*4882a593Smuzhiyun 	{ 0x25, "DSS"},
476*4882a593Smuzhiyun 	{ 0x28, "Crypto DMA RD"},
477*4882a593Smuzhiyun 	{ 0x29, "Crypto DMA WR"},
478*4882a593Smuzhiyun 	{ 0x2C, "VPFE0"},
479*4882a593Smuzhiyun 	{ 0x2D, "VPFE1"},
480*4882a593Smuzhiyun 	{ 0x30, "GEMAC"},
481*4882a593Smuzhiyun 	{ 0x34, "USB0 RD"},
482*4882a593Smuzhiyun 	{ 0x35, "USB0 WR"},
483*4882a593Smuzhiyun 	{ 0x36, "USB1 RD"},
484*4882a593Smuzhiyun 	{ 0x37, "USB1 WR"},
485*4882a593Smuzhiyun };
486*4882a593Smuzhiyun 
487*4882a593Smuzhiyun static struct l3_flagmux_data *am4372_l3_flagmux[] = {
488*4882a593Smuzhiyun 	&am4372_l3_flagmux_200f,
489*4882a593Smuzhiyun 	&am4372_l3_flagmux_100s,
490*4882a593Smuzhiyun };
491*4882a593Smuzhiyun 
492*4882a593Smuzhiyun static const struct omap_l3 am4372_l3_data = {
493*4882a593Smuzhiyun 	.l3_flagmux = am4372_l3_flagmux,
494*4882a593Smuzhiyun 	.num_modules = ARRAY_SIZE(am4372_l3_flagmux),
495*4882a593Smuzhiyun 	.l3_masters = am4372_l3_masters,
496*4882a593Smuzhiyun 	.num_masters = ARRAY_SIZE(am4372_l3_masters),
497*4882a593Smuzhiyun 	/* All 6 bits of register field used to distinguish initiator */
498*4882a593Smuzhiyun 	.mst_addr_mask = 0x3F,
499*4882a593Smuzhiyun };
500*4882a593Smuzhiyun 
501*4882a593Smuzhiyun #endif	/* __OMAP_L3_NOC_H */
502