diff options
author | Rajendra Nayak <rnayak@ti.com> | 2014-04-10 12:33:13 -0400 |
---|---|---|
committer | Nishanth Menon <nm@ti.com> | 2014-05-05 15:34:26 -0400 |
commit | 53a848be0a65c6fb105eb5ecb8b8b3edfa0f91ad (patch) | |
tree | 1d74694608f7396918217c4efdde33157e1bd981 | |
parent | f33ddf745cbcd4145fcb2f8239f5dbba089fb8ff (diff) |
bus: omap_l3_noc: Add DRA7 interconnect error data
DRA7 is distinctly different from OMAP4 in terms of masters and clock
domain organization. There two main clock domains which is divided as
follows:
<0x44000000 0x1000000> is clk1 and clk2 is the sub clock domain
<0x45000000 0x1000> is clk3
Add all the data needed to handle L3 error handling on DRA7 devices
and mark clk2 as subdomain and provide a compatible flag for
functionality. Other than the data difference the hardware blocks
involved are essentially the same.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
[nm@ti.com: bugfixes and generic improvements, documentation]
Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Sekhar Nori <nsekhar@ti.com>
-rw-r--r-- | Documentation/devicetree/bindings/arm/omap/l3-noc.txt | 1 | ||||
-rw-r--r-- | drivers/bus/omap_l3_noc.c | 1 | ||||
-rw-r--r-- | drivers/bus/omap_l3_noc.h | 151 |
3 files changed, 153 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/arm/omap/l3-noc.txt b/Documentation/devicetree/bindings/arm/omap/l3-noc.txt index c0105de55cbd..45d0fc23de2d 100644 --- a/Documentation/devicetree/bindings/arm/omap/l3-noc.txt +++ b/Documentation/devicetree/bindings/arm/omap/l3-noc.txt | |||
@@ -6,6 +6,7 @@ provided by Arteris. | |||
6 | Required properties: | 6 | Required properties: |
7 | - compatible : Should be "ti,omap3-l3-smx" for OMAP3 family | 7 | - compatible : Should be "ti,omap3-l3-smx" for OMAP3 family |
8 | Should be "ti,omap4-l3-noc" for OMAP4 family | 8 | Should be "ti,omap4-l3-noc" for OMAP4 family |
9 | Should be "ti,dra7-l3-noc" for DRA7 family | ||
9 | - reg: Contains L3 register address range for each noc domain. | 10 | - reg: Contains L3 register address range for each noc domain. |
10 | - ti,hwmods: "l3_main_1", ... One hwmod for each noc domain. | 11 | - ti,hwmods: "l3_main_1", ... One hwmod for each noc domain. |
11 | 12 | ||
diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c index 0eba07ac6008..6cdd02ef0909 100644 --- a/drivers/bus/omap_l3_noc.c +++ b/drivers/bus/omap_l3_noc.c | |||
@@ -230,6 +230,7 @@ static irqreturn_t l3_interrupt_handler(int irq, void *_l3) | |||
230 | 230 | ||
231 | static const struct of_device_id l3_noc_match[] = { | 231 | static const struct of_device_id l3_noc_match[] = { |
232 | {.compatible = "ti,omap4-l3-noc", .data = &omap_l3_data}, | 232 | {.compatible = "ti,omap4-l3-noc", .data = &omap_l3_data}, |
233 | {.compatible = "ti,dra7-l3-noc", .data = &dra_l3_data}, | ||
233 | {}, | 234 | {}, |
234 | }; | 235 | }; |
235 | MODULE_DEVICE_TABLE(of, l3_noc_match); | 236 | MODULE_DEVICE_TABLE(of, l3_noc_match); |
diff --git a/drivers/bus/omap_l3_noc.h b/drivers/bus/omap_l3_noc.h index aced4c546783..9562a75259c8 100644 --- a/drivers/bus/omap_l3_noc.h +++ b/drivers/bus/omap_l3_noc.h | |||
@@ -230,4 +230,155 @@ static const struct omap_l3 omap_l3_data = { | |||
230 | .mst_addr_mask = 0xFC, | 230 | .mst_addr_mask = 0xFC, |
231 | }; | 231 | }; |
232 | 232 | ||
233 | /* DRA7 data */ | ||
234 | static struct l3_target_data dra_l3_target_data_clk1[] = { | ||
235 | {0x2a00, "AES1",}, | ||
236 | {0x0200, "DMM_P1",}, | ||
237 | {0x0600, "DSP2_SDMA",}, | ||
238 | {0x0b00, "EVE2",}, | ||
239 | {0x1300, "DMM_P2",}, | ||
240 | {0x2c00, "AES2",}, | ||
241 | {0x0300, "DSP1_SDMA",}, | ||
242 | {0x0a00, "EVE1",}, | ||
243 | {0x0c00, "EVE3",}, | ||
244 | {0x0d00, "EVE4",}, | ||
245 | {0x2900, "DSS",}, | ||
246 | {0x0100, "GPMC",}, | ||
247 | {0x3700, "PCIE1",}, | ||
248 | {0x1600, "IVA_CONFIG",}, | ||
249 | {0x1800, "IVA_SL2IF",}, | ||
250 | {0x0500, "L4_CFG",}, | ||
251 | {0x1d00, "L4_WKUP",}, | ||
252 | {0x3800, "PCIE2",}, | ||
253 | {0x3300, "SHA2_1",}, | ||
254 | {0x1200, "GPU",}, | ||
255 | {0x1000, "IPU1",}, | ||
256 | {0x1100, "IPU2",}, | ||
257 | {0x2000, "TPCC_EDMA",}, | ||
258 | {0x2e00, "TPTC1_EDMA",}, | ||
259 | {0x2b00, "TPTC2_EDMA",}, | ||
260 | {0x0700, "VCP1",}, | ||
261 | {0x2500, "L4_PER2_P3",}, | ||
262 | {0x0e00, "L4_PER3_P3",}, | ||
263 | {0x2200, "MMU1",}, | ||
264 | {0x1400, "PRUSS1",}, | ||
265 | {0x1500, "PRUSS2"}, | ||
266 | {0x0800, "VCP1",}, | ||
267 | }; | ||
268 | |||
269 | static struct l3_flagmux_data dra_l3_flagmux_clk1 = { | ||
270 | .offset = 0x803500, | ||
271 | .l3_targ = dra_l3_target_data_clk1, | ||
272 | .num_targ_data = ARRAY_SIZE(dra_l3_target_data_clk1), | ||
273 | }; | ||
274 | |||
275 | static struct l3_target_data dra_l3_target_data_clk2[] = { | ||
276 | {0x0, "HOST CLK1",}, | ||
277 | {0x0, "HOST CLK2",}, | ||
278 | {0xdead, L3_TARGET_NOT_SUPPORTED,}, | ||
279 | {0x3400, "SHA2_2",}, | ||
280 | {0x0900, "BB2D",}, | ||
281 | {0xdead, L3_TARGET_NOT_SUPPORTED,}, | ||
282 | {0x2100, "L4_PER1_P3",}, | ||
283 | {0x1c00, "L4_PER1_P1",}, | ||
284 | {0x1f00, "L4_PER1_P2",}, | ||
285 | {0x2300, "L4_PER2_P1",}, | ||
286 | {0x2400, "L4_PER2_P2",}, | ||
287 | {0x2600, "L4_PER3_P1",}, | ||
288 | {0x2700, "L4_PER3_P2",}, | ||
289 | {0x2f00, "MCASP1",}, | ||
290 | {0x3000, "MCASP2",}, | ||
291 | {0x3100, "MCASP3",}, | ||
292 | {0x2800, "MMU2",}, | ||
293 | {0x0f00, "OCMC_RAM1",}, | ||
294 | {0x1700, "OCMC_RAM2",}, | ||
295 | {0x1900, "OCMC_RAM3",}, | ||
296 | {0x1e00, "OCMC_ROM",}, | ||
297 | {0x3900, "QSPI",}, | ||
298 | }; | ||
299 | |||
300 | static struct l3_flagmux_data dra_l3_flagmux_clk2 = { | ||
301 | .offset = 0x803600, | ||
302 | .l3_targ = dra_l3_target_data_clk2, | ||
303 | .num_targ_data = ARRAY_SIZE(dra_l3_target_data_clk2), | ||
304 | }; | ||
305 | |||
306 | static struct l3_target_data dra_l3_target_data_clk3[] = { | ||
307 | {0x0100, "L3_INSTR"}, | ||
308 | {0x0300, "DEBUGSS_CT_TBR"}, | ||
309 | {0x0, "HOST CLK3"}, | ||
310 | }; | ||
311 | |||
312 | static struct l3_flagmux_data dra_l3_flagmux_clk3 = { | ||
313 | .offset = 0x200, | ||
314 | .l3_targ = dra_l3_target_data_clk3, | ||
315 | .num_targ_data = ARRAY_SIZE(dra_l3_target_data_clk3), | ||
316 | }; | ||
317 | |||
318 | static struct l3_masters_data dra_l3_masters[] = { | ||
319 | { 0x0, "MPU" }, | ||
320 | { 0x4, "CS_DAP" }, | ||
321 | { 0x5, "IEEE1500_2_OCP" }, | ||
322 | { 0x8, "DSP1_MDMA" }, | ||
323 | { 0x9, "DSP1_CFG" }, | ||
324 | { 0xA, "DSP1_DMA" }, | ||
325 | { 0xB, "DSP2_MDMA" }, | ||
326 | { 0xC, "DSP2_CFG" }, | ||
327 | { 0xD, "DSP2_DMA" }, | ||
328 | { 0xE, "IVA" }, | ||
329 | { 0x10, "EVE1_P1" }, | ||
330 | { 0x11, "EVE2_P1" }, | ||
331 | { 0x12, "EVE3_P1" }, | ||
332 | { 0x13, "EVE4_P1" }, | ||
333 | { 0x14, "PRUSS1 PRU1" }, | ||
334 | { 0x15, "PRUSS1 PRU2" }, | ||
335 | { 0x16, "PRUSS2 PRU1" }, | ||
336 | { 0x17, "PRUSS2 PRU2" }, | ||
337 | { 0x18, "IPU1" }, | ||
338 | { 0x19, "IPU2" }, | ||
339 | { 0x1A, "SDMA" }, | ||
340 | { 0x1B, "CDMA" }, | ||
341 | { 0x1C, "TC1_EDMA" }, | ||
342 | { 0x1D, "TC2_EDMA" }, | ||
343 | { 0x20, "DSS" }, | ||
344 | { 0x21, "MMU1" }, | ||
345 | { 0x22, "PCIE1" }, | ||
346 | { 0x23, "MMU2" }, | ||
347 | { 0x24, "VIP1" }, | ||
348 | { 0x25, "VIP2" }, | ||
349 | { 0x26, "VIP3" }, | ||
350 | { 0x27, "VPE" }, | ||
351 | { 0x28, "GPU_P1" }, | ||
352 | { 0x29, "BB2D" }, | ||
353 | { 0x29, "GPU_P2" }, | ||
354 | { 0x2B, "GMAC_SW" }, | ||
355 | { 0x2C, "USB3" }, | ||
356 | { 0x2D, "USB2_SS" }, | ||
357 | { 0x2E, "USB2_ULPI_SS1" }, | ||
358 | { 0x2F, "USB2_ULPI_SS2" }, | ||
359 | { 0x30, "CSI2_1" }, | ||
360 | { 0x31, "CSI2_2" }, | ||
361 | { 0x33, "SATA" }, | ||
362 | { 0x34, "EVE1_P2" }, | ||
363 | { 0x35, "EVE2_P2" }, | ||
364 | { 0x36, "EVE3_P2" }, | ||
365 | { 0x37, "EVE4_P2" } | ||
366 | }; | ||
367 | |||
368 | static struct l3_flagmux_data *dra_l3_flagmux[] = { | ||
369 | &dra_l3_flagmux_clk1, | ||
370 | &dra_l3_flagmux_clk2, | ||
371 | &dra_l3_flagmux_clk3, | ||
372 | }; | ||
373 | |||
374 | static const struct omap_l3 dra_l3_data = { | ||
375 | .l3_base = { [1] = L3_BASE_IS_SUBMODULE }, | ||
376 | .l3_flagmux = dra_l3_flagmux, | ||
377 | .num_modules = ARRAY_SIZE(dra_l3_flagmux), | ||
378 | .l3_masters = dra_l3_masters, | ||
379 | .num_masters = ARRAY_SIZE(dra_l3_masters), | ||
380 | /* The 6 MSBs of register field used to distinguish initiator */ | ||
381 | .mst_addr_mask = 0xFC, | ||
382 | }; | ||
383 | |||
233 | #endif /* __OMAP_L3_NOC_H */ | 384 | #endif /* __OMAP_L3_NOC_H */ |