From owner-p4-projects@FreeBSD.ORG Wed Feb 22 19:23:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9555E16A423; Wed, 22 Feb 2006 19:23:36 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6AD9A16A420 for ; Wed, 22 Feb 2006 19:23:36 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6498943D75 for ; Wed, 22 Feb 2006 19:23:34 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k1MJNYR9074100 for ; Wed, 22 Feb 2006 19:23:34 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k1MJNYtq074097 for perforce@freebsd.org; Wed, 22 Feb 2006 19:23:34 GMT (envelope-from imp@freebsd.org) Date: Wed, 22 Feb 2006 19:23:34 GMT Message-Id: <200602221923.k1MJNYtq074097@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 92221 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2006 19:23:37 -0000 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); }