From owner-p4-projects@FreeBSD.ORG Sat Oct 7 06:40:16 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 29E8C16A416; Sat, 7 Oct 2006 06:40:16 +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 D497816A40F for ; Sat, 7 Oct 2006 06:40:15 +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 8AFAE43D58 for ; Sat, 7 Oct 2006 06:40:15 +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 k976eFj1060062 for ; Sat, 7 Oct 2006 06:40:15 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k976eFK7060056 for perforce@freebsd.org; Sat, 7 Oct 2006 06:40:15 GMT (envelope-from imp@freebsd.org) Date: Sat, 7 Oct 2006 06:40:15 GMT Message-Id: <200610070640.k976eFK7060056@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 107397 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: Sat, 07 Oct 2006 06:40:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=107397 Change 107397 by imp@imp_lighthouse on 2006/10/07 06:39:41 Minor tweaks Affected files ... .. //depot/projects/arm/src/sys/arm/at91/at91_spi.c#9 edit Differences ... ==== //depot/projects/arm/src/sys/arm/at91/at91_spi.c#9 (text+ko) ==== @@ -51,7 +51,7 @@ struct resource *mem_res; /* Memory resource */ bus_dma_tag_t dmatag; /* bus dma tag for mbufs */ bus_dmamap_t map[4]; /* Maps for the transaction */ - volatile int rxdone; + int rxdone; }; static inline uint32_t @@ -128,8 +128,6 @@ WR4(sc, PDC_RCR, 0); WR4(sc, PDC_TPR, 0); WR4(sc, PDC_TCR, 0); - WR4(sc, PDC_PTCR, PDC_PTCR_RXTEN); - WR4(sc, PDC_PTCR, PDC_PTCR_TXTEN); RD4(sc, SPI_RDR); RD4(sc, SPI_SR); @@ -246,7 +244,7 @@ rxdone = sc->rxdone; do { - err = msleep(sc, NULL, PCATCH | PZERO, "spi", hz); + err = msleep(&sc->rxdone, NULL, PCATCH | PZERO, "spi", hz); } while (rxdone == sc->rxdone && err != EINTR); WR4(sc, PDC_PTCR, PDC_PTCR_TXTDIS | PDC_PTCR_RXTDIS); if (err == 0) { @@ -275,7 +273,7 @@ if (sr & SPI_SR_ENDRX) { sc->rxdone++; WR4(sc, SPI_IDR, SPI_SR_ENDRX); - wakeup(sc); + wakeup(&sc->rxdone); } if (sr & ~SPI_SR_ENDRX) { device_printf(sc->dev, "Unexpected ISR %#x\n", sr);