2 * OMAP L3 Interconnect error handling driver header
4 * Copyright (C) 2011-2014 Texas Instruments Incorporated - http://www.ti.com/
5 * Santosh Shilimkar <santosh.shilimkar@ti.com>
6 * sricharan <r.sricharan@ti.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
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
15 * GNU General Public License for more details.
17 #ifndef __OMAP_L3_NOC_H
18 #define __OMAP_L3_NOC_H
20 #define MAX_L3_MODULES 3
21 #define MAX_CLKDM_TARGETS 31
23 #define CLEAR_STDERR_LOG (1 << 31)
24 #define CUSTOM_ERROR 0x2
25 #define STANDARD_ERROR 0x0
26 #define INBAND_ERROR 0x0
27 #define L3_APPLICATION_ERROR 0x0
28 #define L3_DEBUG_ERROR 0x1
30 /* L3 TARG register offsets */
31 #define L3_TARG_STDERRLOG_MAIN 0x48
32 #define L3_TARG_STDERRLOG_SLVOFSLSB 0x5c
33 #define L3_TARG_STDERRLOG_MSTADDR 0x68
34 #define L3_FLAGMUX_REGERR0 0xc
35 #define L3_FLAGMUX_MASK0 0x8
37 #define L3_TARGET_NOT_SUPPORTED NULL
40 * struct l3_masters_data - L3 Master information
41 * @id: ID of the L3 Master
44 struct l3_masters_data {
50 * struct l3_target_data - L3 Target information
51 * @offset: Offset from base for L3 Target
54 * Target information is organized indexed by bit field definitions.
56 struct l3_target_data {
62 * struct l3_flagmux_data - Flag Mux information
63 * @offset: offset from base for flagmux register
64 * @l3_targ: array indexed by flagmux index (bit offset) pointing to the
65 * target data. unsupported ones are marked with
66 * L3_TARGET_NOT_SUPPORTED
67 * @num_targ_data: number of entries in target data
69 struct l3_flagmux_data {
71 struct l3_target_data *l3_targ;
77 * struct omap_l3 - Description of data relevant for L3 bus.
78 * @dev: device representing the bus (populated runtime)
79 * @l3_base: base addresses of modules (populated runtime)
80 * @l3_flag_mux: array containing flag mux data per module
81 * offset from corresponding module base indexed per
83 * @num_modules: number of clock domains / modules.
84 * @l3_masters: array pointing to master data containing name and register
85 * offset for the master.
86 * @num_master: number of masters
87 * @mst_addr_mask: Mask representing MSTADDR information of NTTP packet
88 * @debug_irq: irq number of the debug interrupt (populated runtime)
89 * @app_irq: irq number of the application interrupt (populated runtime)
94 void __iomem *l3_base[MAX_L3_MODULES];
95 struct l3_flagmux_data **l3_flagmux;
98 struct l3_masters_data *l3_masters;
106 static struct l3_target_data omap_l3_target_data_clk1[] = {
111 {0x600, "CLK2PWRDISC",},
113 {0x900, "L4WAKEUP",},
116 static struct l3_flagmux_data omap_l3_flagmux_clk1 = {
118 .l3_targ = omap_l3_target_data_clk1,
119 .num_targ_data = ARRAY_SIZE(omap_l3_target_data_clk1),
123 static struct l3_target_data omap_l3_target_data_clk2[] = {
124 {0x500, "CORTEXM3",},
132 {0x100, "GPMCsERROR",},
136 {0x1100, "PWRDISCCLK1",},
147 static struct l3_flagmux_data omap_l3_flagmux_clk2 = {
149 .l3_targ = omap_l3_target_data_clk2,
150 .num_targ_data = ARRAY_SIZE(omap_l3_target_data_clk2),
154 static struct l3_target_data omap_l3_target_data_clk3[] = {
156 {0x0300, "DEBUG SOURCE",},
160 static struct l3_flagmux_data omap_l3_flagmux_clk3 = {
162 .l3_targ = omap_l3_target_data_clk3,
163 .num_targ_data = ARRAY_SIZE(omap_l3_target_data_clk3),
166 static struct l3_masters_data omap_l3_masters[] = {
174 { 0x48, "FaceDetect"},
189 { 0xC0, "USBHOSTHS"},
194 static struct l3_flagmux_data *omap_l3_flagmux[] = {
195 &omap_l3_flagmux_clk1,
196 &omap_l3_flagmux_clk2,
197 &omap_l3_flagmux_clk3,
200 static const struct omap_l3 omap_l3_data = {
201 .l3_flagmux = omap_l3_flagmux,
202 .num_modules = ARRAY_SIZE(omap_l3_flagmux),
203 .l3_masters = omap_l3_masters,
204 .num_masters = ARRAY_SIZE(omap_l3_masters),
205 /* The 6 MSBs of register field used to distinguish initiator */
206 .mst_addr_mask = 0xFC,
209 #endif /* __OMAP_L3_NOC_H */