Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Feb 2006 19:46:02 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 92225 for review
Message-ID:  <200602221946.k1MJk2xv075037@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=92225

Change 92225 by imp@imp_Speedy on 2006/02/22 19:45:34

	Disable interrupts in pio attachment.

Affected files ...

.. //depot/projects/arm/src/sys/arm/at91/at91.c#10 edit
.. //depot/projects/arm/src/sys/arm/at91/at91_pio.c#4 edit

Differences ...

==== //depot/projects/arm/src/sys/arm/at91/at91.c#10 (text+ko) ====

@@ -274,14 +274,6 @@
 	bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0xe24, 0xffffffff);
 	/* DIsable all interrupts for DBGU */
 	bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0x20c, 0xffffffff);
-	/* Disable all interrupts for PIOA */
-	bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0x444, 0xffffffff);
-	/* Disable all interrupts for PIOB */
-	bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0x644, 0xffffffff);
-	/* Disable all interrupts for PIOC */
-	bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0x844, 0xffffffff);
-	/* Disable all interrupts for PIOD */
-	bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0xa44, 0xffffffff);
 	/* Disable all interrupts for the SDRAM controller */
 	bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0xfa8, 0xffffffff);
 	/* XXX call a function here */

==== //depot/projects/arm/src/sys/arm/at91/at91_pio.c#4 (text+ko) ====

@@ -121,8 +121,9 @@
 	AT91_PIO_LOCK_INIT(sc);
 
 	/*
-	 * Activate the interrupt
+	 * Activate the interrupt, but disable all interrupts in the hardware
 	 */
+	WR4(sc, PIO_IDR, 0xffffffff);
 	err = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_MISC | INTR_MPSAFE,
 	    at91_pio_intr, sc, &sc->intrhand);
 	if (err) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602221946.k1MJk2xv075037>