Skip to content

Commit 06b88f1

Browse files
committed
dart: Detect locked t8110 DARTs
Signed-off-by: Hector Martin <[email protected]>
1 parent 2b2dd9a commit 06b88f1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/dart.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ dart_dev_t *dart_init(uintptr_t base, u8 device, bool keep_pts, enum dart_type_t
231231
set32(dart->regs + DART_T8020_ENABLED_STREAMS, BIT(device & 0x1f));
232232
break;
233233
case DART_T8110:
234-
// TODO locked dart
234+
if (read32(dart->regs + DART_T8110_PROTECT) & DART_T8110_PROTECT_TTBR_TCR)
235+
dart->locked = true;
235236
write32(dart->regs + DART_T8110_ENABLE_STREAMS + 4 * (device >> 5), BIT(device & 0x1f));
236237
break;
237238
}

0 commit comments

Comments
 (0)