|
30 | 30 | #define FABRIC_EN_CFG_ADDR_LOW_0 0x80
|
31 | 31 | #define FABRIC_EN_CFG_ADDR_HI_0 0x84
|
32 | 32 |
|
| 33 | +#define FABRIC_EN_CFG_TARGET_NODE_ADDR_INDEX_0_0 0x100 |
| 34 | +#define FABRIC_EN_CFG_TARGET_NODE_ADDR_LOW_0 0x140 |
| 35 | +#define FABRIC_EN_CFG_TARGET_NODE_ADDR_HI_0 0x144 |
| 36 | + |
33 | 37 | #define FABRIC_MN_INITIATOR_ERR_EN_0 0x200
|
34 | 38 | #define FABRIC_MN_INITIATOR_ERR_FORCE_0 0x204
|
35 |
| -#define FABRIC_MN_INITIATOR_ERR_STATUS_0 0x208 |
36 |
| -#define FABRIC_MN_INITIATOR_ERR_OVERFLOW_STATUS_0 0x20c |
| 39 | +#define FABRIC_MN_INITIATOR_ERR_STATUS_0 0x208 |
| 40 | +#define FABRIC_MN_INITIATOR_ERR_OVERFLOW_STATUS_0 0x20c |
37 | 41 |
|
38 | 42 | #define FABRIC_MN_INITIATOR_LOG_ERR_STATUS_0 0x300
|
39 |
| -#define FABRIC_MN_INITIATOR_LOG_ADDR_LOW_0 0x304 |
| 43 | +#define FABRIC_MN_INITIATOR_LOG_ADDR_LOW_0 0x304 |
40 | 44 | #define FABRIC_MN_INITIATOR_LOG_ADDR_HIGH_0 0x308
|
41 | 45 | #define FABRIC_MN_INITIATOR_LOG_ATTRIBUTES0_0 0x30c
|
42 | 46 | #define FABRIC_MN_INITIATOR_LOG_ATTRIBUTES1_0 0x310
|
@@ -320,6 +324,23 @@ static void tegra234_sw_lookup_target_timeout(struct seq_file *file, struct tegr
|
320 | 324 | }
|
321 | 325 | }
|
322 | 326 |
|
| 327 | +static void tegra234_hw_lookup_target_timeout(struct seq_file *file, struct tegra234_cbb *cbb, |
| 328 | + u8 target_id, u8 fab_id) |
| 329 | +{ |
| 330 | + unsigned int notifier = cbb->fabric->notifier_offset; |
| 331 | + u32 hi, lo; |
| 332 | + u64 addr; |
| 333 | + |
| 334 | + writel(target_id, cbb->regs + notifier + FABRIC_EN_CFG_TARGET_NODE_ADDR_INDEX_0_0); |
| 335 | + |
| 336 | + hi = readl(cbb->regs + notifier + FABRIC_EN_CFG_TARGET_NODE_ADDR_HI_0); |
| 337 | + lo = readl(cbb->regs + notifier + FABRIC_EN_CFG_TARGET_NODE_ADDR_LOW_0); |
| 338 | + |
| 339 | + addr = (u64)hi << 32 | lo; |
| 340 | + |
| 341 | + tegra_cbb_print_err(file, "\t Target Node Addr : %#llx\n", addr); |
| 342 | +} |
| 343 | + |
323 | 344 | static void tegra234_cbb_print_error(struct seq_file *file, struct tegra234_cbb *cbb, u32 status,
|
324 | 345 | u32 overflow)
|
325 | 346 | {
|
@@ -445,8 +466,18 @@ static void print_errlog_err(struct seq_file *file, struct tegra234_cbb *cbb)
|
445 | 466 | if (!cbb->fabric->fab_list[fab_id].is_lookup)
|
446 | 467 | return;
|
447 | 468 |
|
448 |
| - if (!strcmp(cbb->fabric->errors[cbb->type].code, "TIMEOUT_ERR")) |
449 |
| - tegra234_sw_lookup_target_timeout(file, cbb, target_id, fab_id); |
| 469 | + /* |
| 470 | + * If is_lookup field is set in fabric_lookup table of soc data, it |
| 471 | + * means that address lookup of target is supported for Timeout errors. |
| 472 | + * If is_lookup is set and the target_map is not populated making |
| 473 | + * max_targets as zero, then it means HW lookup is to be performed. |
| 474 | + */ |
| 475 | + if (!strcmp(cbb->fabric->errors[cbb->type].code, "TIMEOUT_ERR")) { |
| 476 | + if (cbb->fabric->fab_list[fab_id].max_targets) |
| 477 | + tegra234_sw_lookup_target_timeout(file, cbb, target_id, fab_id); |
| 478 | + else |
| 479 | + tegra234_hw_lookup_target_timeout(file, cbb, target_id, fab_id); |
| 480 | + } |
450 | 481 |
|
451 | 482 | return;
|
452 | 483 | }
|
|
0 commit comments