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

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

Change 92221 by imp@imp_Speedy on 2006/02/22 19:22:33

	Now that we have drivers for the PMC and ST, move interrupt
	disabling for those devices into thsoe drivers.

Affected files ...

.. //depot/projects/arm/src/sys/arm/at91/at91.c#9 edit
.. //depot/projects/arm/src/sys/arm/at91/at91_pmc.c#9 edit
.. //depot/projects/arm/src/sys/arm/at91/at91_st.c#4 edit

Differences ...

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

@@ -272,10 +272,6 @@
 	/* XXX */
 	/* Disable all interrupts for RTC (0xe24 == RTC_IDR) */
 	bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0xe24, 0xffffffff);
-	/* Disable all interrupts for PMC (0xc64 == PMC_IDR) */
-	bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0xc64, 0xffffffff);
-	/* Disable all interrupts for ST */
-	bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0xd18, 0xffffffff);
 	/* DIsable all interrupts for DBGU */
 	bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0x20c, 0xffffffff);
 	/* Disable all interrupts for PIOA */
@@ -288,6 +284,7 @@
 	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 */
 	i = 0;
 	at91_add_child(dev, i++, "at91_st", 0, 0, 0, AT91RM92_IRQ_SYSTEM);
 	at91_add_child(dev, i++, "at91_pio", 0, AT91RM92_BASE +	// PIOA

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

@@ -283,7 +283,10 @@
 	    freq / 1000000, mck.hz / 1000000);
 	WR4(sc, PMC_SCDR, PMC_SCER_PCK0 | PMC_SCER_PCK1 | PMC_SCER_PCK2 |
 	    PMC_SCER_PCK3);
+	/* XXX -- enable all PMC clocks */
 	WR4(sc, PMC_PCER, 0xffffffff);
+	/* Disable all interrupts for PMC */
+	WR4(sc, PMC_IDR, 0xffffffff);
 }
 
 static void

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

@@ -102,7 +102,8 @@
 	 * initializing clocks so that DELAY works.
 	 */
 	WR4(ST_RTMR, 1);
-
+	/* Disable all interrupts */
+	WR4(ST_IDR, 0xffffffff);
 	return (0);
 }
 



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