sricharan | ed0e352 | 2011-08-24 20:07:45 +0530 | [diff] [blame] | 1 | /* |
Sricharan R | c10d5c9 | 2014-04-11 13:09:36 -0500 | [diff] [blame] | 2 | * OMAP L3 Interconnect error handling driver header |
sricharan | ed0e352 | 2011-08-24 20:07:45 +0530 | [diff] [blame] | 3 | * |
Nishanth Menon | c5f2aea | 2014-04-11 13:15:43 -0500 | [diff] [blame] | 4 | * Copyright (C) 2011-2014 Texas Instruments Incorporated - http://www.ti.com/ |
sricharan | ed0e352 | 2011-08-24 20:07:45 +0530 | [diff] [blame] | 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 |
Nishanth Menon | c5f2aea | 2014-04-11 13:15:43 -0500 | [diff] [blame] | 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. |
sricharan | ed0e352 | 2011-08-24 20:07:45 +0530 | [diff] [blame] | 11 | * |
Nishanth Menon | c5f2aea | 2014-04-11 13:15:43 -0500 | [diff] [blame] | 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 |
sricharan | ed0e352 | 2011-08-24 20:07:45 +0530 | [diff] [blame] | 15 | * GNU General Public License for more details. |
sricharan | ed0e352 | 2011-08-24 20:07:45 +0530 | [diff] [blame] | 16 | */ |
Sricharan R | c10d5c9 | 2014-04-11 13:09:36 -0500 | [diff] [blame] | 17 | #ifndef __OMAP_L3_NOC_H |
| 18 | #define __OMAP_L3_NOC_H |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 19 | |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 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 |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 25 | #define L3_APPLICATION_ERROR 0x0 |
| 26 | #define L3_DEBUG_ERROR 0x1 |
| 27 | |
Todd Poynor | 342fd14 | 2011-08-24 19:11:39 +0530 | [diff] [blame] | 28 | /* L3 TARG register offsets */ |
sricharan | ed0e352 | 2011-08-24 20:07:45 +0530 | [diff] [blame] | 29 | #define L3_TARG_STDERRLOG_MAIN 0x48 |
| 30 | #define L3_TARG_STDERRLOG_SLVOFSLSB 0x5c |
sricharan | 551a9fa | 2011-09-07 17:25:16 +0530 | [diff] [blame] | 31 | #define L3_TARG_STDERRLOG_MSTADDR 0x68 |
sricharan | ed0e352 | 2011-08-24 20:07:45 +0530 | [diff] [blame] | 32 | #define L3_FLAGMUX_REGERR0 0xc |
Todd Poynor | 342fd14 | 2011-08-24 19:11:39 +0530 | [diff] [blame] | 33 | |
sricharan | 551a9fa | 2011-09-07 17:25:16 +0530 | [diff] [blame] | 34 | #define NUM_OF_L3_MASTERS (sizeof(l3_masters)/sizeof(l3_masters[0])) |
| 35 | |
Nishanth Menon | f0a6e65 | 2014-04-11 10:11:59 -0500 | [diff] [blame] | 36 | /** |
| 37 | * struct l3_masters_data - L3 Master information |
| 38 | * @id: ID of the L3 Master |
| 39 | * @name: master name |
| 40 | */ |
| 41 | struct l3_masters_data { |
| 42 | u32 id; |
| 43 | char *name; |
| 44 | }; |
| 45 | |
Nishanth Menon | 3ae9af7 | 2014-04-11 11:38:10 -0500 | [diff] [blame^] | 46 | /** |
| 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 | */ |
| 53 | struct l3_target_data { |
| 54 | u32 offset; |
| 55 | char *name; |
| 56 | }; |
| 57 | |
sricharan | 6616aac | 2011-08-23 12:58:48 +0530 | [diff] [blame] | 58 | static u32 l3_flagmux[L3_MODULES] = { |
Todd Poynor | 342fd14 | 2011-08-24 19:11:39 +0530 | [diff] [blame] | 59 | 0x500, |
| 60 | 0x1000, |
| 61 | 0X0200 |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 62 | }; |
| 63 | |
Nishanth Menon | 3ae9af7 | 2014-04-11 11:38:10 -0500 | [diff] [blame^] | 64 | static 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 Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 72 | }; |
| 73 | |
Nishanth Menon | 3ae9af7 | 2014-04-11 11:38:10 -0500 | [diff] [blame^] | 74 | static 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 Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 96 | }; |
| 97 | |
Nishanth Menon | 3ae9af7 | 2014-04-11 11:38:10 -0500 | [diff] [blame^] | 98 | static struct l3_target_data l3_target_inst_data_clk3[] = { |
| 99 | {0x0100, "EMUSS",}, |
| 100 | {0x0300, "DEBUG SOURCE",}, |
| 101 | {0x0, "HOST CLK3",}, |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 102 | }; |
| 103 | |
Nishanth Menon | f0a6e65 | 2014-04-11 10:11:59 -0500 | [diff] [blame] | 104 | static struct l3_masters_data l3_masters[] = { |
sricharan | 551a9fa | 2011-09-07 17:25:16 +0530 | [diff] [blame] | 105 | { 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 Menon | 3ae9af7 | 2014-04-11 11:38:10 -0500 | [diff] [blame^] | 132 | static 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 Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 136 | }; |
| 137 | |
Sricharan R | c10d5c9 | 2014-04-11 13:09:36 -0500 | [diff] [blame] | 138 | struct omap_l3 { |
sricharan | ed0e352 | 2011-08-24 20:07:45 +0530 | [diff] [blame] | 139 | struct device *dev; |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 140 | |
| 141 | /* memory base */ |
Todd Poynor | 342fd14 | 2011-08-24 19:11:39 +0530 | [diff] [blame] | 142 | void __iomem *l3_base[L3_MODULES]; |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 143 | |
sricharan | ed0e352 | 2011-08-24 20:07:45 +0530 | [diff] [blame] | 144 | int debug_irq; |
| 145 | int app_irq; |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 146 | }; |
Sricharan R | c10d5c9 | 2014-04-11 13:09:36 -0500 | [diff] [blame] | 147 | |
| 148 | #endif /* __OMAP_L3_NOC_H */ |