PERFORCE change 107397 for review
Warner Losh
imp at FreeBSD.org
Fri Oct 6 23:40:16 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=107397
Change 107397 by imp at 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);
More information about the p4-projects
mailing list