Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Oct 2006 06:40:15 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 107397 for review
Message-ID:  <200610070640.k976eFK7060056@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



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