Skip to content

Commit 077218f

Browse files
committed
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 <[email protected]>
1 parent dcf43a4 commit 077218f

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
@@ -1106,6 +1108,7 @@ static irqreturn_t apple_dart_t8110_irq(int irq, void *dev)
11061108
u32 addr_hi = readl(dart->regs + DART_T8110_ERROR_ADDR_HI);
11071109
u64 addr = addr_lo | (((u64)addr_hi) << 32);
11081110
u8 stream_idx = FIELD_GET(DART_T8110_ERROR_STREAM, error);
1111+
int i;
11091112

11101113
if (!(error & DART_T8110_ERROR_FLAG))
11111114
return IRQ_NONE;
@@ -1132,6 +1135,9 @@ static irqreturn_t apple_dart_t8110_irq(int irq, void *dev)
11321135
error, stream_idx, error_code, fault_name, addr);
11331136

11341137
writel(error, dart->regs + DART_T8110_ERROR);
1138+
for (i = 0; i < BITS_TO_U32(dart->num_streams); i++)
1139+
writel(U32_MAX, dart->regs + DART_T8110_ERROR_STREAMS + 4 * i);
1140+
11351141
return IRQ_HANDLED;
11361142
}
11371143

0 commit comments

Comments
 (0)