Skip to content

Commit bcd262f

Browse files
marcanopsiff
authored andcommitted
iommu/apple-dart: Clear stream error indicator bits for T8110 DARTs
[ Upstream commit ecf6508 ] These registers exist and at least on the t602x variant the IRQ only clears when theses are cleared. Signed-off-by: Hector Martin <[email protected]> Signed-off-by: Janne Grunau <[email protected]> Reviewed-by: Sven Peter <[email protected]> Reviewed-by: Neal Gompa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]> Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit aa98b4c1f84cee4a1dc962942921aa24187b48c3) Signed-off-by: Wentao Guan <[email protected]>
1 parent 0c552a3 commit bcd262f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/iommu/apple-dart.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@
121121
#define DART_T8110_ERROR_ADDR_LO 0x170
122122
#define DART_T8110_ERROR_ADDR_HI 0x174
123123

124+
#define DART_T8110_ERROR_STREAMS 0x1c0
125+
124126
#define DART_T8110_PROTECT 0x200
125127
#define DART_T8110_UNPROTECT 0x204
126128
#define DART_T8110_PROTECT_LOCK 0x208
@@ -1041,6 +1043,9 @@ static irqreturn_t apple_dart_t8110_irq(int irq, void *dev)
10411043
error, stream_idx, error_code, fault_name, addr);
10421044

10431045
writel(error, dart->regs + DART_T8110_ERROR);
1046+
for (int i = 0; i < BITS_TO_U32(dart->num_streams); i++)
1047+
writel(U32_MAX, dart->regs + DART_T8110_ERROR_STREAMS + 4 * i);
1048+
10441049
return IRQ_HANDLED;
10451050
}
10461051

0 commit comments

Comments
 (0)