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 | |
sricharan | 6616aac | 2011-08-23 12:58:48 +0530 | [diff] [blame] | 46 | static u32 l3_flagmux[L3_MODULES] = { |
Todd Poynor | 342fd14 | 2011-08-24 19:11:39 +0530 | [diff] [blame] | 47 | 0x500, |
| 48 | 0x1000, |
| 49 | 0X0200 |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 50 | }; |
| 51 | |
Todd Poynor | 342fd14 | 2011-08-24 19:11:39 +0530 | [diff] [blame] | 52 | /* L3 Target standard Error register offsets */ |
sricharan | 6616aac | 2011-08-23 12:58:48 +0530 | [diff] [blame] | 53 | static u32 l3_targ_inst_clk1[] = { |
Todd Poynor | 342fd14 | 2011-08-24 19:11:39 +0530 | [diff] [blame] | 54 | 0x100, /* DMM1 */ |
| 55 | 0x200, /* DMM2 */ |
| 56 | 0x300, /* ABE */ |
| 57 | 0x400, /* L4CFG */ |
R Sricharan | e17933c | 2011-11-04 15:52:59 +0530 | [diff] [blame] | 58 | 0x600, /* CLK2 PWR DISC */ |
| 59 | 0x0, /* Host CLK1 */ |
| 60 | 0x900 /* L4 Wakeup */ |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 61 | }; |
| 62 | |
sricharan | 6616aac | 2011-08-23 12:58:48 +0530 | [diff] [blame] | 63 | static u32 l3_targ_inst_clk2[] = { |
Todd Poynor | 342fd14 | 2011-08-24 19:11:39 +0530 | [diff] [blame] | 64 | 0x500, /* CORTEX M3 */ |
| 65 | 0x300, /* DSS */ |
| 66 | 0x100, /* GPMC */ |
| 67 | 0x400, /* ISS */ |
| 68 | 0x700, /* IVAHD */ |
| 69 | 0xD00, /* missing in TRM corresponds to AES1*/ |
| 70 | 0x900, /* L4 PER0*/ |
| 71 | 0x200, /* OCMRAM */ |
| 72 | 0x100, /* missing in TRM corresponds to GPMC sERROR*/ |
| 73 | 0x600, /* SGX */ |
| 74 | 0x800, /* SL2 */ |
| 75 | 0x1600, /* C2C */ |
| 76 | 0x1100, /* missing in TRM corresponds PWR DISC CLK1*/ |
| 77 | 0xF00, /* missing in TRM corrsponds to SHA1*/ |
| 78 | 0xE00, /* missing in TRM corresponds to AES2*/ |
| 79 | 0xC00, /* L4 PER3 */ |
| 80 | 0xA00, /* L4 PER1*/ |
R Sricharan | e17933c | 2011-11-04 15:52:59 +0530 | [diff] [blame] | 81 | 0xB00, /* L4 PER2*/ |
| 82 | 0x0, /* HOST CLK2 */ |
| 83 | 0x1800, /* CAL */ |
| 84 | 0x1700 /* LLI */ |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 85 | }; |
| 86 | |
sricharan | 6616aac | 2011-08-23 12:58:48 +0530 | [diff] [blame] | 87 | static u32 l3_targ_inst_clk3[] = { |
R Sricharan | e17933c | 2011-11-04 15:52:59 +0530 | [diff] [blame] | 88 | 0x0100 /* EMUSS */, |
| 89 | 0x0300, /* DEBUGSS_CT_TBR */ |
| 90 | 0x0 /* HOST CLK3 */ |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 91 | }; |
| 92 | |
Nishanth Menon | f0a6e65 | 2014-04-11 10:11:59 -0500 | [diff] [blame^] | 93 | static struct l3_masters_data l3_masters[] = { |
sricharan | 551a9fa | 2011-09-07 17:25:16 +0530 | [diff] [blame] | 94 | { 0x0 , "MPU"}, |
| 95 | { 0x10, "CS_ADP"}, |
| 96 | { 0x14, "xxx"}, |
| 97 | { 0x20, "DSP"}, |
| 98 | { 0x30, "IVAHD"}, |
| 99 | { 0x40, "ISS"}, |
| 100 | { 0x44, "DucatiM3"}, |
| 101 | { 0x48, "FaceDetect"}, |
| 102 | { 0x50, "SDMA_Rd"}, |
| 103 | { 0x54, "SDMA_Wr"}, |
| 104 | { 0x58, "xxx"}, |
| 105 | { 0x5C, "xxx"}, |
| 106 | { 0x60, "SGX"}, |
| 107 | { 0x70, "DSS"}, |
| 108 | { 0x80, "C2C"}, |
| 109 | { 0x88, "xxx"}, |
| 110 | { 0x8C, "xxx"}, |
| 111 | { 0x90, "HSI"}, |
| 112 | { 0xA0, "MMC1"}, |
| 113 | { 0xA4, "MMC2"}, |
| 114 | { 0xA8, "MMC6"}, |
| 115 | { 0xB0, "UNIPRO1"}, |
| 116 | { 0xC0, "USBHOSTHS"}, |
| 117 | { 0xC4, "USBOTGHS"}, |
| 118 | { 0xC8, "USBHOSTFS"} |
| 119 | }; |
| 120 | |
R Sricharan | e17933c | 2011-11-04 15:52:59 +0530 | [diff] [blame] | 121 | static char *l3_targ_inst_name[L3_MODULES][21] = { |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 122 | { |
sricharan | ed0e352 | 2011-08-24 20:07:45 +0530 | [diff] [blame] | 123 | "DMM1", |
| 124 | "DMM2", |
| 125 | "ABE", |
| 126 | "L4CFG", |
| 127 | "CLK2 PWR DISC", |
R Sricharan | e17933c | 2011-11-04 15:52:59 +0530 | [diff] [blame] | 128 | "HOST CLK1", |
| 129 | "L4 WAKEUP" |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 130 | }, |
| 131 | { |
sricharan | ed0e352 | 2011-08-24 20:07:45 +0530 | [diff] [blame] | 132 | "CORTEX M3" , |
| 133 | "DSS ", |
| 134 | "GPMC ", |
| 135 | "ISS ", |
| 136 | "IVAHD ", |
| 137 | "AES1", |
| 138 | "L4 PER0", |
| 139 | "OCMRAM ", |
| 140 | "GPMC sERROR", |
| 141 | "SGX ", |
| 142 | "SL2 ", |
| 143 | "C2C ", |
| 144 | "PWR DISC CLK1", |
| 145 | "SHA1", |
| 146 | "AES2", |
| 147 | "L4 PER3", |
| 148 | "L4 PER1", |
| 149 | "L4 PER2", |
R Sricharan | e17933c | 2011-11-04 15:52:59 +0530 | [diff] [blame] | 150 | "HOST CLK2", |
| 151 | "CAL", |
| 152 | "LLI" |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 153 | }, |
| 154 | { |
sricharan | ed0e352 | 2011-08-24 20:07:45 +0530 | [diff] [blame] | 155 | "EMUSS", |
R Sricharan | e17933c | 2011-11-04 15:52:59 +0530 | [diff] [blame] | 156 | "DEBUG SOURCE", |
| 157 | "HOST CLK3" |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 158 | }, |
| 159 | }; |
| 160 | |
sricharan | 6616aac | 2011-08-23 12:58:48 +0530 | [diff] [blame] | 161 | static u32 *l3_targ[L3_MODULES] = { |
Todd Poynor | 342fd14 | 2011-08-24 19:11:39 +0530 | [diff] [blame] | 162 | l3_targ_inst_clk1, |
| 163 | l3_targ_inst_clk2, |
| 164 | l3_targ_inst_clk3, |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 165 | }; |
| 166 | |
Sricharan R | c10d5c9 | 2014-04-11 13:09:36 -0500 | [diff] [blame] | 167 | struct omap_l3 { |
sricharan | ed0e352 | 2011-08-24 20:07:45 +0530 | [diff] [blame] | 168 | struct device *dev; |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 169 | |
| 170 | /* memory base */ |
Todd Poynor | 342fd14 | 2011-08-24 19:11:39 +0530 | [diff] [blame] | 171 | void __iomem *l3_base[L3_MODULES]; |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 172 | |
sricharan | ed0e352 | 2011-08-24 20:07:45 +0530 | [diff] [blame] | 173 | int debug_irq; |
| 174 | int app_irq; |
Santosh Shilimkar | 2722e56 | 2011-03-07 20:53:10 +0530 | [diff] [blame] | 175 | }; |
Sricharan R | c10d5c9 | 2014-04-11 13:09:36 -0500 | [diff] [blame] | 176 | |
| 177 | #endif /* __OMAP_L3_NOC_H */ |