From owner-p4-projects@FreeBSD.ORG Fri Jul 14 05:28:21 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 E50C916A4E8; Fri, 14 Jul 2006 05:28:20 +0000 (UTC) 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 BC86916A4E6 for ; Fri, 14 Jul 2006 05:28:20 +0000 (UTC) (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 8524043D46 for ; Fri, 14 Jul 2006 05:28:20 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6E5SKIi035480 for ; Fri, 14 Jul 2006 05:28:20 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6E5SKYH035477 for perforce@freebsd.org; Fri, 14 Jul 2006 05:28:20 GMT (envelope-from imp@freebsd.org) Date: Fri, 14 Jul 2006 05:28:20 GMT Message-Id: <200607140528.k6E5SKYH035477@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 101519 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: Fri, 14 Jul 2006 05:28:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=101519 Change 101519 by imp@imp_lighthouse on 2006/07/14 05:27:23 Minor style nits Revert part of 1.132: better to put the card in reset than to write a 0 to EXCA_INTR. Writing 0 seems to cause problems on TI bridges (it worked on my Sony with a Ricoh bridge). Affected files ... .. //depot/projects/arm/src/sys/dev/pccbb/pccbb.c#13 edit Differences ... ==== //depot/projects/arm/src/sys/dev/pccbb/pccbb.c#13 (text+ko) ==== @@ -1165,13 +1165,11 @@ int err; DPRINTF(("cbb_pcic_socket_enable:\n")); - /* power down/up the socket to reset */ err = cbb_do_power(brdev); if (err) return (err); exca_reset(&sc->exca[0], child); - return (0); } @@ -1181,15 +1179,12 @@ struct cbb_softc *sc = device_get_softc(brdev); DPRINTF(("cbb_pcic_socket_disable\n")); - - /* Turn off the card's interrupt and leave it in reset */ - exca_putb(&sc->exca[0], EXCA_INTR, 0); + /* reset signal asserting... */ + exca_clrb(&sc->exca[0], EXCA_INTR, EXCA_INTR_RESET); tsleep(sc, PZERO, "cbbP1", hz / 100); - /* power down the socket */ cbb_power(brdev, CARD_OFF); exca_putb(&sc->exca[0], EXCA_PWRCTL, 0); - /* wait 300ms until power fails (Tpf). */ tsleep(sc, PZERO, "cbbP1", hz * 300 / 1000); } @@ -1213,6 +1208,7 @@ cbb_power_disable_socket(device_t brdev, device_t child) { struct cbb_softc *sc = device_get_softc(brdev); + if (sc->flags & CBB_16BIT_CARD) cbb_pcic_power_disable_socket(brdev, child); else @@ -1224,6 +1220,7 @@ struct resource *res) { struct cbb_softc *sc = device_get_softc(brdev); + return (exca_activate_resource(&sc->exca[0], child, type, rid, res)); } @@ -1232,6 +1229,7 @@ int rid, struct resource *res) { struct cbb_softc *sc = device_get_softc(brdev); + return (exca_deactivate_resource(&sc->exca[0], child, type, rid, res)); }