blob: ae2878464efa5bdce11656aa614395795baa969e [file] [log] [blame]
sricharaned0e3522011-08-24 20:07:45 +05301/*
Sricharan Rc10d5c92014-04-11 13:09:36 -05002 * OMAP L3 Interconnect error handling driver header
sricharaned0e3522011-08-24 20:07:45 +05303 *
Nishanth Menonc5f2aea2014-04-11 13:15:43 -05004 * Copyright (C) 2011-2014 Texas Instruments Incorporated - http://www.ti.com/
sricharaned0e3522011-08-24 20:07:45 +05305 * 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
Nishanth Menonc5f2aea2014-04-11 13:15:43 -05009 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
sricharaned0e3522011-08-24 20:07:45 +053011 *
Nishanth Menonc5f2aea2014-04-11 13:15:43 -050012 * 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
sricharaned0e3522011-08-24 20:07:45 +053015 * GNU General Public License for more details.
sricharaned0e3522011-08-24 20:07:45 +053016 */
Sricharan Rc10d5c92014-04-11 13:09:36 -050017#ifndef __OMAP_L3_NOC_H
18#define __OMAP_L3_NOC_H
Santosh Shilimkar2722e562011-03-07 20:53:10 +053019
Santosh Shilimkar2722e562011-03-07 20:53:10 +053020#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
Santosh Shilimkar2722e562011-03-07 20:53:10 +053025#define L3_APPLICATION_ERROR 0x0
26#define L3_DEBUG_ERROR 0x1
27
Todd Poynor342fd142011-08-24 19:11:39 +053028/* L3 TARG register offsets */
sricharaned0e3522011-08-24 20:07:45 +053029#define L3_TARG_STDERRLOG_MAIN 0x48
30#define L3_TARG_STDERRLOG_SLVOFSLSB 0x5c
sricharan551a9fa2011-09-07 17:25:16 +053031#define L3_TARG_STDERRLOG_MSTADDR 0x68
sricharaned0e3522011-08-24 20:07:45 +053032#define L3_FLAGMUX_REGERR0 0xc
Todd Poynor342fd142011-08-24 19:11:39 +053033
sricharan551a9fa2011-09-07 17:25:16 +053034#define NUM_OF_L3_MASTERS (sizeof(l3_masters)/sizeof(l3_masters[0]))
35
Nishanth Menonf0a6e652014-04-11 10:11:59 -050036/**
37 * struct l3_masters_data - L3 Master information
38 * @id: ID of the L3 Master
39 * @name: master name
40 */
41struct l3_masters_data {
42 u32 id;
43 char *name;
44};
45
Nishanth Menon3ae9af72014-04-11 11:38:10 -050046/**
47 * struct l3_target_data - L3 Target information
48 * @offset: Offset from base for L3 Target
49 * @name: Target name
50 *
51 * Target information is organized indexed by bit field definitions.
52 */
53struct l3_target_data {
54 u32 offset;
55 char *name;
56};
57
sricharan6616aac2011-08-23 12:58:48 +053058static u32 l3_flagmux[L3_MODULES] = {
Todd Poynor342fd142011-08-24 19:11:39 +053059 0x500,
60 0x1000,
61 0X0200
Santosh Shilimkar2722e562011-03-07 20:53:10 +053062};
63
Nishanth Menon3ae9af72014-04-11 11:38:10 -050064static struct l3_target_data l3_target_inst_data_clk1[] = {
65 {0x100, "DMM1",},
66 {0x200, "DMM2",},
67 {0x300, "ABE",},
68 {0x400, "L4CFG",},
69 {0x600, "CLK2PWRDISC",},
70 {0x0, "HOSTCLK1",},
71 {0x900, "L4WAKEUP",},
Santosh Shilimkar2722e562011-03-07 20:53:10 +053072};
73
Nishanth Menon3ae9af72014-04-11 11:38:10 -050074static struct l3_target_data l3_target_inst_data_clk2[] = {
75 {0x500, "CORTEXM3",},
76 {0x300, "DSS",},
77 {0x100, "GPMC",},
78 {0x400, "ISS",},
79 {0x700, "IVAHD",},
80 {0xD00, "AES1",},
81 {0x900, "L4PER0",},
82 {0x200, "OCMRAM",},
83 {0x100, "GPMCsERROR",},
84 {0x600, "SGX",},
85 {0x800, "SL2",},
86 {0x1600, "C2C",},
87 {0x1100, "PWRDISCCLK1",},
88 {0xF00, "SHA1",},
89 {0xE00, "AES2",},
90 {0xC00, "L4PER3",},
91 {0xA00, "L4PER1",},
92 {0xB00, "L4PER2",},
93 {0x0, "HOSTCLK2",},
94 {0x1800, "CAL",},
95 {0x1700, "LLI",},
Santosh Shilimkar2722e562011-03-07 20:53:10 +053096};
97
Nishanth Menon3ae9af72014-04-11 11:38:10 -050098static struct l3_target_data l3_target_inst_data_clk3[] = {
99 {0x0100, "EMUSS",},
100 {0x0300, "DEBUG SOURCE",},
101 {0x0, "HOST CLK3",},
Santosh Shilimkar2722e562011-03-07 20:53:10 +0530102};
103
Nishanth Menonf0a6e652014-04-11 10:11:59 -0500104static struct l3_masters_data l3_masters[] = {
sricharan551a9fa2011-09-07 17:25:16 +0530105 { 0x0 , "MPU"},
106 { 0x10, "CS_ADP"},
107 { 0x14, "xxx"},
108 { 0x20, "DSP"},
109 { 0x30, "IVAHD"},
110 { 0x40, "ISS"},
111 { 0x44, "DucatiM3"},
112 { 0x48, "FaceDetect"},
113 { 0x50, "SDMA_Rd"},
114 { 0x54, "SDMA_Wr"},
115 { 0x58, "xxx"},
116 { 0x5C, "xxx"},
117 { 0x60, "SGX"},
118 { 0x70, "DSS"},
119 { 0x80, "C2C"},
120 { 0x88, "xxx"},
121 { 0x8C, "xxx"},
122 { 0x90, "HSI"},
123 { 0xA0, "MMC1"},
124 { 0xA4, "MMC2"},
125 { 0xA8, "MMC6"},
126 { 0xB0, "UNIPRO1"},
127 { 0xC0, "USBHOSTHS"},
128 { 0xC4, "USBOTGHS"},
129 { 0xC8, "USBHOSTFS"}
130};
131
Nishanth Menon3ae9af72014-04-11 11:38:10 -0500132static struct l3_target_data *l3_targ[L3_MODULES] = {
133 l3_target_inst_data_clk1,
134 l3_target_inst_data_clk2,
135 l3_target_inst_data_clk3,
Santosh Shilimkar2722e562011-03-07 20:53:10 +0530136};
137
Sricharan Rc10d5c92014-04-11 13:09:36 -0500138struct omap_l3 {
sricharaned0e3522011-08-24 20:07:45 +0530139 struct device *dev;
Santosh Shilimkar2722e562011-03-07 20:53:10 +0530140
141 /* memory base */
Todd Poynor342fd142011-08-24 19:11:39 +0530142 void __iomem *l3_base[L3_MODULES];
Santosh Shilimkar2722e562011-03-07 20:53:10 +0530143
sricharaned0e3522011-08-24 20:07:45 +0530144 int debug_irq;
145 int app_irq;
Santosh Shilimkar2722e562011-03-07 20:53:10 +0530146};
Sricharan Rc10d5c92014-04-11 13:09:36 -0500147
148#endif /* __OMAP_L3_NOC_H */