diff options
author | Nishanth Menon <nm@ti.com> | 2014-04-16 12:01:02 -0400 |
---|---|---|
committer | Nishanth Menon <nm@ti.com> | 2014-05-05 15:33:46 -0400 |
commit | d4d8819e205854cc102e366f30b8eadd60a58e97 (patch) | |
tree | 410e8709f090a439c50012b6fec0bfefcf780553 | |
parent | 97708c08c9955306742872ff7f2e47faec864ee7 (diff) |
bus: omap_l3_noc: fix masterid detection
As per Documentation (OMAP4+), then masterid is infact encoded as
follows:
"L3_TARG_STDERRLOG_MSTADDR[7:0] STDERRLOG_MSTADDR stores the NTTP
master address. The master address is the concatenation of Prefix &
Initiator ConnID. It is defined on 8 bits. The 6 MSBs are used to
distinguish the different initiators."
So, when we matchup currently with the master ID list, we never get a
proper match other than when MPU is the master (thanks to 0).
Now, on other platforms such as AM437x, this tends to be bits[5:0].
Fix this by using the relevant 6MSBits to identify the master ID for
standard and custom errors.
Reported-by: Darren Etheridge <detheridge@ti.com>
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-- | drivers/bus/omap_l3_noc.c | 6 | ||||
-rw-r--r-- | drivers/bus/omap_l3_noc.h | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c index 9524452ee12c..8a1926daacd7 100644 --- a/drivers/bus/omap_l3_noc.c +++ b/drivers/bus/omap_l3_noc.c | |||
@@ -127,7 +127,11 @@ static irqreturn_t l3_interrupt_handler(int irq, void *_l3) | |||
127 | L3_TARG_STDERRLOG_MSTADDR; | 127 | L3_TARG_STDERRLOG_MSTADDR; |
128 | 128 | ||
129 | std_err_main = readl_relaxed(l3_targ_stderr); | 129 | std_err_main = readl_relaxed(l3_targ_stderr); |
130 | masterid = readl_relaxed(l3_targ_mstaddr); | 130 | |
131 | /* STDERRLOG_MSTADDR Stores the NTTP master address. */ | ||
132 | masterid = (readl_relaxed(l3_targ_mstaddr) & | ||
133 | l3->mst_addr_mask) >> | ||
134 | __ffs(l3->mst_addr_mask); | ||
131 | 135 | ||
132 | switch (std_err_main & CUSTOM_ERROR) { | 136 | switch (std_err_main & CUSTOM_ERROR) { |
133 | case STANDARD_ERROR: | 137 | case STANDARD_ERROR: |
diff --git a/drivers/bus/omap_l3_noc.h b/drivers/bus/omap_l3_noc.h index 64869fe656e5..ba8692444665 100644 --- a/drivers/bus/omap_l3_noc.h +++ b/drivers/bus/omap_l3_noc.h | |||
@@ -84,6 +84,7 @@ struct l3_flagmux_data { | |||
84 | * @l3_masters: array pointing to master data containing name and register | 84 | * @l3_masters: array pointing to master data containing name and register |
85 | * offset for the master. | 85 | * offset for the master. |
86 | * @num_master: number of masters | 86 | * @num_master: number of masters |
87 | * @mst_addr_mask: Mask representing MSTADDR information of NTTP packet | ||
87 | * @debug_irq: irq number of the debug interrupt (populated runtime) | 88 | * @debug_irq: irq number of the debug interrupt (populated runtime) |
88 | * @app_irq: irq number of the application interrupt (populated runtime) | 89 | * @app_irq: irq number of the application interrupt (populated runtime) |
89 | */ | 90 | */ |
@@ -96,6 +97,7 @@ struct omap_l3 { | |||
96 | 97 | ||
97 | struct l3_masters_data *l3_masters; | 98 | struct l3_masters_data *l3_masters; |
98 | int num_masters; | 99 | int num_masters; |
100 | u32 mst_addr_mask; | ||
99 | 101 | ||
100 | int debug_irq; | 102 | int debug_irq; |
101 | int app_irq; | 103 | int app_irq; |
@@ -200,6 +202,8 @@ static const struct omap_l3 omap_l3_data = { | |||
200 | .num_modules = ARRAY_SIZE(omap_l3_flagmux), | 202 | .num_modules = ARRAY_SIZE(omap_l3_flagmux), |
201 | .l3_masters = omap_l3_masters, | 203 | .l3_masters = omap_l3_masters, |
202 | .num_masters = ARRAY_SIZE(omap_l3_masters), | 204 | .num_masters = ARRAY_SIZE(omap_l3_masters), |
205 | /* The 6 MSBs of register field used to distinguish initiator */ | ||
206 | .mst_addr_mask = 0xFC, | ||
203 | }; | 207 | }; |
204 | 208 | ||
205 | #endif /* __OMAP_L3_NOC_H */ | 209 | #endif /* __OMAP_L3_NOC_H */ |