Clear interrupt status before dispatch handler.

This commit is contained in:
uch 1999-11-07 14:07:50 +00:00
parent 39b5cd452c
commit 2cf4f4b9b6

View File

@ -1,4 +1,4 @@
/* $NetBSD: vrgiu.c,v 1.1.1.1 1999/09/16 12:23:32 takemura Exp $ */
/* $NetBSD: vrgiu.c,v 1.2 1999/11/07 14:07:50 uch Exp $ */
/*-
* Copyright (c) 1999
@ -509,6 +509,9 @@ vrgiu_intr(arg)
printf ("\n");
}
#endif
/* Clear interrupt */
vrgiu_regwrite_4(sc, GIUINTSTAT_REG, vrgiu_regread_4(sc, GIUINTSTAT_REG));
/* Dispatch handler */
for (i = 0; i < MAX_GPIO_INOUT; i++) {
if (reg & (1 << i)) {
@ -518,7 +521,6 @@ vrgiu_intr(arg)
}
}
}
/* Clear interrupt */
vrgiu_regwrite_4(sc, GIUINTSTAT_REG, vrgiu_regread_4(sc, GIUINTSTAT_REG));
return 0;
}