diff options
-rw-r--r-- | arch/arm/mach-omap2/omap_l3_noc.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_l3_smx.c | 19 |
2 files changed, 12 insertions, 24 deletions
diff --git a/arch/arm/mach-omap2/omap_l3_noc.c b/arch/arm/mach-omap2/omap_l3_noc.c index def3de8b9a65..7b9f1909ddb2 100644 --- a/arch/arm/mach-omap2/omap_l3_noc.c +++ b/arch/arm/mach-omap2/omap_l3_noc.c | |||
@@ -63,10 +63,7 @@ static irqreturn_t l3_interrupt_handler(int irq, void *_l3) | |||
63 | char *source_name; | 63 | char *source_name; |
64 | 64 | ||
65 | /* Get the Type of interrupt */ | 65 | /* Get the Type of interrupt */ |
66 | if (irq == l3->app_irq) | 66 | inttype = irq == l3->app_irq ? L3_APPLICATION_ERROR : L3_DEBUG_ERROR; |
67 | inttype = L3_APPLICATION_ERROR; | ||
68 | else | ||
69 | inttype = L3_DEBUG_ERROR; | ||
70 | 67 | ||
71 | for (i = 0; i < L3_MODULES; i++) { | 68 | for (i = 0; i < L3_MODULES; i++) { |
72 | /* | 69 | /* |
@@ -84,10 +81,10 @@ static irqreturn_t l3_interrupt_handler(int irq, void *_l3) | |||
84 | 81 | ||
85 | err_src = j; | 82 | err_src = j; |
86 | /* Read the stderrlog_main_source from clk domain */ | 83 | /* Read the stderrlog_main_source from clk domain */ |
87 | std_err_main_addr = base + (*(l3_targ[i] + err_src)); | 84 | std_err_main_addr = base + *(l3_targ[i] + err_src); |
88 | std_err_main = readl(std_err_main_addr); | 85 | std_err_main = readl(std_err_main_addr); |
89 | 86 | ||
90 | switch ((std_err_main & CUSTOM_ERROR)) { | 87 | switch (std_err_main & CUSTOM_ERROR) { |
91 | case STANDARD_ERROR: | 88 | case STANDARD_ERROR: |
92 | source_name = | 89 | source_name = |
93 | l3_targ_stderrlog_main_name[i][err_src]; | 90 | l3_targ_stderrlog_main_name[i][err_src]; |
@@ -143,7 +140,7 @@ static int __init omap4_l3_probe(struct platform_device *pdev) | |||
143 | } | 140 | } |
144 | 141 | ||
145 | l3->l3_base[0] = ioremap(res->start, resource_size(res)); | 142 | l3->l3_base[0] = ioremap(res->start, resource_size(res)); |
146 | if (!(l3->l3_base[0])) { | 143 | if (!l3->l3_base[0]) { |
147 | dev_err(&pdev->dev, "ioremap failed\n"); | 144 | dev_err(&pdev->dev, "ioremap failed\n"); |
148 | ret = -ENOMEM; | 145 | ret = -ENOMEM; |
149 | goto err0; | 146 | goto err0; |
@@ -157,7 +154,7 @@ static int __init omap4_l3_probe(struct platform_device *pdev) | |||
157 | } | 154 | } |
158 | 155 | ||
159 | l3->l3_base[1] = ioremap(res->start, resource_size(res)); | 156 | l3->l3_base[1] = ioremap(res->start, resource_size(res)); |
160 | if (!(l3->l3_base[1])) { | 157 | if (!l3->l3_base[1]) { |
161 | dev_err(&pdev->dev, "ioremap failed\n"); | 158 | dev_err(&pdev->dev, "ioremap failed\n"); |
162 | ret = -ENOMEM; | 159 | ret = -ENOMEM; |
163 | goto err1; | 160 | goto err1; |
@@ -171,7 +168,7 @@ static int __init omap4_l3_probe(struct platform_device *pdev) | |||
171 | } | 168 | } |
172 | 169 | ||
173 | l3->l3_base[2] = ioremap(res->start, resource_size(res)); | 170 | l3->l3_base[2] = ioremap(res->start, resource_size(res)); |
174 | if (!(l3->l3_base[2])) { | 171 | if (!l3->l3_base[2]) { |
175 | dev_err(&pdev->dev, "ioremap failed\n"); | 172 | dev_err(&pdev->dev, "ioremap failed\n"); |
176 | ret = -ENOMEM; | 173 | ret = -ENOMEM; |
177 | goto err2; | 174 | goto err2; |
diff --git a/arch/arm/mach-omap2/omap_l3_smx.c b/arch/arm/mach-omap2/omap_l3_smx.c index 45aaa5cb97f3..6a7d87b6bcb4 100644 --- a/arch/arm/mach-omap2/omap_l3_smx.c +++ b/arch/arm/mach-omap2/omap_l3_smx.c | |||
@@ -155,7 +155,7 @@ static irqreturn_t omap3_l3_block_irq(struct omap3_l3 *l3, | |||
155 | u8 multi = error & L3_ERROR_LOG_MULTI; | 155 | u8 multi = error & L3_ERROR_LOG_MULTI; |
156 | u32 address = omap3_l3_decode_addr(error_addr); | 156 | u32 address = omap3_l3_decode_addr(error_addr); |
157 | 157 | ||
158 | WARN(true, "%s Error seen by %s %s at address %x\n", | 158 | WARN(true, "%s seen by %s %s at address %x\n", |
159 | omap3_l3_code_string(code), | 159 | omap3_l3_code_string(code), |
160 | omap3_l3_initiator_string(initid), | 160 | omap3_l3_initiator_string(initid), |
161 | multi ? "Multiple Errors" : "", | 161 | multi ? "Multiple Errors" : "", |
@@ -167,21 +167,15 @@ static irqreturn_t omap3_l3_block_irq(struct omap3_l3 *l3, | |||
167 | static irqreturn_t omap3_l3_app_irq(int irq, void *_l3) | 167 | static irqreturn_t omap3_l3_app_irq(int irq, void *_l3) |
168 | { | 168 | { |
169 | struct omap3_l3 *l3 = _l3; | 169 | struct omap3_l3 *l3 = _l3; |
170 | |||
171 | u64 status, clear; | 170 | u64 status, clear; |
172 | u64 error; | 171 | u64 error; |
173 | u64 error_addr; | 172 | u64 error_addr; |
174 | u64 err_source = 0; | 173 | u64 err_source = 0; |
175 | void __iomem *base; | 174 | void __iomem *base; |
176 | int int_type; | 175 | int int_type; |
177 | |||
178 | irqreturn_t ret = IRQ_NONE; | 176 | irqreturn_t ret = IRQ_NONE; |
179 | 177 | ||
180 | if (irq == l3->app_irq) | 178 | int_type = irq == l3->app_irq ? L3_APPLICATION_ERROR : L3_DEBUG_ERROR; |
181 | int_type = L3_APPLICATION_ERROR; | ||
182 | else | ||
183 | int_type = L3_DEBUG_ERROR; | ||
184 | |||
185 | if (!int_type) { | 179 | if (!int_type) { |
186 | status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_0); | 180 | status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_0); |
187 | /* | 181 | /* |
@@ -202,7 +196,6 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3) | |||
202 | for (err_source = 0; !(status & (1 << err_source)); err_source++) | 196 | for (err_source = 0; !(status & (1 << err_source)); err_source++) |
203 | ; | 197 | ; |
204 | error = omap3_l3_readll(base, L3_ERROR_LOG); | 198 | error = omap3_l3_readll(base, L3_ERROR_LOG); |
205 | |||
206 | if (error) { | 199 | if (error) { |
207 | error_addr = omap3_l3_readll(base, L3_ERROR_LOG_ADDR); | 200 | error_addr = omap3_l3_readll(base, L3_ERROR_LOG_ADDR); |
208 | 201 | ||
@@ -210,9 +203,8 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3) | |||
210 | } | 203 | } |
211 | 204 | ||
212 | /* Clear the status register */ | 205 | /* Clear the status register */ |
213 | clear = ((L3_AGENT_STATUS_CLEAR_IA << int_type) | | 206 | clear = (L3_AGENT_STATUS_CLEAR_IA << int_type) | |
214 | (L3_AGENT_STATUS_CLEAR_TA)); | 207 | L3_AGENT_STATUS_CLEAR_TA; |
215 | |||
216 | omap3_l3_writell(base, L3_AGENT_STATUS, clear); | 208 | omap3_l3_writell(base, L3_AGENT_STATUS, clear); |
217 | 209 | ||
218 | /* clear the error log register */ | 210 | /* clear the error log register */ |
@@ -240,7 +232,7 @@ static int __init omap3_l3_probe(struct platform_device *pdev) | |||
240 | goto err0; | 232 | goto err0; |
241 | } | 233 | } |
242 | l3->rt = ioremap(res->start, resource_size(res)); | 234 | l3->rt = ioremap(res->start, resource_size(res)); |
243 | if (!(l3->rt)) { | 235 | if (!l3->rt) { |
244 | dev_err(&pdev->dev, "ioremap failed\n"); | 236 | dev_err(&pdev->dev, "ioremap failed\n"); |
245 | ret = -ENOMEM; | 237 | ret = -ENOMEM; |
246 | goto err0; | 238 | goto err0; |
@@ -259,7 +251,6 @@ static int __init omap3_l3_probe(struct platform_device *pdev) | |||
259 | ret = request_irq(l3->app_irq, omap3_l3_app_irq, | 251 | ret = request_irq(l3->app_irq, omap3_l3_app_irq, |
260 | IRQF_DISABLED | IRQF_TRIGGER_RISING, | 252 | IRQF_DISABLED | IRQF_TRIGGER_RISING, |
261 | "l3-app-irq", l3); | 253 | "l3-app-irq", l3); |
262 | |||
263 | if (ret) { | 254 | if (ret) { |
264 | dev_err(&pdev->dev, "couldn't request app irq\n"); | 255 | dev_err(&pdev->dev, "couldn't request app irq\n"); |
265 | goto err2; | 256 | goto err2; |