Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251836
b: refs/heads/master
c: 35f7b96
h: refs/heads/master
v: v3
  • Loading branch information
omar ramirez authored and Tony Lindgren committed May 3, 2011
1 parent 1e1bd43 commit ba48ecc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7529b703869d59e799a0c0eb4f3df7a418f7dc99
refs/heads/master: 35f7b961054021fd89b73a15988f10d38da71beb
17 changes: 7 additions & 10 deletions trunk/arch/arm/mach-omap2/omap_l3_noc.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ static irqreturn_t l3_interrupt_handler(int irq, void *_l3)
char *source_name;

/* Get the Type of interrupt */
if (irq == l3->app_irq)
inttype = L3_APPLICATION_ERROR;
else
inttype = L3_DEBUG_ERROR;
inttype = irq == l3->app_irq ? L3_APPLICATION_ERROR : L3_DEBUG_ERROR;

for (i = 0; i < L3_MODULES; i++) {
/*
Expand All @@ -84,10 +81,10 @@ static irqreturn_t l3_interrupt_handler(int irq, void *_l3)

err_src = j;
/* Read the stderrlog_main_source from clk domain */
std_err_main_addr = base + (*(l3_targ[i] + err_src));
std_err_main = readl(std_err_main_addr);
std_err_main_addr = base + *(l3_targ[i] + err_src);
std_err_main = readl(std_err_main_addr);

switch ((std_err_main & CUSTOM_ERROR)) {
switch (std_err_main & CUSTOM_ERROR) {
case STANDARD_ERROR:
source_name =
l3_targ_stderrlog_main_name[i][err_src];
Expand Down Expand Up @@ -143,7 +140,7 @@ static int __init omap4_l3_probe(struct platform_device *pdev)
}

l3->l3_base[0] = ioremap(res->start, resource_size(res));
if (!(l3->l3_base[0])) {
if (!l3->l3_base[0]) {
dev_err(&pdev->dev, "ioremap failed\n");
ret = -ENOMEM;
goto err0;
Expand All @@ -157,7 +154,7 @@ static int __init omap4_l3_probe(struct platform_device *pdev)
}

l3->l3_base[1] = ioremap(res->start, resource_size(res));
if (!(l3->l3_base[1])) {
if (!l3->l3_base[1]) {
dev_err(&pdev->dev, "ioremap failed\n");
ret = -ENOMEM;
goto err1;
Expand All @@ -171,7 +168,7 @@ static int __init omap4_l3_probe(struct platform_device *pdev)
}

l3->l3_base[2] = ioremap(res->start, resource_size(res));
if (!(l3->l3_base[2])) {
if (!l3->l3_base[2]) {
dev_err(&pdev->dev, "ioremap failed\n");
ret = -ENOMEM;
goto err2;
Expand Down
19 changes: 5 additions & 14 deletions trunk/arch/arm/mach-omap2/omap_l3_smx.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static irqreturn_t omap3_l3_block_irq(struct omap3_l3 *l3,
u8 multi = error & L3_ERROR_LOG_MULTI;
u32 address = omap3_l3_decode_addr(error_addr);

WARN(true, "%s Error seen by %s %s at address %x\n",
WARN(true, "%s seen by %s %s at address %x\n",
omap3_l3_code_string(code),
omap3_l3_initiator_string(initid),
multi ? "Multiple Errors" : "",
Expand All @@ -167,21 +167,15 @@ static irqreturn_t omap3_l3_block_irq(struct omap3_l3 *l3,
static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)
{
struct omap3_l3 *l3 = _l3;

u64 status, clear;
u64 error;
u64 error_addr;
u64 err_source = 0;
void __iomem *base;
int int_type;

irqreturn_t ret = IRQ_NONE;

if (irq == l3->app_irq)
int_type = L3_APPLICATION_ERROR;
else
int_type = L3_DEBUG_ERROR;

int_type = irq == l3->app_irq ? L3_APPLICATION_ERROR : L3_DEBUG_ERROR;
if (!int_type) {
status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_0);
/*
Expand All @@ -202,17 +196,15 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)
for (err_source = 0; !(status & (1 << err_source)); err_source++)
;
error = omap3_l3_readll(base, L3_ERROR_LOG);

if (error) {
error_addr = omap3_l3_readll(base, L3_ERROR_LOG_ADDR);

ret |= omap3_l3_block_irq(l3, error, error_addr);
}

/* Clear the status register */
clear = ((L3_AGENT_STATUS_CLEAR_IA << int_type) |
(L3_AGENT_STATUS_CLEAR_TA));

clear = (L3_AGENT_STATUS_CLEAR_IA << int_type) |
L3_AGENT_STATUS_CLEAR_TA;
omap3_l3_writell(base, L3_AGENT_STATUS, clear);

/* clear the error log register */
Expand Down Expand Up @@ -240,7 +232,7 @@ static int __init omap3_l3_probe(struct platform_device *pdev)
goto err0;
}
l3->rt = ioremap(res->start, resource_size(res));
if (!(l3->rt)) {
if (!l3->rt) {
dev_err(&pdev->dev, "ioremap failed\n");
ret = -ENOMEM;
goto err0;
Expand All @@ -259,7 +251,6 @@ static int __init omap3_l3_probe(struct platform_device *pdev)
ret = request_irq(l3->app_irq, omap3_l3_app_irq,
IRQF_DISABLED | IRQF_TRIGGER_RISING,
"l3-app-irq", l3);

if (ret) {
dev_err(&pdev->dev, "couldn't request app irq\n");
goto err2;
Expand Down

0 comments on commit ba48ecc

Please sign in to comment.