Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/sa11x0 Always clear SA11x0 GPIO in interrupt ha...
details: https://anonhg.NetBSD.org/src/rev/1e5bffa1192e
branches: trunk
changeset: 535251:1e5bffa1192e
user: rjs <rjs%NetBSD.org@localhost>
date: Mon Aug 12 22:26:41 2002 +0000
description:
Always clear SA11x0 GPIO in interrupt handler.
diffstat:
sys/arch/arm/sa11x0/sa1111.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diffs (35 lines):
diff -r 20614f145f5d -r 1e5bffa1192e sys/arch/arm/sa11x0/sa1111.c
--- a/sys/arch/arm/sa11x0/sa1111.c Mon Aug 12 21:52:37 2002 +0000
+++ b/sys/arch/arm/sa11x0/sa1111.c Mon Aug 12 22:26:41 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sa1111.c,v 1.4 2002/07/19 19:07:33 ichiro Exp $ */
+/* $NetBSD: sa1111.c,v 1.5 2002/08/12 22:26:41 rjs Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -217,11 +217,12 @@
bus_space_read_4(sc->sc_iot, sc->sc_ioh, SACCIC_INTSTATCLR1);
DPRINTF(("sacc_intr_dispatch: %x %x\n", intstat.lo, intstat.hi));
+ /* clear SA1110's GPIO intr status */
+ bus_space_write_4(sc->sc_piot, sc->sc_gpioh,
+ SAGPIO_EDR, sc->sc_gpiomask);
+
for(i = 0, mask = 1; i < 32; i++, mask <<= 1)
if (intstat.lo & mask) {
- /* clear SA1110's GPIO intr status */
- bus_space_write_4(sc->sc_piot, sc->sc_gpioh,
- SAGPIO_EDR, sc->sc_gpiomask);
/*
* Clear intr status before calling intr handlers.
* This cause stray interrupts, but clearing
@@ -237,9 +238,6 @@
}
for(i = 0, mask = 1; i < SACCIC_LEN - 32; i++, mask <<= 1)
if (intstat.hi & mask) {
- /* clear SA1110's GPIO intr status */
- bus_space_write_4(sc->sc_piot, sc->sc_gpioh,
- SAGPIO_EDR, sc->sc_gpiomask);
bus_space_write_4(sc->sc_iot, sc->sc_ioh,
SACCIC_INTSTATCLR1, 1 << i);
#ifdef hpcarm
Home |
Main Index |
Thread Index |
Old Index