Skip to content

Commit 0844db0

Browse files
marcanjannau
authored andcommitted
iommu: apple-dart: Clear stream error indicator bits for T8110 DARTs
These registers exist at least on the t602x variant, and if not cleared the IRQ will never clear. Signed-off-by: Hector Martin <marcan@marcan.st>
1 parent 85e1993 commit 0844db0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/iommu/apple-dart.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@
123123
#define DART_T8110_ERROR_ADDR_LO 0x170
124124
#define DART_T8110_ERROR_ADDR_HI 0x174
125125

126+
#define DART_T8110_ERROR_STREAMS 0x1c0
127+
126128
#define DART_T8110_PROTECT 0x200
127129
#define DART_T8110_UNPROTECT 0x204
128130
#define DART_T8110_PROTECT_LOCK 0x208
@@ -1231,6 +1233,7 @@ static irqreturn_t apple_dart_t8110_irq(int irq, void *dev)
12311233
u32 addr_hi = readl(dart->regs + DART_T8110_ERROR_ADDR_HI);
12321234
u64 addr = addr_lo | (((u64)addr_hi) << 32);
12331235
u8 stream_idx = FIELD_GET(DART_T8110_ERROR_STREAM, error);
1236+
int i;
12341237

12351238
if (!(error & DART_T8110_ERROR_FLAG))
12361239
return IRQ_NONE;
@@ -1257,6 +1260,9 @@ static irqreturn_t apple_dart_t8110_irq(int irq, void *dev)
12571260
error, stream_idx, error_code, fault_name, addr);
12581261

12591262
writel(error, dart->regs + DART_T8110_ERROR);
1263+
for (i = 0; i < BITS_TO_U32(dart->num_streams); i++)
1264+
writel(U32_MAX, dart->regs + DART_T8110_ERROR_STREAMS + 4 * i);
1265+
12601266
return IRQ_HANDLED;
12611267
}
12621268

0 commit comments

Comments
 (0)